Merge pull request 'refactor: refs #7517 Added throw' (!2562) from 7517-throwBuy_afterUpsert into dev
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
Reviewed-on: #2562 Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
This commit is contained in:
commit
ddb644aded
|
@ -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.
|
||||
|
@ -47,6 +49,9 @@ BEGIN
|
|||
WHERE e.id = vEntryFk;
|
||||
|
||||
IF vIsMerchandise THEN
|
||||
IF vWarehouse IS NULL THEN
|
||||
CALL util.throw('The entry does not have travel');
|
||||
END IF;
|
||||
|
||||
REPLACE itemCost SET
|
||||
itemFk = vItemFk,
|
||||
|
|
Loading…
Reference in New Issue