diff --git a/db/routines/vn/procedures/sale_replaceItem.sql b/db/routines/vn/procedures/sale_replaceItem.sql index 1d9f6ff71..fb68b3f3a 100644 --- a/db/routines/vn/procedures/sale_replaceItem.sql +++ b/db/routines/vn/procedures/sale_replaceItem.sql @@ -92,8 +92,8 @@ BEGIN START TRANSACTION; UPDATE sale - SET quantity = quantity - vQuantity - WHERE id = vSaleFk; + SET originalQuantity = quantity - vQuantity, + quantity = quantity - vQuantity INSERT INTO vn.sale(ticketFk, itemFk,