refactor: refs #7517 Added throw #2562

Merged
guillermo merged 2 commits from 7517-throwBuy_afterUpsert into dev 2024-06-10 08:03:13 +00:00
1 changed files with 9 additions and 4 deletions

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.
@ -47,6 +49,9 @@ 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,