receipt_beforInsert
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
e47e5b9ec4
commit
a6dfdc971a
|
@ -0,0 +1,17 @@
|
||||||
|
DROP TRIGGER IF EXISTS vn.receipt_beforInsert;
|
||||||
|
|
||||||
|
DELIMITER $$
|
||||||
|
$$
|
||||||
|
CREATE TRIGGER receipt_beforInsert
|
||||||
|
BEFORE INSERT
|
||||||
|
ON receipt FOR EACH ROW
|
||||||
|
BEGIN
|
||||||
|
SELECT isAutoConciliated INTO @isAutoConciliated
|
||||||
|
FROM accounting a
|
||||||
|
JOIN accountingType at2 ON at2.id = a.accountingTypeFk
|
||||||
|
WHERE a.id =NEW.bankFk;
|
||||||
|
|
||||||
|
SET NEW.isConciliate = @isAutoConciliated;
|
||||||
|
END
|
||||||
|
$$
|
||||||
|
DELIMITER ;
|
Loading…
Reference in New Issue