DELETE FROM t_tctb_formula WHERE FID = 901361949558747136;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (901361949558747136,{ts'2022-06-13  00:00:00'},' ',' ','VAT20180101','tcvat_xgm_current_payment#2#diffammount','取数方式：底稿取数 取数表：差额扣除台账 过滤条件： 所属税期=本行所属月份字段 差额扣除类型=3%税率项目 取数值：本期发生额列的合计数','小规模本期缴税情况单据#2#差额扣除额','1','2','901327072176156672','zzsaccount','tcvat_xgm_current_payment','diffammount',' ',' ','{S[SELECT sum(s.fcurrentamount) FROM t_tcvat_diffdeduct s WHERE s.frowno in (''VAT_CEKCLX_009'',''VAT_CEKCLX_006'') AND s.FORGID = ''#orgid''  AND s.FTAXPERIOD = ''#strStartPeriod'' and s.fdeadline =''#deadline'']}'); 
DELETE FROM t_tctb_formula WHERE FID = 901362148729466880;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (901362148729466880,{ts'2022-06-13  00:00:00'},' ',' ','VAT20180101','tcvat_xgm_current_payment#10#diffammount',' ','小规模本期缴税情况单据#10#差额扣除额','1','10','901327072176156672','zzsaccount','tcvat_xgm_current_payment','diffammount',' ',' ','{S[SELECT sum(s.fcurrentamount) FROM t_tcvat_diffdeduct s WHERE s.frowno in (''VAT_CEKCLX_009'',''VAT_CEKCLX_006'') AND s.FORGID = ''#orgid''  AND s.FTAXPERIOD = ''#strMiddlePeriod'' and s.fdeadline =''#deadline'']}'); 
DELETE FROM t_tctb_formula WHERE FID = 901362273057141760;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (901362273057141760,{ts'2022-06-13  00:00:00'},' ',' ','VAT20180101','tcvat_xgm_current_payment#18#diffammount',' ','小规模本期缴税情况单据#18#差额扣除额','1','18','901327072176156672','zzsaccount','tcvat_xgm_current_payment','diffammount',' ',' ','{S[SELECT sum(s.fcurrentamount) FROM t_tcvat_diffdeduct s WHERE s.frowno in (''VAT_CEKCLX_009'',''VAT_CEKCLX_006'') AND s.FORGID = ''#orgid''  AND s.FTAXPERIOD = ''#strEndPeriod'' and s.fdeadline =''#deadline'']}');  
DELETE FROM t_tctb_formula WHERE FID = 901399657224172544;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (901399657224172544,{ts'2022-06-13  00:00:00'},' ',' ','VAT20180101','tcvat_xgm_current_payment#1#salesexcludtax',' ','小规模本期缴税情况单据#1#不含税销售额','1','1','901327072176156672','zzsaccount','tcvat_xgm_current_payment','salesexcludtax',' ',' ','{S[SELECT sum(s.ftotalinvoiceamount) FROM t_tcvat_xgm_income_sum s,t_tpo_taxitemrateentry t  WHERE s.FBUSINESSTYPEID = t.FENTRYID and s.fdeadline =''#deadline''  AND ( t.fmergecode LIKE ''1%'' OR t.fmergecode LIKE ''2%'')  and s.FTAXRATE in (''3%'',''1%'')  AND s.FORGID = ''#orgid''  AND s.FTAXPERIOD = ''#strStartPeriod'']}'); 
DELETE FROM t_tctb_formula WHERE FID = 901400055230067712;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (901400055230067712,{ts'2022-06-13  00:00:00'},' ',' ','VAT20180101','tcvat_xgm_current_payment#2#salesexcludtax',' ','小规模本期缴税情况单据#2#不含税销售额','1','2','901327072176156672','zzsaccount','tcvat_xgm_current_payment','salesexcludtax',' ',' ','({S[SELECT sum(s.fpricetaxamount) FROM t_tcvat_xgm_income_sum s,t_tpo_taxitemrateentry t  WHERE s.FBUSINESSTYPEID = t.FENTRYID and s.fdeadline =''#deadline''  AND ( t.fmergecode LIKE ''3%'' OR t.fmergecode LIKE ''4%'')  and s.FTAXRATE = ''3%'' AND s.FORGID = ''#orgid''  AND s.FTAXPERIOD = ''#strStartPeriod'']} - {S[SELECT sum(s.fcurrentamount) FROM t_tcvat_diffdeduct s WHERE s.frowno = ''VAT_CEKCLX_006'' AND s.FORGID = ''#orgid''  AND s.FTAXPERIOD = ''#strStartPeriod'' and s.fdeadline =''#deadline'']})/1.03 + ({S[SELECT sum(s.fpricetaxamount) FROM t_tcvat_xgm_income_sum s,t_tpo_taxitemrateentry t  WHERE s.FBUSINESSTYPEID = t.FENTRYID and s.fdeadline =''#deadline''  AND ( t.fmergecode LIKE ''3%'' OR t.fmergecode LIKE ''4%'')  and s.FTAXRATE = ''1%'' AND s.FORGID = ''#orgid''  AND s.FTAXPERIOD = ''#strStartPeriod'']} - {S[SELECT sum(s.fcurrentamount) FROM t_tcvat_diffdeduct s WHERE s.frowno = ''VAT_CEKCLX_009'' AND s.FORGID = ''#orgid''  AND s.FTAXPERIOD = ''#strStartPeriod'' and s.fdeadline =''#deadline'']})/1.01'); 
DELETE FROM t_tctb_formula WHERE FID = 901400569493681152;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (901400569493681152,{ts'2022-06-13  00:00:00'},' ',' ','VAT20180101','tcvat_xgm_current_payment#9#salesexcludtax',' ','小规模本期缴税情况单据#9#不含税销售额','1','9','901327072176156672','zzsaccount','tcvat_xgm_current_payment','salesexcludtax',' ',' ','{S[SELECT sum(s.ftotalinvoiceamount) FROM t_tcvat_xgm_income_sum s,t_tpo_taxitemrateentry t  WHERE s.FBUSINESSTYPEID = t.FENTRYID and s.fdeadline =''#deadline''  AND ( t.fmergecode LIKE ''1%'' OR t.fmergecode LIKE ''2%'')  and s.FTAXRATE in (''3%'',''1%'')  AND s.FORGID = ''#orgid''  AND s.FTAXPERIOD = ''#strMiddlePeriod'']}');
DELETE FROM t_tctb_formula WHERE FID = 901400690432241664;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (901400690432241664,{ts'2022-06-13  00:00:00'},' ',' ','VAT20180101','tcvat_xgm_current_payment#10#salesexcludtax',' ','小规模本期缴税情况单据#10#不含税销售额','1','10','901327072176156672','zzsaccount','tcvat_xgm_current_payment','salesexcludtax',' ',' ','({S[SELECT sum(s.fpricetaxamount) FROM t_tcvat_xgm_income_sum s,t_tpo_taxitemrateentry t  WHERE s.FBUSINESSTYPEID = t.FENTRYID and s.fdeadline =''#deadline''  AND ( t.fmergecode LIKE ''3%'' OR t.fmergecode LIKE ''4%'')  and s.FTAXRATE = ''3%'' AND s.FORGID = ''#orgid''  AND s.FTAXPERIOD = ''#strMiddlePeriod'']} - {S[SELECT sum(s.fcurrentamount) FROM t_tcvat_diffdeduct s WHERE s.frowno = ''VAT_CEKCLX_006'' AND s.FORGID = ''#orgid''  AND s.FTAXPERIOD = ''#strMiddlePeriod'' and s.fdeadline =''#deadline'']})/1.03 + ({S[SELECT sum(s.fpricetaxamount) FROM t_tcvat_xgm_income_sum s,t_tpo_taxitemrateentry t  WHERE s.FBUSINESSTYPEID = t.FENTRYID and s.fdeadline =''#deadline''  AND ( t.fmergecode LIKE ''3%'' OR t.fmergecode LIKE ''4%'')  and s.FTAXRATE = ''1%'' AND s.FORGID = ''#orgid''  AND s.FTAXPERIOD = ''#strMiddlePeriod'']} - {S[SELECT sum(s.fcurrentamount) FROM t_tcvat_diffdeduct s WHERE s.frowno = ''VAT_CEKCLX_009'' AND s.FORGID = ''#orgid''  AND s.FTAXPERIOD = ''#strMiddlePeriod'' and s.fdeadline =''#deadline'']})/1.01'); 
DELETE FROM t_tctb_formula WHERE FID = 901401109652927488;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (901401109652927488,{ts'2022-06-13  00:00:00'},' ',' ','VAT20180101','tcvat_xgm_current_payment#17#salesexcludtax',' ','小规模本期缴税情况单据#17#不含税销售额','1','17','901327072176156672','zzsaccount','tcvat_xgm_current_payment','salesexcludtax',' ',' ','{S[SELECT sum(s.ftotalinvoiceamount) FROM t_tcvat_xgm_income_sum s,t_tpo_taxitemrateentry t  WHERE s.FBUSINESSTYPEID = t.FENTRYID and s.fdeadline =''#deadline''  AND ( t.fmergecode LIKE ''1%'' OR t.fmergecode LIKE ''2%'')  and s.FTAXRATE in (''3%'',''1%'')  AND s.FORGID = ''#orgid''  AND s.FTAXPERIOD = ''#strEndPeriod'']}'); 
DELETE FROM t_tctb_formula WHERE FID = 901401330533363712;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (901401330533363712,{ts'2022-06-13  00:00:00'},' ',' ','VAT20180101','tcvat_xgm_current_payment#18#salesexcludtax',' ','小规模本期缴税情况单据#18#不含税销售额','1','18','901327072176156672','zzsaccount','tcvat_xgm_current_payment','salesexcludtax',' ',' ','({S[SELECT sum(s.fpricetaxamount) FROM t_tcvat_xgm_income_sum s,t_tpo_taxitemrateentry t  WHERE s.FBUSINESSTYPEID = t.FENTRYID and s.fdeadline =''#deadline''  AND ( t.fmergecode LIKE ''3%'' OR t.fmergecode LIKE ''4%'')  and s.FTAXRATE = ''3%'' AND s.FORGID = ''#orgid''  AND s.FTAXPERIOD = ''#strEndPeriod'']} - {S[SELECT sum(s.fcurrentamount) FROM t_tcvat_diffdeduct s WHERE s.frowno = ''VAT_CEKCLX_006'' AND s.FORGID = ''#orgid''  AND s.FTAXPERIOD = ''#strEndPeriod'' and s.fdeadline =''#deadline'']})/1.03 + ({S[SELECT sum(s.fpricetaxamount) FROM t_tcvat_xgm_income_sum s,t_tpo_taxitemrateentry t  WHERE s.FBUSINESSTYPEID = t.FENTRYID and s.fdeadline =''#deadline''  AND ( t.fmergecode LIKE ''3%'' OR t.fmergecode LIKE ''4%'')  and s.FTAXRATE = ''1%'' AND s.FORGID = ''#orgid''  AND s.FTAXPERIOD = ''#strEndPeriod'']} - {S[SELECT sum(s.fcurrentamount) FROM t_tcvat_diffdeduct s WHERE s.frowno = ''VAT_CEKCLX_009'' AND s.FORGID = ''#orgid''  AND s.FTAXPERIOD = ''#strEndPeriod'' and s.fdeadline =''#deadline'']})/1.01'); 
DELETE FROM t_tctb_formula WHERE FID = 901405871043605504;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (901405871043605504,{ts'2022-06-13  00:00:00'},' ',' ','VAT20180101','tcvat_xgm_current_payment#1#taxableamount',' ','小规模本期缴税情况单据#1#应税销售额','1','1','901327072176156672','zzsaccount','tcvat_xgm_current_payment','taxableamount',' ',' ','if({Q[tcvat_xgm_current_payment#25#salesexcludtax]}>{P[Tax Threshold-SS]}*3,if({Q[tcvat_xgm_current_payment#25#salesexcludtax]}-{Q[tcvat_xgm_current_payment#4#salesexcludtax]}-{Q[tcvat_xgm_current_payment#12#salesexcludtax]}-{Q[tcvat_xgm_current_payment#20#salesexcludtax]}>{P[Tax Threshold-SS]}*3,{Q[tcvat_xgm_current_payment#1#salesexcludtax]},{Q[tcvat_xgm_current_payment#1#specialincludtax]}),{Q[tcvat_xgm_current_payment#1#specialincludtax]})'); 
DELETE FROM t_tctb_formula WHERE FID = 901450135966412800;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (901450135966412800,{ts'2022-06-13  00:00:00'},' ',' ','VAT20180101','tcvat_xgm_current_payment#2#taxableamount',' ','小规模本期缴税情况单据#2#应税销售额','1','2','901327072176156672','zzsaccount','tcvat_xgm_current_payment','taxableamount',' ',' ','if({Q[tcvat_xgm_current_payment#25#salesexcludtax]}>{P[Tax Threshold-SS]}*3,if({Q[tcvat_xgm_current_payment#25#salesexcludtax]}-{Q[tcvat_xgm_current_payment#4#salesexcludtax]}-{Q[tcvat_xgm_current_payment#12#salesexcludtax]}-{Q[tcvat_xgm_current_payment#20#salesexcludtax]}>{P[Tax Threshold-SS]}*3,{Q[tcvat_xgm_current_payment#2#salesexcludtax]},{Q[tcvat_xgm_current_payment#2#specialincludtax]}),{Q[tcvat_xgm_current_payment#2#specialincludtax]})'); 
DELETE FROM t_tctb_formula WHERE FID = 901450327847432192;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (901450327847432192,{ts'2022-06-13  00:00:00'},' ',' ','VAT20180101','tcvat_xgm_current_payment#3#taxableamount',' ','小规模本期缴税情况单据#3#应税销售额','1','3','901327072176156672','zzsaccount','tcvat_xgm_current_payment','taxableamount',' ',' ','if({Q[tcvat_xgm_current_payment#25#salesexcludtax]}>{P[Tax Threshold-SS]}*3,if({Q[tcvat_xgm_current_payment#25#salesexcludtax]}-{Q[tcvat_xgm_current_payment#4#salesexcludtax]}-{Q[tcvat_xgm_current_payment#12#salesexcludtax]}-{Q[tcvat_xgm_current_payment#20#salesexcludtax]}>{P[Tax Threshold-SS]}*3,{Q[tcvat_xgm_current_payment#3#salesexcludtax]},{Q[tcvat_xgm_current_payment#3#specialincludtax]}-{Q[tcvat_xgm_current_payment#4#specialincludtax]}+{Q[tcvat_xgm_current_payment#4#taxableamount]}),{Q[tcvat_xgm_current_payment#3#specialincludtax]})'); 
DELETE FROM t_tctb_formula WHERE FID = 901453282550051840;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (901453282550051840,{ts'2022-06-13  00:00:00'},' ',' ','VAT20180101','tcvat_xgm_current_payment#4#taxableamount',' ','小规模本期缴税情况单据#4#应税销售额','1','4','901327072176156672','zzsaccount','tcvat_xgm_current_payment','taxableamount',' ',' ','if({Q[tcvat_xgm_current_payment#25#salesexcludtax]}>{P[Tax Threshold-SS]}*3,{Q[tcvat_xgm_current_payment#4#salesexcludtax]},{Q[tcvat_xgm_current_payment#4#specialincludtax]})'); 
DELETE FROM t_tctb_formula WHERE FID = 901506540631096320;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (901506540631096320,{ts'2022-06-13  00:00:00'},' ',' ','VAT20180101','tcvat_xgm_current_payment#9#taxableamount',' ','小规模本期缴税情况单据#9#应税销售额','1','9','901327072176156672','zzsaccount','tcvat_xgm_current_payment','taxableamount',' ',' ','if({Q[tcvat_xgm_current_payment#25#salesexcludtax]}>{P[Tax Threshold-SS]}*3,if({Q[tcvat_xgm_current_payment#25#salesexcludtax]}-{Q[tcvat_xgm_current_payment#4#salesexcludtax]}-{Q[tcvat_xgm_current_payment#12#salesexcludtax]}-{Q[tcvat_xgm_current_payment#20#salesexcludtax]}>{P[Tax Threshold-SS]}*3,{Q[tcvat_xgm_current_payment#9#salesexcludtax]},{Q[tcvat_xgm_current_payment#9#specialincludtax]}),{Q[tcvat_xgm_current_payment#9#specialincludtax]})'); 
DELETE FROM t_tctb_formula WHERE FID = 901506785293237248;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (901506785293237248,{ts'2022-06-13  00:00:00'},' ',' ','VAT20180101','tcvat_xgm_current_payment#10#taxableamount',' ','小规模本期缴税情况单据#10#应税销售额','1','10','901327072176156672','zzsaccount','tcvat_xgm_current_payment','taxableamount',' ',' ','if({Q[tcvat_xgm_current_payment#25#salesexcludtax]}>{P[Tax Threshold-SS]}*3,if({Q[tcvat_xgm_current_payment#25#salesexcludtax]}-{Q[tcvat_xgm_current_payment#4#salesexcludtax]}-{Q[tcvat_xgm_current_payment#12#salesexcludtax]}-{Q[tcvat_xgm_current_payment#20#salesexcludtax]}>{P[Tax Threshold-SS]}*3,{Q[tcvat_xgm_current_payment#10#salesexcludtax]},{Q[tcvat_xgm_current_payment#10#specialincludtax]}),{Q[tcvat_xgm_current_payment#10#specialincludtax]})'); 
DELETE FROM t_tctb_formula WHERE FID = 901508184496274432;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (901508184496274432,{ts'2022-06-13  00:00:00'},' ',' ','VAT20180101','tcvat_xgm_current_payment#11#taxableamount',' ','小规模本期缴税情况单据#11#应税销售额','1','11','901327072176156672','zzsaccount','tcvat_xgm_current_payment','taxableamount',' ',' ','if({Q[tcvat_xgm_current_payment#25#salesexcludtax]}>{P[Tax Threshold-SS]}*3,if({Q[tcvat_xgm_current_payment#25#salesexcludtax]}-{Q[tcvat_xgm_current_payment#4#salesexcludtax]}-{Q[tcvat_xgm_current_payment#12#salesexcludtax]}-{Q[tcvat_xgm_current_payment#20#salesexcludtax]}>{P[Tax Threshold-SS]}*3,{Q[tcvat_xgm_current_payment#11#salesexcludtax]},{Q[tcvat_xgm_current_payment#11#specialincludtax]}-{Q[tcvat_xgm_current_payment#12#specialincludtax]}+{Q[tcvat_xgm_current_payment#12#taxableamount]}),{Q[tcvat_xgm_current_payment#11#specialincludtax]})'); 
DELETE FROM t_tctb_formula WHERE FID = 901508594523044864;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (901508594523044864,{ts'2022-06-13  00:00:00'},' ',' ','VAT20180101','tcvat_xgm_current_payment#12#taxableamount',' ','小规模本期缴税情况单据#12#应税销售额','1','12','901327072176156672','zzsaccount','tcvat_xgm_current_payment','taxableamount',' ',' ','if({Q[tcvat_xgm_current_payment#25#salesexcludtax]}>{P[Tax Threshold-SS]}*3,{Q[tcvat_xgm_current_payment#12#salesexcludtax]},{Q[tcvat_xgm_current_payment#12#specialincludtax]})'); 
DELETE FROM t_tctb_formula WHERE FID = 901510263545658368;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (901510263545658368,{ts'2022-06-13  00:00:00'},' ',' ','VAT20180101','tcvat_xgm_current_payment#17#taxableamount',' ','小规模本期缴税情况单据#17#应税销售额','1','17','901327072176156672','zzsaccount','tcvat_xgm_current_payment','taxableamount',' ',' ','if({Q[tcvat_xgm_current_payment#25#salesexcludtax]}>{P[Tax Threshold-SS]}*3,if({Q[tcvat_xgm_current_payment#25#salesexcludtax]}-{Q[tcvat_xgm_current_payment#4#salesexcludtax]}-{Q[tcvat_xgm_current_payment#12#salesexcludtax]}-{Q[tcvat_xgm_current_payment#20#salesexcludtax]}>{P[Tax Threshold-SS]}*3,{Q[tcvat_xgm_current_payment#17#salesexcludtax]},{Q[tcvat_xgm_current_payment#17#specialincludtax]}),{Q[tcvat_xgm_current_payment#17#specialincludtax]})'); 
DELETE FROM t_tctb_formula WHERE FID = 901510599987559424;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (901510599987559424,{ts'2022-06-13  00:00:00'},' ',' ','VAT20180101','tcvat_xgm_current_payment#18#taxableamount',' ','小规模本期缴税情况单据#18#应税销售额','1','18','901327072176156672','zzsaccount','tcvat_xgm_current_payment','taxableamount',' ',' ','if({Q[tcvat_xgm_current_payment#25#salesexcludtax]}>{P[Tax Threshold-SS]}*3,if({Q[tcvat_xgm_current_payment#25#salesexcludtax]}-{Q[tcvat_xgm_current_payment#4#salesexcludtax]}-{Q[tcvat_xgm_current_payment#12#salesexcludtax]}-{Q[tcvat_xgm_current_payment#20#salesexcludtax]}>{P[Tax Threshold-SS]}*3,{Q[tcvat_xgm_current_payment#18#salesexcludtax]},{Q[tcvat_xgm_current_payment#18#specialincludtax]}),{Q[tcvat_xgm_current_payment#18#specialincludtax]})'); 
DELETE FROM t_tctb_formula WHERE FID = 901511947156061184;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (901511947156061184,{ts'2022-06-13  00:00:00'},' ',' ','VAT20180101','tcvat_xgm_current_payment#19#taxableamount',' ','小规模本期缴税情况单据#19#应税销售额','1','19','901327072176156672','zzsaccount','tcvat_xgm_current_payment','taxableamount',' ',' ','if({Q[tcvat_xgm_current_payment#25#salesexcludtax]}>{P[Tax Threshold-SS]}*3,if({Q[tcvat_xgm_current_payment#25#salesexcludtax]}-{Q[tcvat_xgm_current_payment#4#salesexcludtax]}-{Q[tcvat_xgm_current_payment#12#salesexcludtax]}-{Q[tcvat_xgm_current_payment#20#salesexcludtax]}>{P[Tax Threshold-SS]}*3,{Q[tcvat_xgm_current_payment#19#salesexcludtax]},{Q[tcvat_xgm_current_payment#19#specialincludtax]}-{Q[tcvat_xgm_current_payment#20#specialincludtax]}+{Q[tcvat_xgm_current_payment#20#taxableamount]}),{Q[tcvat_xgm_current_payment#19#specialincludtax]})'); 
DELETE FROM t_tctb_formula WHERE FID = 901512257677163520;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (901512257677163520,{ts'2022-06-13  00:00:00'},' ',' ','VAT20180101','tcvat_xgm_current_payment#20#taxableamount',' ','小规模本期缴税情况单据#20#应税销售额','1','20','901327072176156672','zzsaccount','tcvat_xgm_current_payment','taxableamount',' ',' ','if({Q[tcvat_xgm_current_payment#25#salesexcludtax]}>{P[Tax Threshold-SS]}*3,{Q[tcvat_xgm_current_payment#20#salesexcludtax]},{Q[tcvat_xgm_current_payment#20#specialincludtax]})'); 
DELETE FROM t_tctb_formula WHERE FID = 901515900891445248;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (901515900891445248,{ts'2022-06-13  00:00:00'},' ',' ','VAT20180101','tcvat_xgm_current_payment#1#taxfreeamount',' ','小规模本期缴税情况单据#1#免税销售额','1','1','901327072176156672','zzsaccount','tcvat_xgm_current_payment','taxfreeamount',' ',' ','if({Q[tcvat_xgm_current_payment#25#salesexcludtax]}>{P[Tax Threshold-SS]}*3,if({Q[tcvat_xgm_current_payment#25#salesexcludtax]}-{Q[tcvat_xgm_current_payment#4#salesexcludtax]}-{Q[tcvat_xgm_current_payment#12#salesexcludtax]}-{Q[tcvat_xgm_current_payment#20#salesexcludtax]}>{P[Tax Threshold-SS]}*3,0,{Q[tcvat_xgm_current_payment#1#salesexcludtax]}-{Q[tcvat_xgm_current_payment#1#taxableamount]}),{Q[tcvat_xgm_current_payment#1#salesexcludtax]}-{Q[tcvat_xgm_current_payment#1#taxableamount]})'); 
DELETE FROM t_tctb_formula WHERE FID = 901516575184533504;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (901516575184533504,{ts'2022-06-13  00:00:00'},' ',' ','VAT20180101','tcvat_xgm_current_payment#2#taxfreeamount',' ','小规模本期缴税情况单据#2#免税销售额','1','2','901327072176156672','zzsaccount','tcvat_xgm_current_payment','taxfreeamount',' ',' ','if({Q[tcvat_xgm_current_payment#25#salesexcludtax]}>{P[Tax Threshold-SS]}*3,if({Q[tcvat_xgm_current_payment#25#salesexcludtax]}-{Q[tcvat_xgm_current_payment#4#salesexcludtax]}-{Q[tcvat_xgm_current_payment#12#salesexcludtax]}-{Q[tcvat_xgm_current_payment#20#salesexcludtax]}>{P[Tax Threshold-SS]}*3,0,{Q[tcvat_xgm_current_payment#2#salesexcludtax]}-{Q[tcvat_xgm_current_payment#2#taxableamount]}),{Q[tcvat_xgm_current_payment#2#salesexcludtax]}-{Q[tcvat_xgm_current_payment#2#taxableamount]})'); 
DELETE FROM t_tctb_formula WHERE FID = 901516743787165696;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (901516743787165696,{ts'2022-06-13  00:00:00'},' ',' ','VAT20180101','tcvat_xgm_current_payment#3#taxfreeamount',' ','小规模本期缴税情况单据#3#免税销售额','1','3','901327072176156672','zzsaccount','tcvat_xgm_current_payment','taxfreeamount',' ',' ','if({Q[tcvat_xgm_current_payment#25#salesexcludtax]}>{P[Tax Threshold-SS]}*3,if({Q[tcvat_xgm_current_payment#25#salesexcludtax]}-{Q[tcvat_xgm_current_payment#4#salesexcludtax]}-{Q[tcvat_xgm_current_payment#12#salesexcludtax]}-{Q[tcvat_xgm_current_payment#20#salesexcludtax]}>{P[Tax Threshold-SS]}*3,0,{Q[tcvat_xgm_current_payment#3#salesexcludtax]}-{Q[tcvat_xgm_current_payment#3#taxableamount]}),{Q[tcvat_xgm_current_payment#3#salesexcludtax]}-{Q[tcvat_xgm_current_payment#3#taxableamount]})'); 
DELETE FROM t_tctb_formula WHERE FID = 901517606731659264;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (901517606731659264,{ts'2022-06-13  00:00:00'},' ',' ','VAT20180101','tcvat_xgm_current_payment#4#taxfreeamount',' ','小规模本期缴税情况单据#4#免税销售额','1','4','901327072176156672','zzsaccount','tcvat_xgm_current_payment','taxfreeamount',' ',' ','if({Q[tcvat_xgm_current_payment#25#salesexcludtax]}>{P[Tax Threshold-SS]}*3,0,{Q[tcvat_xgm_current_payment#4#salesexcludtax]}-{Q[tcvat_xgm_current_payment#4#taxableamount]})'); 
DELETE FROM t_tctb_formula WHERE FID = 901518113781069824;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (901518113781069824,{ts'2022-06-13  00:00:00'},' ',' ','VAT20180101','tcvat_xgm_current_payment#9#taxfreeamount',' ','小规模本期缴税情况单据#9#免税销售额','1','9','901327072176156672','zzsaccount','tcvat_xgm_current_payment','taxfreeamount',' ',' ','if({Q[tcvat_xgm_current_payment#25#salesexcludtax]}>{P[Tax Threshold-SS]}*3,if({Q[tcvat_xgm_current_payment#25#salesexcludtax]}-{Q[tcvat_xgm_current_payment#4#salesexcludtax]}-{Q[tcvat_xgm_current_payment#12#salesexcludtax]}-{Q[tcvat_xgm_current_payment#20#salesexcludtax]}>{P[Tax Threshold-SS]}*3,0,{Q[tcvat_xgm_current_payment#9#salesexcludtax]}-{Q[tcvat_xgm_current_payment#9#taxableamount]}),{Q[tcvat_xgm_current_payment#9#salesexcludtax]}-{Q[tcvat_xgm_current_payment#9#taxableamount]})');
DELETE FROM t_tctb_formula WHERE FID = 901518530602612736;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (901518530602612736,{ts'2022-06-13  00:00:00'},' ',' ','VAT20180101','tcvat_xgm_current_payment#10#taxfreeamount',' ','小规模本期缴税情况单据#10#免税销售额','1','10','901327072176156672','zzsaccount','tcvat_xgm_current_payment','taxfreeamount',' ',' ','if({Q[tcvat_xgm_current_payment#25#salesexcludtax]}>{P[Tax Threshold-SS]}*3,if({Q[tcvat_xgm_current_payment#25#salesexcludtax]}-{Q[tcvat_xgm_current_payment#4#salesexcludtax]}-{Q[tcvat_xgm_current_payment#12#salesexcludtax]}-{Q[tcvat_xgm_current_payment#20#salesexcludtax]}>{P[Tax Threshold-SS]}*3,0,{Q[tcvat_xgm_current_payment#10#salesexcludtax]}-{Q[tcvat_xgm_current_payment#10#taxableamount]}),{Q[tcvat_xgm_current_payment#10#salesexcludtax]}-{Q[tcvat_xgm_current_payment#10#taxableamount]})'); 
DELETE FROM t_tctb_formula WHERE FID = 901519090886245376;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (901519090886245376,{ts'2022-06-13  00:00:00'},' ',' ','VAT20180101','tcvat_xgm_current_payment#11#taxfreeamount',' ','小规模本期缴税情况单据#11#免税销售额','1','11','901327072176156672','zzsaccount','tcvat_xgm_current_payment','taxfreeamount',' ',' ','if({Q[tcvat_xgm_current_payment#25#salesexcludtax]}>{P[Tax Threshold-SS]}*3,if({Q[tcvat_xgm_current_payment#25#salesexcludtax]}-{Q[tcvat_xgm_current_payment#4#salesexcludtax]}-{Q[tcvat_xgm_current_payment#12#salesexcludtax]}-{Q[tcvat_xgm_current_payment#20#salesexcludtax]}>{P[Tax Threshold-SS]}*3,0,{Q[tcvat_xgm_current_payment#11#salesexcludtax]}-{Q[tcvat_xgm_current_payment#11#taxableamount]}),{Q[tcvat_xgm_current_payment#11#salesexcludtax]}-{Q[tcvat_xgm_current_payment#11#taxableamount]})'); 
DELETE FROM t_tctb_formula WHERE FID = 901519664826300416;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (901519664826300416,{ts'2022-06-13  00:00:00'},' ',' ','VAT20180101','tcvat_xgm_current_payment#12#taxfreeamount',' ','小规模本期缴税情况单据#12#免税销售额','1','12','901327072176156672','zzsaccount','tcvat_xgm_current_payment','taxfreeamount',' ',' ','if({Q[tcvat_xgm_current_payment#25#salesexcludtax]}>{P[Tax Threshold-SS]}*3,0,{Q[tcvat_xgm_current_payment#12#salesexcludtax]}-{Q[tcvat_xgm_current_payment#12#taxableamount]})'); 
DELETE FROM t_tctb_formula WHERE FID = 901521471245924352;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (901521471245924352,{ts'2022-06-13  00:00:00'},' ',' ','VAT20180101','tcvat_xgm_current_payment#17#taxfreeamount',' ','小规模本期缴税情况单据#17#免税销售额','1','17','901327072176156672','zzsaccount','tcvat_xgm_current_payment','taxfreeamount',' ',' ','if({Q[tcvat_xgm_current_payment#25#salesexcludtax]}>{P[Tax Threshold-SS]}*3,if({Q[tcvat_xgm_current_payment#25#salesexcludtax]}-{Q[tcvat_xgm_current_payment#4#salesexcludtax]}-{Q[tcvat_xgm_current_payment#12#salesexcludtax]}-{Q[tcvat_xgm_current_payment#20#salesexcludtax]}>{P[Tax Threshold-SS]}*3,0,{Q[tcvat_xgm_current_payment#17#salesexcludtax]}-{Q[tcvat_xgm_current_payment#17#taxableamount]}),{Q[tcvat_xgm_current_payment#17#salesexcludtax]}-{Q[tcvat_xgm_current_payment#17#taxableamount]})'); 
DELETE FROM t_tctb_formula WHERE FID = 901521795247519744;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (901521795247519744,{ts'2022-06-13  00:00:00'},' ',' ','VAT20180101','tcvat_xgm_current_payment#18#taxfreeamount',' ','小规模本期缴税情况单据#18#免税销售额','1','18','901327072176156672','zzsaccount','tcvat_xgm_current_payment','taxfreeamount',' ',' ','if({Q[tcvat_xgm_current_payment#25#salesexcludtax]}>{P[Tax Threshold-SS]}*3,if({Q[tcvat_xgm_current_payment#25#salesexcludtax]}-{Q[tcvat_xgm_current_payment#4#salesexcludtax]}-{Q[tcvat_xgm_current_payment#12#salesexcludtax]}-{Q[tcvat_xgm_current_payment#20#salesexcludtax]}>{P[Tax Threshold-SS]}*3,0,{Q[tcvat_xgm_current_payment#18#salesexcludtax]}-{Q[tcvat_xgm_current_payment#18#taxableamount]}),{Q[tcvat_xgm_current_payment#18#salesexcludtax]}-{Q[tcvat_xgm_current_payment#18#taxableamount]})'); 
DELETE FROM t_tctb_formula WHERE FID = 901521997815625728;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (901521997815625728,{ts'2022-06-13  00:00:00'},' ',' ','VAT20180101','tcvat_xgm_current_payment#19#taxfreeamount',' ','小规模本期缴税情况单据#19#免税销售额','1','19','901327072176156672','zzsaccount','tcvat_xgm_current_payment','taxfreeamount',' ',' ','if({Q[tcvat_xgm_current_payment#25#salesexcludtax]}>{P[Tax Threshold-SS]}*3,if({Q[tcvat_xgm_current_payment#25#salesexcludtax]}-{Q[tcvat_xgm_current_payment#4#salesexcludtax]}-{Q[tcvat_xgm_current_payment#12#salesexcludtax]}-{Q[tcvat_xgm_current_payment#20#salesexcludtax]}>{P[Tax Threshold-SS]}*3,0,{Q[tcvat_xgm_current_payment#19#salesexcludtax]}-{Q[tcvat_xgm_current_payment#19#taxableamount]}),{Q[tcvat_xgm_current_payment#19#salesexcludtax]}-{Q[tcvat_xgm_current_payment#19#taxableamount]})'); 
DELETE FROM t_tctb_formula WHERE FID = 901522261930948608;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (901522261930948608,{ts'2022-06-13  00:00:00'},' ',' ','VAT20180101','tcvat_xgm_current_payment#20#taxfreeamount',' ','小规模本期缴税情况单据#20#免税销售额','1','20','901327072176156672','zzsaccount','tcvat_xgm_current_payment','taxfreeamount',' ',' ','if({Q[tcvat_xgm_current_payment#25#salesexcludtax]}>{P[Tax Threshold-SS]}*3,0,{Q[tcvat_xgm_current_payment#20#salesexcludtax]}-{Q[tcvat_xgm_current_payment#20#taxableamount]})'); 
DELETE FROM t_tctb_formula WHERE FID = 904079960086575104;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (904079960086575104,{ts'2022-06-13  00:00:00'},' ',' ','VAT20180101','tcvat_xgm_current_payment#2#taxrate',' ','小规模本期缴税情况单据#2#征收率','1','2','901327072176156672','zzsaccount','tcvat_xgm_current_payment','taxrate',' ',' ','if({S[SELECT count(s.frowno) FROM t_tcvat_diffdeduct s WHERE s.frowno = ''VAT_CEKCLX_009'' AND s.FORGID = ''#orgid''  AND s.FTAXPERIOD = ''#strStartPeriod'' and s.fdeadline =''#deadline'']}>0,
if({S[SELECT count(s.frowno) FROM t_tcvat_diffdeduct s WHERE s.frowno = ''VAT_CEKCLX_006'' AND s.FORGID = ''#orgid''  AND s.FTAXPERIOD = ''#strStartPeriod'' and s.fdeadline =''#deadline'']}>0,103,1),
if({S[SELECT count(s.frowno) FROM t_tcvat_diffdeduct s WHERE s.frowno = ''VAT_CEKCLX_006'' AND s.FORGID = ''#orgid''  AND s.FTAXPERIOD = ''#strStartPeriod'' and s.fdeadline =''#deadline'']}>0,3,0))'); 
DELETE FROM t_tctb_formula WHERE FID = 904080146254952448;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (904080146254952448,{ts'2022-06-13  00:00:00'},' ',' ','VAT20180101','tcvat_xgm_current_payment#10#taxrate',' ','小规模本期缴税情况单据#10#征收率','1','10','901327072176156672','zzsaccount','tcvat_xgm_current_payment','taxrate',' ',' ','if({S[SELECT count(s.frowno) FROM t_tcvat_diffdeduct s WHERE s.frowno = ''VAT_CEKCLX_009'' AND s.FORGID = ''#orgid''  AND s.FTAXPERIOD = ''#strMiddlePeriod'' and s.fdeadline =''#deadline'']}>0,
if({S[SELECT count(s.frowno) FROM t_tcvat_diffdeduct s WHERE s.frowno = ''VAT_CEKCLX_006'' AND s.FORGID = ''#orgid''  AND s.FTAXPERIOD = ''#strMiddlePeriod'' and s.fdeadline =''#deadline'']}>0,103,1),
if({S[SELECT count(s.frowno) FROM t_tcvat_diffdeduct s WHERE s.frowno = ''VAT_CEKCLX_006'' AND s.FORGID = ''#orgid''  AND s.FTAXPERIOD = ''#strMiddlePeriod'' and s.fdeadline =''#deadline'']}>0,3,0))'); 
DELETE FROM t_tctb_formula WHERE FID = 904080323195735040;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (904080323195735040,{ts'2022-06-13  00:00:00'},' ',' ','VAT20180101','tcvat_xgm_current_payment#18#taxrate',' ','小规模本期缴税情况单据#18#征收率','1','18','901327072176156672','zzsaccount','tcvat_xgm_current_payment','taxrate',' ',' ','if({S[SELECT count(s.frowno) FROM t_tcvat_diffdeduct s WHERE s.frowno = ''VAT_CEKCLX_009'' AND s.FORGID = ''#orgid''  AND s.FTAXPERIOD = ''#strEndPeriod'' and s.fdeadline =''#deadline'']}>0,
if({S[SELECT count(s.frowno) FROM t_tcvat_diffdeduct s WHERE s.frowno = ''VAT_CEKCLX_006'' AND s.FORGID = ''#orgid''  AND s.FTAXPERIOD = ''#strEndPeriod'' and s.fdeadline =''#deadline'']}>0,103,1),
if({S[SELECT count(s.frowno) FROM t_tcvat_diffdeduct s WHERE s.frowno = ''VAT_CEKCLX_006'' AND s.FORGID = ''#orgid''  AND s.FTAXPERIOD = ''#strEndPeriod'' and s.fdeadline =''#deadline'']}>0,3,0))'); 
DELETE FROM t_tctb_formula WHERE FID = 931111235393598464;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (931111235393598464,{ts'2022-06-13  00:00:00'},' ',' ','VAT20180101','tcvat_xgm_current_payment#5#taxableamount',' ','小微免税判断台账单据#5#应税销售额','1','5','901327072176156672','zzsaccount','tcvat_xgm_current_payment','taxableamount',' ',' ','if({Q[tcvat_xgm_current_payment#25#salesexcludtax]}>{P[Tax Threshold-SS]}*3,if({Q[tcvat_xgm_current_payment#25#salesexcludtax]}-{Q[tcvat_xgm_current_payment#4#salesexcludtax]}-{Q[tcvat_xgm_current_payment#12#salesexcludtax]}-{Q[tcvat_xgm_current_payment#20#salesexcludtax]}>{P[Tax Threshold-SS]}*3,{Q[tcvat_xgm_current_payment#5#salesexcludtax]},{Q[tcvat_xgm_current_payment#5#specialincludtax]}),{Q[tcvat_xgm_current_payment#5#specialincludtax]})'); 
DELETE FROM t_tctb_formula WHERE FID = 931113158758699008;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (931113158758699008,{ts'2022-06-13  00:00:00'},' ',' ','VAT20180101','tcvat_xgm_current_payment#13#taxableamount',' ','小微免税判断台账单据#13#应税销售额','1','13','901327072176156672','zzsaccount','tcvat_xgm_current_payment','taxableamount',' ',' ','if({Q[tcvat_xgm_current_payment#25#salesexcludtax]}>{P[Tax Threshold-SS]}*3,if({Q[tcvat_xgm_current_payment#25#salesexcludtax]}-{Q[tcvat_xgm_current_payment#4#salesexcludtax]}-{Q[tcvat_xgm_current_payment#12#salesexcludtax]}-{Q[tcvat_xgm_current_payment#20#salesexcludtax]}>{P[Tax Threshold-SS]}*3,{Q[tcvat_xgm_current_payment#13#salesexcludtax]},{Q[tcvat_xgm_current_payment#13#specialincludtax]}),{Q[tcvat_xgm_current_payment#13#specialincludtax]})'); 
DELETE FROM t_tctb_formula WHERE FID = 931116194755425280;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (931116194755425280,{ts'2022-06-13  00:00:00'},' ',' ','VAT20180101','tcvat_xgm_current_payment#21#taxableamount',' ','小微免税判断台账单据#21#应税销售额','1','21','901327072176156672','zzsaccount','tcvat_xgm_current_payment','taxableamount',' ',' ','if({Q[tcvat_xgm_current_payment#25#salesexcludtax]}>{P[Tax Threshold-SS]}*3,if({Q[tcvat_xgm_current_payment#25#salesexcludtax]}-{Q[tcvat_xgm_current_payment#4#salesexcludtax]}-{Q[tcvat_xgm_current_payment#12#salesexcludtax]}-{Q[tcvat_xgm_current_payment#20#salesexcludtax]}>{P[Tax Threshold-SS]}*3,{Q[tcvat_xgm_current_payment#21#salesexcludtax]},{Q[tcvat_xgm_current_payment#21#specialincludtax]}),{Q[tcvat_xgm_current_payment#21#specialincludtax]})'); 
DELETE FROM t_tctb_formula WHERE FID = 931117637990265856;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (931117637990265856,{ts'2022-06-13  00:00:00'},' ',' ','VAT20180101','tcvat_xgm_current_payment#5#taxfreeamount',' ','小微免税判断台账单据#5#免税销售额','1','5','901327072176156672','zzsaccount','tcvat_xgm_current_payment','taxfreeamount',' ',' ','if({Q[tcvat_xgm_current_payment#25#salesexcludtax]}>{P[Tax Threshold-SS]}*3,if({Q[tcvat_xgm_current_payment#25#salesexcludtax]}-{Q[tcvat_xgm_current_payment#4#salesexcludtax]}-{Q[tcvat_xgm_current_payment#12#salesexcludtax]}-{Q[tcvat_xgm_current_payment#20#salesexcludtax]}>{P[Tax Threshold-SS]}*3,0,{Q[tcvat_xgm_current_payment#5#salesexcludtax]}-{Q[tcvat_xgm_current_payment#5#taxableamount]}),{Q[tcvat_xgm_current_payment#5#salesexcludtax]}-{Q[tcvat_xgm_current_payment#5#taxableamount]})'); 
DELETE FROM t_tctb_formula WHERE FID = 931118493770888192;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (931118493770888192,{ts'2022-06-13  00:00:00'},' ',' ','VAT20180101','tcvat_xgm_current_payment#13#taxfreeamount',' ','小微免税判断台账单据#13#免税销售额','1','13','901327072176156672','zzsaccount','tcvat_xgm_current_payment','taxfreeamount',' ',' ','if({Q[tcvat_xgm_current_payment#25#salesexcludtax]}>{P[Tax Threshold-SS]}*3,if({Q[tcvat_xgm_current_payment#25#salesexcludtax]}-{Q[tcvat_xgm_current_payment#4#salesexcludtax]}-{Q[tcvat_xgm_current_payment#12#salesexcludtax]}-{Q[tcvat_xgm_current_payment#20#salesexcludtax]}>{P[Tax Threshold-SS]}*3,0,{Q[tcvat_xgm_current_payment#13#salesexcludtax]}-{Q[tcvat_xgm_current_payment#13#taxableamount]}),{Q[tcvat_xgm_current_payment#13#salesexcludtax]}-{Q[tcvat_xgm_current_payment#13#taxableamount]})'); 
DELETE FROM t_tctb_formula WHERE FID = 931119214595477504;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (931119214595477504,{ts'2022-06-13  00:00:00'},' ',' ','VAT20180101','tcvat_xgm_current_payment#21#taxfreeamount',' ','小微免税判断台账单据#21#免税销售额','1','21','901327072176156672','zzsaccount','tcvat_xgm_current_payment','taxfreeamount',' ',' ','if({Q[tcvat_xgm_current_payment#25#salesexcludtax]}>{P[Tax Threshold-SS]}*3,if({Q[tcvat_xgm_current_payment#25#salesexcludtax]}-{Q[tcvat_xgm_current_payment#4#salesexcludtax]}-{Q[tcvat_xgm_current_payment#12#salesexcludtax]}-{Q[tcvat_xgm_current_payment#20#salesexcludtax]}>{P[Tax Threshold-SS]}*3,0,{Q[tcvat_xgm_current_payment#21#salesexcludtax]}-{Q[tcvat_xgm_current_payment#21#taxableamount]}),{Q[tcvat_xgm_current_payment#21#salesexcludtax]}-{Q[tcvat_xgm_current_payment#21#taxableamount]})'); 
