7596-devToTest_2426 #2600

Merged
alexm merged 115 commits from 7596-devToTest_2426 into test 2024-06-18 06:19:51 +00:00
1 changed files with 9 additions and 4 deletions
Showing only changes of commit ddb644aded - Show all commits

View File

@ -1,5 +1,7 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`buy_afterUpsert`(vSelf INT) CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`buy_afterUpsert`(
vSelf INT
)
BEGIN BEGIN
/** /**
* Triggered actions when a buy is updated or inserted. * Triggered actions when a buy is updated or inserted.
@ -16,7 +18,7 @@ BEGIN
DECLARE vIsFeedStock BOOL; DECLARE vIsFeedStock BOOL;
DECLARE vWeight DECIMAL(10,2); DECLARE vWeight DECIMAL(10,2);
DECLARE vPacking INT; DECLARE vPacking INT;
SELECT b.entryFk, SELECT b.entryFk,
b.itemFk, b.itemFk,
i.packingOut, i.packingOut,
@ -47,8 +49,11 @@ BEGIN
WHERE e.id = vEntryFk; WHERE e.id = vEntryFk;
IF vIsMerchandise THEN IF vIsMerchandise THEN
IF vWarehouse IS NULL THEN
CALL util.throw('The entry does not have travel');
END IF;
REPLACE itemCost SET REPLACE itemCost SET
itemFk = vItemFk, itemFk = vItemFk,
warehouseFk = vWarehouse, warehouseFk = vWarehouse,
cm3 = buy_getUnitVolume(vSelf), cm3 = buy_getUnitVolume(vSelf),
@ -74,7 +79,7 @@ BEGIN
WHERE b.id = vSelf; WHERE b.id = vSelf;
END IF; END IF;
CREATE OR REPLACE TEMPORARY TABLE tmp.buysToCheck CREATE OR REPLACE TEMPORARY TABLE tmp.buysToCheck
SELECT vSelf id; SELECT vSelf id;
CALL buy_checkItem(); CALL buy_checkItem();
END$$ END$$