2024-01-15 11:31:03 +00:00
|
|
|
DELIMITER $$
|
|
|
|
CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`buy_beforeDelete`
|
|
|
|
BEFORE DELETE ON `buy`
|
|
|
|
FOR EACH ROW
|
|
|
|
BEGIN
|
2024-03-25 07:47:06 +00:00
|
|
|
CALL entry_checkBooked(OLD.entryFk);
|
2024-01-15 11:31:03 +00:00
|
|
|
IF OLD.printedStickers <> 0 THEN
|
|
|
|
CALL util.throw("it is not possible to delete buys with printed labels ");
|
|
|
|
END IF;
|
|
|
|
END$$
|
|
|
|
DELIMITER ;
|