From 7cff0149887a1eb09d586a51212798caa97d570a Mon Sep 17 00:00:00 2001 From: sergiodt Date: Wed, 19 Jul 2023 13:27:31 +0200 Subject: [PATCH] refs #5983 fix(itemShelving): vn --- .../233001/00-itemShelving_inventory.sql | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/db/changes/233001/00-itemShelving_inventory.sql b/db/changes/233001/00-itemShelving_inventory.sql index c66ad69e9..b0b080ef3 100644 --- a/db/changes/233001/00-itemShelving_inventory.sql +++ b/db/changes/233001/00-itemShelving_inventory.sql @@ -14,14 +14,14 @@ BEGIN DECLARE vPickingOrderTo INT; SELECT p.sectorFk, p.pickingOrder INTO vSectorFk, vPickingOrderFrom - FROM vn.parking p + FROM parking p WHERE p.code = vParkingFromFk COLLATE 'utf8mb3_general_ci'; SELECT p.pickingOrder INTO vPickingOrderTo - FROM vn.parking p + FROM parking p WHERE p.code = vParkingToFk COLLATE 'utf8mb3_general_ci'; - CALL vn.visible_getMisfit(vSectorFk); + CALL visible_getMisfit(vSectorFk); SELECT ish.id, p.pickingOrder, @@ -39,19 +39,19 @@ BEGIN WHEN sm.visible > sm.parked THEN 1 ELSE 2 END priority - FROM vn.itemShelving ish - JOIN vn.item i ON i.id = ish.itemFk - JOIN vn.itemType it ON it.id = i.typeFk + FROM itemShelving ish + JOIN item i ON i.id = ish.itemFk + JOIN itemType it ON it.id = i.typeFk JOIN tmp.stockMisfit sm ON sm.itemFk = ish.itemFk - JOIN vn.shelving sh ON sh.code = ish.shelvingFk - JOIN vn.parking p ON p.id = sh.parkingFk + JOIN shelving sh ON sh.code = ish.shelvingFk + JOIN parking p ON p.id = sh.parkingFk JOIN (SELECT s.itemFk, sum(s.quantity) notPrepared - FROM vn.sale s - JOIN vn.ticket t ON t.id = s.ticketFk - JOIN vn.warehouse w ON w.id = t.warehouseFk - JOIN vn.config c ON c.mainWarehouseFk = w.id + FROM sale s + JOIN ticket t ON t.id = s.ticketFk + JOIN warehouse w ON w.id = t.warehouseFk + JOIN config c ON c.mainWarehouseFk = w.id WHERE t.shipped BETWEEN util.VN_CURDATE() - AND util.VN_CURDATE() + INTERVAL 23 HOUR + AND util.dayEnd(util.VN_CURDATE()) AND s.isPicked = FALSE GROUP BY s.itemFk) s ON s.itemFk = i.id JOIN hedera.imageConfig ic