7631_testToMaster_2426 #2634
|
@ -1,7 +1,14 @@
|
|||
DELIMITER $$
|
||||
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`itemShelving_add`(IN vShelvingFk VARCHAR(8), IN vBarcode VARCHAR(22), IN vQuantity INT, IN vPackagingFk VARCHAR(10), IN vGrouping INT, IN vPacking INT, IN vWarehouseFk INT)
|
||||
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`itemShelving_add`(
|
||||
vShelvingFk VARCHAR(8),
|
||||
vBarcode VARCHAR(22),
|
||||
vQuantity INT,
|
||||
vPackagingFk VARCHAR(10),
|
||||
vGrouping INT,
|
||||
vPacking INT,
|
||||
vWarehouseFk INT
|
||||
)
|
||||
BEGIN
|
||||
|
||||
/**
|
||||
* Añade registro o lo actualiza si ya existe.
|
||||
*
|
||||
|
@ -23,12 +30,7 @@ BEGIN
|
|||
SELECT barcodeToItem(vBarcode) INTO vItemFk;
|
||||
|
||||
IF vBuyFk IS NULL THEN
|
||||
CALL cache.last_buy_refresh(FALSE);
|
||||
|
||||
SELECT buy_id INTO vBuyFk
|
||||
FROM cache.last_buy
|
||||
WHERE item_id = vItemFk
|
||||
AND warehouse_id = vWarehouseFk;
|
||||
CALL util.throw('The buy is required');
|
||||
END IF;
|
||||
|
||||
IF vPacking IS NULL
|
||||
|
|
Loading…
Reference in New Issue