master #2716

Merged
pablone merged 22 commits from master into test 2024-07-15 11:40:30 +00:00
1 changed files with 10 additions and 2 deletions
Showing only changes of commit 21987011b6 - Show all commits

View File

@ -33,8 +33,16 @@ BEGIN
CALL util.throw('Reservation completed');
END IF;
SELECT s.itemFk, iss.saleFk, iss.itemShelvingFk, SUM(IFNULL(iss.quantity,0)), IF(sgd.id, 'PREVIOUS_PREPARATION', 'PREPARED') vStateCode
INTO vItemFk, vSaleFk, vItemShelvingFk, vReservedQuantity, vStateCode
SELECT s.itemFk,
iss.saleFk,
iss.itemShelvingFk,
SUM(IFNULL(iss.quantity,0)),
IF(sgd.id, 'PREVIOUS_PREPARATION', 'PREPARED')
INTO vItemFk,
vSaleFk,
vItemShelvingFk,
vReservedQuantity,
vStateCode
FROM itemShelvingSale iss
JOIN sale s ON s.id = iss.saleFk
LEFT JOIN vn.saleGroupDetail sgd ON sgd.saleFk = iss.saleFk