This commit is contained in:
parent
2e8d28d795
commit
ca7d67451b
|
@ -1,5 +1,7 @@
|
|||
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
|
||||
/**
|
||||
* Triggered actions when a buy is updated or inserted.
|
||||
|
@ -16,7 +18,7 @@ BEGIN
|
|||
DECLARE vIsFeedStock BOOL;
|
||||
DECLARE vWeight DECIMAL(10,2);
|
||||
DECLARE vPacking INT;
|
||||
|
||||
|
||||
SELECT b.entryFk,
|
||||
b.itemFk,
|
||||
i.packingOut,
|
||||
|
@ -51,7 +53,7 @@ BEGIN
|
|||
CALL util.throw('The entry does not have travel');
|
||||
END IF;
|
||||
|
||||
REPLACE itemCost SET
|
||||
REPLACE itemCost SET
|
||||
itemFk = vItemFk,
|
||||
warehouseFk = vWarehouse,
|
||||
cm3 = buy_getUnitVolume(vSelf),
|
||||
|
@ -77,7 +79,7 @@ BEGIN
|
|||
WHERE b.id = vSelf;
|
||||
|
||||
END IF;
|
||||
CREATE OR REPLACE TEMPORARY TABLE tmp.buysToCheck
|
||||
CREATE OR REPLACE TEMPORARY TABLE tmp.buysToCheck
|
||||
SELECT vSelf id;
|
||||
CALL buy_checkItem();
|
||||
END$$
|
||||
|
|
Loading…
Reference in New Issue