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