15 lines
372 B
SQL
15 lines
372 B
SQL
DELIMITER $$
|
|
CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`accountReconciliation_beforeInsert`
|
|
BEFORE INSERT ON `accountReconciliation`
|
|
FOR EACH ROW
|
|
|
|
SET NEW.calculatedCode = REGEXP_REPLACE(
|
|
CONCAT(NEW.supplierAccountFk,
|
|
NEW.operationDated,
|
|
NEW.amount,
|
|
NEW.concept,
|
|
CAST(NEW.debitCredit AS UNSIGNED)
|
|
),
|
|
'[ :\\-.]', ''
|
|
)$$
|
|
DELIMITER ; |