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-06-05 13:44:11 +00:00
|
|
|
CALL entry_isEditable(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 ;
|