This commit is contained in:
parent
69bcad9ce0
commit
21987011b6
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue