This commit is contained in:
parent
8ad61026ea
commit
c819b92141
|
@ -81,6 +81,10 @@ BEGIN
|
|||
ORDER BY (vQuantity % `grouping`) ASC
|
||||
LIMIT 1;
|
||||
|
||||
IF vNewPrice IS NULL THEN
|
||||
CALL util.throw('price retrieval failed');
|
||||
END IF;
|
||||
|
||||
IF vNewPrice > vOldPrice THEN
|
||||
SET vFinalPrice = vOldPrice;
|
||||
SET vOption = 'substitution';
|
||||
|
@ -103,7 +107,8 @@ BEGIN
|
|||
price)
|
||||
SELECT vTicketFk,
|
||||
vNewItemFk,
|
||||
CEIL(vQuantity / vRoundQuantity) * vRoundQuantity, CONCAT('+ ', i.name),
|
||||
CEIL(vQuantity / vRoundQuantity) * vRoundQuantity,
|
||||
CONCAT('+ ', i.name),
|
||||
vFinalPrice
|
||||
FROM vn.item i
|
||||
WHERE id = vNewItemFk;
|
||||
|
|
Loading…
Reference in New Issue