From 46f2d790db3aeb03178f2b20eabbd584ffd400ba Mon Sep 17 00:00:00 2001 From: sergiodt Date: Thu, 25 Apr 2024 08:01:32 +0200 Subject: [PATCH] refs #6312 hotFix fix:replaceItem --- db/routines/vn/procedures/sale_replaceItem.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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,