12 lines
308 B
SQL
12 lines
308 B
SQL
DELIMITER $$
|
|
CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`buy_beforeDelete`
|
|
BEFORE DELETE ON `buy`
|
|
FOR EACH ROW
|
|
BEGIN
|
|
CALL entry_isEditable(OLD.entryFk);
|
|
IF OLD.printedStickers <> 0 THEN
|
|
CALL util.throw("it is not possible to delete buys with printed labels ");
|
|
END IF;
|
|
END$$
|
|
DELIMITER ;
|