TYPE=TRIGGERS
triggers='CREATE DEFINER=`root`@`localhost` TRIGGER smsfacility 
\nAFTER INSERT ON headvoucher
\nFOR EACH ROW
\nBEGIN
\n    -- Check if the trigger is enabled
\n    DECLARE trigger_active TINYINT;
\n    SELECT is_enabled INTO trigger_active FROM trigger_control WHERE trigger_name = \'smsfacility\';
\n
\n    IF trigger_active = 1 THEN
\n        INSERT INTO smsfacility (date, acc_no, cr, dr, cls_bal, purpush, trantype, phone, vch_no)  
\n        SELECT date, h.acc_no, cr, dr, ROUND(acc_bal(h.acc_no), 2) AS bal, vch_type, deposit_type, \'\', vch_no 
\n        FROM headvoucher h 
\n        WHERE (shcode IN (\'14101\', \'14108\', \'14201\', \'14209\', \'14802\', \'14208\', \'14801\')) 
\n          AND h.no = NEW.no;
\n    END IF;
\nEND'
sql_modes=1073741824
definers='root@localhost'
client_cs_names='utf8'
connection_cl_names='utf8_general_ci'
db_cl_names='latin1_swedish_ci'
