salix/db/routines/vn2008/views/albaran.sql

19 lines
603 B
MySQL
Raw Permalink Normal View History

CREATE OR REPLACE DEFINER=`root`@`localhost`
SQL SECURITY DEFINER
VIEW `vn2008`.`albaran`
AS SELECT `dn`.`id` AS `albaran_id`,
`dn`.`ref` AS `ref`,
`dn`.`note` AS `note`,
`dn`.`shipped` AS `fecha`,
`dn`.`landed` AS `fecha_entrega`,
`dn`.`amount` AS `valor`,
`dn`.`supplierFk` AS `Id_Proveedor`,
`dn`.`companyFk` AS `empresa_id`,
`dn`.`warehouseFk` AS `warehouse_id`,
`dn`.`stateFk` AS `albaran_state_id`,
`dn`.`workerFk` AS `Id_Trabajador`,
`dn`.`supervisorFk` AS `Id_Responsable`,
`dn`.`departmentFk` AS `department_id`,
`dn`.`invoiceInFk` AS `recibida_id`
FROM `vn`.`deliveryNote` `dn`