diff --git a/db/routines/vn/procedures/supplierPackaging_ReportSource.sql b/db/routines/vn/procedures/supplierPackaging_ReportSource.sql index aa50a2d81..04d0e0f29 100644 --- a/db/routines/vn/procedures/supplierPackaging_ReportSource.sql +++ b/db/routines/vn/procedures/supplierPackaging_ReportSource.sql @@ -10,9 +10,9 @@ BEGIN * @param vFromDated Starting date * @param vSupplierFk Supplier ID */ - DECLARE vPerson INT; + DECLARE vEntityId INT; - SELECT id INTO vPerson + SELECT id INTO vEntityId FROM supplier WHERE nif = vNif; @@ -106,9 +106,9 @@ BEGIN )sub WHERE `out` OR `in`; - IF vPerson IS NULL THEN + IF vEntityId IS NULL THEN - SELECT id INTO vPerson + SELECT id INTO vEntityId FROM client WHERE fi = vNif; @@ -158,7 +158,7 @@ BEGIN END IF; - SELECT vPerson, + SELECT vEntityId, itemFk, longName, name,