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`, `dn`.`farmingFk` AS `farmingFk` FROM `vn`.`deliveryNote` `dn`