From 9fbffe8a6bfaf06e593320b1c4da7d22b0196fa0 Mon Sep 17 00:00:00 2001 From: sergiodt Date: Wed, 20 Nov 2024 14:03:23 +0100 Subject: [PATCH] fix: refs #7920 refs#7920 itemShelvingLog --- db/routines/vn/procedures/itemShelvingSale_setQuantity.sql | 5 +++-- db/routines/vn/procedures/itemShelving_get.sql | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/db/routines/vn/procedures/itemShelvingSale_setQuantity.sql b/db/routines/vn/procedures/itemShelvingSale_setQuantity.sql index f141762b5..1975180d1 100644 --- a/db/routines/vn/procedures/itemShelvingSale_setQuantity.sql +++ b/db/routines/vn/procedures/itemShelvingSale_setQuantity.sql @@ -48,7 +48,7 @@ BEGIN iss.itemShelvingFk, SUM(IFNULL(iss.quantity,0)), IF(sgd.id, 'PREVIOUS_PREPARATION', 'PREPARED'), - ish.shelvingFk + sh.code INTO vItemFk, vSaleFk, vItemShelvingFk, @@ -58,7 +58,8 @@ BEGIN FROM itemShelvingSale iss JOIN sale s ON s.id = iss.saleFk JOIN itemShelving ish ON ish.id = iss.itemShelvingFk - LEFT JOIN vn.saleGroupDetail sgd ON sgd.saleFk = iss.saleFk + LEFT JOIN saleGroupDetail sgd ON sgd.saleFk = iss.saleFk + LEFT JOIN shelving sh ON sh.id = ish.shelvingFk WHERE iss.id = vItemShelvingSaleFk AND NOT iss.isPicked; diff --git a/db/routines/vn/procedures/itemShelving_get.sql b/db/routines/vn/procedures/itemShelving_get.sql index 93022c2af..7e59a5cfc 100644 --- a/db/routines/vn/procedures/itemShelving_get.sql +++ b/db/routines/vn/procedures/itemShelving_get.sql @@ -21,7 +21,8 @@ BEGIN ish.isChecked, ic.url, ish.available, - ish.buyFk + ish.buyFk, + sh.shelvingFk FROM itemShelving ish JOIN item i ON i.id = ish.itemFk JOIN shelving s ON s.id = ish.shelvingFk -- 2.40.1