Merge pull request 'fix: refs #6861 itemShelvingSale debug' (!2969) from 6861-itemShelvingSaleReserve into master
gitea/salix/pipeline/head This commit looks good Details

Reviewed-on: #2969
Reviewed-by: Carlos Andrés <carlosap@verdnatura.es>
This commit is contained in:
Sergio De la torre 2024-09-16 12:21:22 +00:00
commit 0e81114696
1 changed files with 5 additions and 1 deletions

View File

@ -75,6 +75,9 @@ proc: BEGIN
WHERE saleFk = vSaleFk;
IF vTotalReservedQuantity <> vSaleQuantity THEN
CALL util.debugAdd('itemShelvingSale_addBySale',
CONCAT(vSaleFk, ' - ', vSaleQuantity,' - ', vTotalReservedQuantity,'-', vOutStanding,'-', account.myUser_getId()));
UPDATE sale
SET quantity = vTotalReservedQuantity
WHERE id = vSaleFk;
@ -93,7 +96,8 @@ proc: BEGIN
SET vOutStanding = vOutStanding - vReservedQuantity;
IF vReservedQuantity > 0 THEN
CALL util.debugAdd('itemShelvingSale_addBySale_reservedQuantity',
CONCAT(vSaleFk, ' - ', vReservedQuantity, ' - ', vOutStanding, account.myUser_getId()));
INSERT INTO itemShelvingSale(
itemShelvingFk,
saleFk,