This commit is contained in:
parent
da8378d422
commit
cc8873f48a
|
@ -10,8 +10,6 @@ BEGIN
|
||||||
DECLARE vLines INT;
|
DECLARE vLines INT;
|
||||||
DECLARE vHasDistinctTransactions INT;
|
DECLARE vHasDistinctTransactions INT;
|
||||||
|
|
||||||
CALL invoiceIn_checkBooked(vInvoiceInFk);
|
|
||||||
|
|
||||||
SELECT taxRowLimit INTO vTaxRowLimit FROM invoiceInConfig;
|
SELECT taxRowLimit INTO vTaxRowLimit FROM invoiceInConfig;
|
||||||
|
|
||||||
SELECT COUNT(*) INTO vLines
|
SELECT COUNT(*) INTO vLines
|
||||||
|
|
|
@ -5,8 +5,6 @@ BEGIN
|
||||||
DECLARE vDated DATE;
|
DECLARE vDated DATE;
|
||||||
DECLARE vExpenseFk VARCHAR(10);
|
DECLARE vExpenseFk VARCHAR(10);
|
||||||
|
|
||||||
CALL invoiceIn_checkBooked(vInvoiceInFk);
|
|
||||||
|
|
||||||
SELECT MAX(rr.dated) INTO vDated
|
SELECT MAX(rr.dated) INTO vDated
|
||||||
FROM referenceRate rr
|
FROM referenceRate rr
|
||||||
JOIN invoiceIn ii ON ii.id = vInvoiceInFk
|
JOIN invoiceIn ii ON ii.id = vInvoiceInFk
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
DELIMITER $$
|
|
||||||
CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`invoiceInCorrection_beforeDelete`
|
|
||||||
BEFORE DELETE ON `invoiceInCorrection`
|
|
||||||
FOR EACH ROW
|
|
||||||
BEGIN
|
|
||||||
CALL invoiceIn_checkBooked(OLD.correctingFk);
|
|
||||||
END$$
|
|
||||||
DELIMITER ;
|
|
|
@ -1,8 +0,0 @@
|
||||||
DELIMITER $$
|
|
||||||
CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`invoiceInCorrection_beforeInsert`
|
|
||||||
BEFORE INSERT ON `invoiceInCorrection`
|
|
||||||
FOR EACH ROW
|
|
||||||
BEGIN
|
|
||||||
CALL invoiceIn_checkBooked(NEW.correctingFk);
|
|
||||||
END$$
|
|
||||||
DELIMITER ;
|
|
|
@ -1,8 +0,0 @@
|
||||||
DELIMITER $$
|
|
||||||
CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`invoiceInCorrection_beforeUpdate`
|
|
||||||
BEFORE UPDATE ON `invoiceInCorrection`
|
|
||||||
FOR EACH ROW
|
|
||||||
BEGIN
|
|
||||||
CALL invoiceIn_checkBooked(OLD.correctingFk);
|
|
||||||
END$$
|
|
||||||
DELIMITER ;
|
|
|
@ -1,8 +0,0 @@
|
||||||
DELIMITER $$
|
|
||||||
CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`invoiceInIntrastat_beforeDelete`
|
|
||||||
BEFORE DELETE ON `invoiceInIntrastat`
|
|
||||||
FOR EACH ROW
|
|
||||||
BEGIN
|
|
||||||
CALL invoiceIn_checkBooked(OLD.invoiceInFk);
|
|
||||||
END$$
|
|
||||||
DELIMITER ;
|
|
|
@ -1,8 +0,0 @@
|
||||||
DELIMITER $$
|
|
||||||
CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`invoiceInIntrastat_beforeInsert`
|
|
||||||
BEFORE INSERT ON `invoiceInIntrastat`
|
|
||||||
FOR EACH ROW
|
|
||||||
BEGIN
|
|
||||||
CALL invoiceIn_checkBooked(NEW.invoiceInFk);
|
|
||||||
END$$
|
|
||||||
DELIMITER ;
|
|
|
@ -1,8 +0,0 @@
|
||||||
DELIMITER $$
|
|
||||||
CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`invoiceInIntrastat_beforeUpdate`
|
|
||||||
BEFORE UPDATE ON `invoiceInIntrastat`
|
|
||||||
FOR EACH ROW
|
|
||||||
BEGIN
|
|
||||||
CALL invoiceIn_checkBooked(OLD.invoiceInFk);
|
|
||||||
END$$
|
|
||||||
DELIMITER ;
|
|
|
@ -1,8 +0,0 @@
|
||||||
DELIMITER $$
|
|
||||||
CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`invoiceInTax_beforeDelete`
|
|
||||||
BEFORE DELETE ON `invoiceInTax`
|
|
||||||
FOR EACH ROW
|
|
||||||
BEGIN
|
|
||||||
CALL invoiceIn_checkBooked(OLD.invoiceInFk);
|
|
||||||
END$$
|
|
||||||
DELIMITER ;
|
|
|
@ -3,8 +3,6 @@ CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`invoiceInTax_beforeUp
|
||||||
BEFORE UPDATE ON `invoiceInTax`
|
BEFORE UPDATE ON `invoiceInTax`
|
||||||
FOR EACH ROW
|
FOR EACH ROW
|
||||||
BEGIN
|
BEGIN
|
||||||
CALL invoiceIn_checkBooked(OLD.invoiceInFk);
|
|
||||||
|
|
||||||
IF NOT (NEW.invoiceInFk <=> OLD.invoiceInFk) THEN
|
IF NOT (NEW.invoiceInFk <=> OLD.invoiceInFk) THEN
|
||||||
CALL invoiceInTax_afterUpsert(NEW.invoiceInFk);
|
CALL invoiceInTax_afterUpsert(NEW.invoiceInFk);
|
||||||
END IF;
|
END IF;
|
||||||
|
|
|
@ -5,10 +5,6 @@ CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`invoiceIn_beforeUpdat
|
||||||
BEGIN
|
BEGIN
|
||||||
DECLARE vWithholdingSageFk INT;
|
DECLARE vWithholdingSageFk INT;
|
||||||
|
|
||||||
IF NEW.isBooked = OLD.isBooked THEN
|
|
||||||
CALL invoiceIn_checkBooked(OLD.id);
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
IF NOT (NEW.supplierRef <=> OLD.supplierRef) AND NOT util.checkPrintableChars(NEW.supplierRef) THEN
|
IF NOT (NEW.supplierRef <=> OLD.supplierRef) AND NOT util.checkPrintableChars(NEW.supplierRef) THEN
|
||||||
CALL util.throw('The invoiceIn reference contains invalid characters');
|
CALL util.throw('The invoiceIn reference contains invalid characters');
|
||||||
END IF;
|
END IF;
|
||||||
|
|
Loading…
Reference in New Issue