2024-01-15 11:31:03 +00:00
|
|
|
DELIMITER $$
|
2024-08-20 08:06:10 +00:00
|
|
|
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemBarcode_update`(vItemFk INT,vCode VARCHAR(22), vDelete BOOL)
|
2024-01-15 11:31:03 +00:00
|
|
|
BEGIN
|
|
|
|
IF vDelete THEN
|
|
|
|
DELETE FROM vn.itemBarcode WHERE itemFk = vItemFk AND code = vCode;
|
|
|
|
ELSE
|
|
|
|
INSERT INTO vn.itemBarcode(itemFk,code) VALUES (vItemFk,vCode);
|
|
|
|
END IF;
|
|
|
|
|
|
|
|
END$$
|
|
|
|
DELIMITER ;
|