DELETE FROM t_tctb_formula WHERE FID = 1012329939032391680;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1012329939032391680,{ts'2020-12-23  00:00:00'},' ',' ','VAT_PRE_201904','tcvat_prepay#2#crossclaim',' ','增值税预缴税款表#2#扣除金额','1','2','1012120395395992576','zzsyjskb','tcvat_prepay','crossclaim',' ',' ','{S[SELECT fdeductionamount  FROM T_TCVAT_PROJECT_ACCOUNT WHERE forgid = ''#orgid'' AND fprojectid= ''#projectid'' AND fprepaytype IN (''VAT_YJXMLX_003'',''VAT_YJXMLX_004'') AND fstartdate= to_date(''#startDate'') AND fenddate = to_date(''#endDate'') and fdeclareserialno = ''#declareserialno'' ]}'); 
DELETE FROM t_tctb_formula WHERE FID = 1012967029013224448;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1012967029013224448,{ts'2020-12-23  00:00:00'},' ',' ','VAT_PRE_201904','tcvat_prepay#1#advanceamount',' ','增值税预缴税款表#1#预征税额','1','1','1012120395395992576','zzsyjskb','tcvat_prepay','advanceamount',' ',' ','#if(''{S[SELECT a.flevytype FROM T_TCVAT_PROJECT_ACCOUNT a WHERE a.fprojectid= ''#projectid'' AND a.forgid = ''#orgid'' and a.fstartdate= to_date(''#startDate'') AND a.fenddate = to_date(''#endDate'') and a.fdeclareserialno = ''#declareserialno'']}'' == ''normal'')  ({Q[tcvat_prepay#1#sale]}-{Q[tcvat_prepay#1#crossclaim]})/1.09*{Q[tcvat_prepay#1#advancescale]}/100  #else  #if(''{C[#type]}'' == ''0'') ({Q[tcvat_prepay#1#sale]}-{Q[tcvat_prepay#1#crossclaim]})/1.03*{Q[tcvat_prepay#1#advancescale]}/100 #else  ({Q[tcvat_prepay#1#sale]}-{Q[tcvat_prepay#1#crossclaim]})/1.01*{Q[tcvat_prepay#1#advancescale]}/100   #end  #end'); 
DELETE FROM t_tctb_formula WHERE FID = 1012979640354096128;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1012979640354096128,{ts'2020-12-23  00:00:00'},' ',' ','VAT_PRE_201904','tcvat_prepay#2#advanceamount',' ','增值税预缴税款表#2#预征税额','1','2','1012120395395992576','zzsyjskb','tcvat_prepay','advanceamount',' ',' ','#if(''{S[SELECT a.fprepaytype FROM T_TCVAT_PROJECT_ACCOUNT a WHERE a.fprojectid= ''#projectid'' AND a.forgid = ''#orgid'' and a.fstartdate= to_date(''#startDate'') AND a.fenddate = to_date(''#endDate'') and a.fdeclareserialno = ''#declareserialno'']}'' == ''VAT_YJXMLX_003'')  #if(''{S[SELECT a.flevytype FROM T_TCVAT_PROJECT_ACCOUNT a WHERE a.fprojectid= ''#projectid'' AND a.forgid = ''#orgid'' and a.fstartdate= to_date(''#startDate'') AND a.fenddate = to_date(''#endDate'') and a.fdeclareserialno = ''#declareserialno'']}'' == ''normal'')  {Q[tcvat_prepay#2#sale]}/1.09*{Q[tcvat_prepay#2#advancescale]}/100 #else  {Q[tcvat_prepay#2#sale]}/1.05*{Q[tcvat_prepay#2#advancescale]}/100  #end  #else #if(''{S[SELECT a.fprepaytype FROM T_TCVAT_PROJECT_ACCOUNT a WHERE a.fprojectid= ''#projectid'' AND a.forgid = ''#orgid'' and a.fstartdate= to_date(''#startDate'') AND a.fenddate = to_date(''#endDate'') and a.fdeclareserialno = ''#declareserialno'']}'' == ''VAT_YJXMLX_004'')   ({Q[tcvat_prepay#2#sale]}-{Q[tcvat_prepay#2#crossclaim]})/1.05*{Q[tcvat_prepay#2#advancescale]} /100#else 0 #end  #end'); 
DELETE FROM t_tctb_formula WHERE FID = 1102879354490445824;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1102879354490445824,{ts'2022-04-28  00:00:00'},' ',' ','VAT_DRAFT_YBNSR_01','tcvat_zlb_ybnsr#31#ybxm',' ','增值税一般纳税人总览表#31#一般项目','1','31','1102685677520327680','draft_zzsybnsr','tcvat_zlb_ybnsr','ybxm',' ',' ','{S[SELECT sum(fyjsjje) FROM t_tctb_declare_entry WHERE fid IN (SELECT fid FROM t_tcvat_prepay_declare WHERE fskssqq>=to_date(''#prestartDate'') AND fskssqz<=to_date(''#endDate'') AND forgid=''#orgid'' AND fpaystatus=''1'' AND  fdeductionperiod=''0'') AND ftaxtype=''1'']}'); 
DELETE FROM t_tctb_formula WHERE FID = 1327541435825658880;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1327541435825658880,{ts'2022-01-06  00:00:00'},' ',' ','VAT_PRE_202108','tcvat_prepay#4#sfsyybjsff',' ',' ','1','4','1327514460772141056','zzsyjskb','tcvat_prepay','sfsyybjsff',' ',' ','#if(''{S[SELECT a.flevytype FROM T_TCVAT_PROJECT_ACCOUNT a WHERE a.fprojectid= ''#projectid'' AND a.forgid = ''#orgid'' and a.fstartdate= to_date(''#startDate'') AND a.fenddate = to_date(''#endDate'') and a.fdeclareserialno = ''#declareserialno'']}'' == ''normal'') 1 #else 0 #end'); 
DELETE FROM t_tctb_formula WHERE FID = 1335314214612404224;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1335314214612404224,{ts'2022-02-17  00:00:00'},' ',' ','VAT_DRAFT_XGMNSR_01','tcvat_zlb_xgmnsr#9#fwbdcwxzc',' ',' ','1','9','1105045617790692352','draft_zzsxgmnsr','tcvat_zlb_xgmnsr','fwbdcwxzc',' ',' ','{S[SELECT sum(fyjsjje) FROM t_tctb_declare_entry WHERE fid IN (SELECT fid FROM t_tcvat_prepay_declare WHERE fskssqq>=to_date(''#prestartDate'') AND fskssqz<=to_date(''#endDate'') and forgid=''#orgid'' AND fpaystatus=''1'' AND  fdeductionperiod=''0'') AND ftaxtype=''1'']}');
DELETE FROM t_tctb_formula WHERE FID = 1386788771537664005;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1386788771537664005,{ts'2022-03-29  00:00:00'},' ',' ','VAT_PRE_202206','tcvat_prepay#1#sale',' ',' ','1','1','1386788769012694016','zzsyjskb','tcvat_prepay','sale',' ',' ','{S[SELECT fsalesamount FROM T_TCVAT_PROJECT_ACCOUNT WHERE forgid = ''#orgid'' AND fprojectid= ''#projectid'' AND fprepaytype IN (''VAT_YJXMLX_001'',''VAT_YJXMLX_002'') AND fstartdate= to_date(''#startDate'') AND fenddate = to_date(''#endDate'') and fdeclareserialno = ''#declareserialno'' ]}'); 
DELETE FROM t_tctb_formula WHERE FID = 1386788771537664006;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1386788771537664006,{ts'2022-03-29  00:00:00'},' ',' ','VAT_PRE_202206','tcvat_prepay#2#sale',' ',' ','1','2','1386788769012694016','zzsyjskb','tcvat_prepay','sale',' ',' ','{S[SELECT fsalesamount FROM T_TCVAT_PROJECT_ACCOUNT WHERE forgid = ''#orgid'' AND fprojectid= ''#projectid'' AND fprepaytype IN (''VAT_YJXMLX_003'',''VAT_YJXMLX_004'') AND fstartdate= to_date(''#startDate'') AND fenddate = to_date(''#endDate'') and fdeclareserialno = ''#declareserialno'' ]}'); 
DELETE FROM t_tctb_formula WHERE FID = 1386788771537664007;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1386788771537664007,{ts'2022-03-29  00:00:00'},' ',' ','VAT_PRE_202206','tcvat_prepay#3#sale',' ',' ','1','3','1386788769012694016','zzsyjskb','tcvat_prepay','sale',' ',' ','{S[SELECT fsalesamount FROM T_TCVAT_PROJECT_ACCOUNT WHERE forgid = ''#orgid'' AND fprojectid= ''#projectid'' AND fprepaytype=''VAT_YJXMLX_005'' AND fstartdate= to_date(''#startDate'') AND fenddate = to_date(''#endDate'') and fdeclareserialno = ''#declareserialno'' ]}'); 
DELETE FROM t_tctb_formula WHERE FID = 1386788771537664009;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1386788771537664009,{ts'2022-03-29  00:00:00'},' ',' ','VAT_PRE_202206','tcvat_prepay#1#crossclaim',' ',' ','1','1','1386788769012694016','zzsyjskb','tcvat_prepay','crossclaim',' ',' ','{S[SELECT fdeductionamount FROM T_TCVAT_PROJECT_ACCOUNT WHERE forgid = ''#orgid'' AND fprojectid= ''#projectid'' AND fprepaytype IN (''VAT_YJXMLX_001'',''VAT_YJXMLX_002'') AND fstartdate= to_date(''#startDate'') AND fenddate = to_date(''#endDate'') and fdeclareserialno = ''#declareserialno'' ]}'); 
DELETE FROM t_tctb_formula WHERE FID = 1386788771537664010;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1386788771537664010,{ts'2022-03-29  00:00:00'},' ',' ','VAT_PRE_202206','tcvat_prepay#2#crossclaim',' ',' ','1','2','1386788769012694016','zzsyjskb','tcvat_prepay','crossclaim',' ',' ','{S[SELECT fdeductionamount  FROM T_TCVAT_PROJECT_ACCOUNT WHERE forgid = ''#orgid'' AND fprojectid= ''#projectid'' AND fprepaytype IN (''VAT_YJXMLX_003'',''VAT_YJXMLX_004'') AND fstartdate= to_date(''#startDate'') AND fenddate = to_date(''#endDate'') and fdeclareserialno = ''#declareserialno'' ]}'); 
DELETE FROM t_tctb_formula WHERE FID = 1386788771537664016;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1386788771537664016,{ts'2022-03-29  00:00:00'},' ',' ','VAT_PRE_202206','tcvat_prepay#1#advanceamount',' ',' ','1','1','1386788769012694016','zzsyjskb','tcvat_prepay','advanceamount',' ',' ','#if(''{S[SELECT a.flevytype FROM T_TCVAT_PROJECT_ACCOUNT a WHERE a.fprojectid= ''#projectid'' AND a.forgid = ''#orgid'' and a.fstartdate= to_date(''#startDate'') AND a.fenddate = to_date(''#endDate'') and a.fdeclareserialno = ''#declareserialno'']}'' == ''normal'')  ({Q[tcvat_prepay#1#sale]}-{Q[tcvat_prepay#1#crossclaim]})/1.09*{Q[tcvat_prepay#1#advancescale]}/100  #else  #if(''{C[#type]}'' == ''0'') ({Q[tcvat_prepay#1#sale]}-{Q[tcvat_prepay#1#crossclaim]})/1.03*{Q[tcvat_prepay#1#advancescale]}/100 #else  ({Q[tcvat_prepay#1#sale]}-{Q[tcvat_prepay#1#crossclaim]})/1.01*{Q[tcvat_prepay#1#advancescale]}/100   #end  #end'); 
DELETE FROM t_tctb_formula WHERE FID = 1386788771537664017;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1386788771537664017,{ts'2022-03-29  00:00:00'},' ',' ','VAT_PRE_202206','tcvat_prepay#2#advanceamount',' ',' ','1','2','1386788769012694016','zzsyjskb','tcvat_prepay','advanceamount',' ',' ','#if(''{S[SELECT a.fprepaytype FROM T_TCVAT_PROJECT_ACCOUNT a WHERE a.fprojectid= ''#projectid'' AND a.forgid = ''#orgid'' and a.fstartdate= to_date(''#startDate'') AND a.fenddate = to_date(''#endDate'') and a.fdeclareserialno = ''#declareserialno'']}'' == ''VAT_YJXMLX_003'')  #if(''{S[SELECT a.flevytype FROM T_TCVAT_PROJECT_ACCOUNT a WHERE a.fprojectid= ''#projectid'' AND a.forgid = ''#orgid'' and a.fstartdate= to_date(''#startDate'') AND a.fenddate = to_date(''#endDate'') and a.fdeclareserialno = ''#declareserialno'']}'' == ''normal'')  {Q[tcvat_prepay#2#sale]}/1.09*{Q[tcvat_prepay#2#advancescale]}/100 #else  {Q[tcvat_prepay#2#sale]}/1.05*{Q[tcvat_prepay#2#advancescale]}/100  #end  #else #if(''{S[SELECT a.fprepaytype FROM T_TCVAT_PROJECT_ACCOUNT a WHERE a.fprojectid= ''#projectid'' AND a.forgid = ''#orgid'' and a.fstartdate= to_date(''#startDate'') AND a.fenddate = to_date(''#endDate'') and a.fdeclareserialno = ''#declareserialno'']}'' == ''VAT_YJXMLX_004'')   ({Q[tcvat_prepay#2#sale]}-{Q[tcvat_prepay#2#crossclaim]})/1.05*{Q[tcvat_prepay#2#advancescale]} /100#else 0 #end  #end'); 
DELETE FROM t_tctb_formula WHERE FID = 1119527547147662336;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1119527547147662336,{ts'2021-03-26  00:00:00'},' ',' ','VAT_DRAFT_YBNSR_YBHZ_01','tcvat_zlb_ybnsr_ybhz_fpb#1#org',' ','增值税汇总一般企业分配表#1#组织','4','1','1119375361449286656','draft_zzsybnsr_ybhz','tcvat_zlb_ybnsr_ybhz_fpb','org',' ',' ','{S[SELECT fassignorg FROM t_tcvat_ybhz_assign WHERE fid IN (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate''))  and fseq = 1]}'); 
DELETE FROM t_tctb_formula WHERE FID = 1119527642324812800;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1119527642324812800,{ts'2021-03-26  00:00:00'},' ',' ','VAT_DRAFT_YBNSR_YBHZ_01','tcvat_zlb_ybnsr_ybhz_fpb#2#org',' ','增值税汇总一般企业分配表#2#组织','4','2','1119375361449286656','draft_zzsybnsr_ybhz','tcvat_zlb_ybnsr_ybhz_fpb','org',' ',' ','{S[SELECT fassignorg FROM t_tcvat_ybhz_assign WHERE fid IN (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate''))  and fseq = 2]}'); 
DELETE FROM t_tctb_formula WHERE FID = 1119527812076680192;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1119527812076680192,{ts'2021-03-26  00:00:00'},' ',' ','VAT_DRAFT_YBNSR_YBHZ_01','tcvat_zlb_ybnsr_ybhz_fpb#3#org',' ','增值税汇总一般企业分配表#3#组织','4','3','1119375361449286656','draft_zzsybnsr_ybhz','tcvat_zlb_ybnsr_ybhz_fpb','org',' ',' ','{S[SELECT fassignorg FROM t_tcvat_ybhz_assign WHERE fid IN (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate''))  and fseq = 3]}'); 
DELETE FROM t_tctb_formula WHERE FID = 1119527873472906240;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1119527873472906240,{ts'2021-03-26  00:00:00'},' ',' ','VAT_DRAFT_YBNSR_YBHZ_01','tcvat_zlb_ybnsr_ybhz_fpb#4#org',' ','增值税汇总一般企业分配表#4#组织','4','4','1119375361449286656','draft_zzsybnsr_ybhz','tcvat_zlb_ybnsr_ybhz_fpb','org',' ',' ','{S[SELECT fassignorg FROM t_tcvat_ybhz_assign WHERE fid IN (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate''))  and fseq = 4]}'); 
DELETE FROM t_tctb_formula WHERE FID = 1119527931547235328;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1119527931547235328,{ts'2021-03-26  00:00:00'},' ',' ','VAT_DRAFT_YBNSR_YBHZ_01','tcvat_zlb_ybnsr_ybhz_fpb#5#org',' ','增值税汇总一般企业分配表#5#组织','4','5','1119375361449286656','draft_zzsybnsr_ybhz','tcvat_zlb_ybnsr_ybhz_fpb','org',' ',' ','{S[SELECT fassignorg FROM t_tcvat_ybhz_assign WHERE fid IN (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate''))  and fseq = 5]}'); 
DELETE FROM t_tctb_formula WHERE FID = 1119528019736675328;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1119528019736675328,{ts'2021-03-26  00:00:00'},' ',' ','VAT_DRAFT_YBNSR_YBHZ_01','tcvat_zlb_ybnsr_ybhz_fpb#6#org',' ','增值税汇总一般企业分配表#6#组织','4','6','1119375361449286656','draft_zzsybnsr_ybhz','tcvat_zlb_ybnsr_ybhz_fpb','org',' ',' ','{S[SELECT fassignorg FROM t_tcvat_ybhz_assign WHERE fid IN (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate''))  and fseq = 6]}'); 
DELETE FROM t_tctb_formula WHERE FID = 1120280411721904128;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1120280411721904128,{ts'2021-04-08  00:00:00'},' ',' ','VAT_DRAFT_YBNSR_YBHZ_01','tcvat_zlb_ybnsr_ybhz_fpb#1#xssr','① 带着每一行的【组织】，去第一步政策确认中取“收入归属组织”= 该行【组织】的所有收入取数规则，假设有10个规则 ② 在这10个规则中筛选商品税收分类编码以1、2开头且即征即退=否的所有取数规则，假设有6个 ③ 带着这6个规则去第二步计税台账的“收入明细台账”中取其“开票收入和未开票收入”的合计行的金额。 销售收入 = ③的合计金额','增值税汇总一般企业分配表#1#一般货物及劳务销售收入','1','1','1119375361449286656','draft_zzsybnsr_ybhz','tcvat_zlb_ybnsr_ybhz_fpb','xssr',' ',' ','{S[SELECT SUM(s.ftaxamount) FROM t_tcvat_hz_account_summar s,t_tpo_taxitemrateentry t WHERE s.FBUSINESSTYPEID = t.FENTRYID AND ( t.fmergecode LIKE ''1%'' OR t.fmergecode LIKE ''2%'') AND s.fjzjt= ''0'' AND s.fsuborgid =(SELECT fassignorg FROM t_tcvat_ybhz_assign WHERE fid IN (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate''))  and fseq = 1)  AND s.fstartdate = to_date(''#startDate'') AND s.fenddate = to_date(''#endDate'') AND s.ftaxpayertype = ''#taxpayertype''  AND s.fruleid IN (SELECT fruleid FROM t_tcvat_ybhz_income WHERE fid IN (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate'')) AND fbelongsorg = (SELECT fassignorg FROM t_tcvat_ybhz_assign WHERE fid IN (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate''))  and fseq = 1))]}'); 
DELETE FROM t_tctb_formula WHERE FID = 1120282558727634944;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1120282558727634944,{ts'2021-04-08  00:00:00'},' ',' ','VAT_DRAFT_YBNSR_YBHZ_01','tcvat_zlb_ybnsr_ybhz_fpb#2#xssr',' ','增值税汇总一般企业分配表#2#一般货物及劳务销售收入','1','2','1119375361449286656','draft_zzsybnsr_ybhz','tcvat_zlb_ybnsr_ybhz_fpb','xssr',' ',' ','{S[SELECT SUM(s.ftaxamount) FROM t_tcvat_hz_account_summar s,t_tpo_taxitemrateentry t WHERE s.FBUSINESSTYPEID = t.FENTRYID AND ( t.fmergecode LIKE ''1%'' OR t.fmergecode LIKE ''2%'') AND s.fjzjt= ''0'' AND s.fsuborgid =(SELECT fassignorg FROM t_tcvat_ybhz_assign WHERE fid IN (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate''))  and fseq = 2) AND s.fstartdate = to_date(''#startDate'') AND s.fenddate = to_date(''#endDate'') AND s.ftaxpayertype = ''#taxpayertype''  AND s.fruleid IN (SELECT fruleid FROM t_tcvat_ybhz_income WHERE fid IN (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate'')) AND fbelongsorg = (SELECT fassignorg FROM t_tcvat_ybhz_assign WHERE fid IN (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate''))  and fseq = 2))]}'); 
DELETE FROM t_tctb_formula WHERE FID = 1120283180415528960;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1120283180415528960,{ts'2021-04-08  00:00:00'},' ',' ','VAT_DRAFT_YBNSR_YBHZ_01','tcvat_zlb_ybnsr_ybhz_fpb#3#xssr',' ','增值税汇总一般企业分配表#3#一般货物及劳务销售收入','1','3','1119375361449286656','draft_zzsybnsr_ybhz','tcvat_zlb_ybnsr_ybhz_fpb','xssr',' ',' ','{S[SELECT SUM(s.ftaxamount) FROM t_tcvat_hz_account_summar s,t_tpo_taxitemrateentry t WHERE s.FBUSINESSTYPEID = t.FENTRYID AND ( t.fmergecode LIKE ''1%'' OR t.fmergecode LIKE ''2%'') AND s.fjzjt= ''0'' AND s.fsuborgid =(SELECT fassignorg FROM t_tcvat_ybhz_assign WHERE fid IN (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate''))  and fseq = 3) AND s.fstartdate = to_date(''#startDate'') AND s.fenddate = to_date(''#endDate'') AND s.ftaxpayertype = ''#taxpayertype''  AND s.fruleid IN (SELECT fruleid FROM t_tcvat_ybhz_income WHERE fid IN (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate'')) AND fbelongsorg = (SELECT fassignorg FROM t_tcvat_ybhz_assign WHERE fid IN (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate''))  and fseq = 3))]}'); 
DELETE FROM t_tctb_formula WHERE FID = 1120283258077495296;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1120283258077495296,{ts'2021-04-08  00:00:00'},' ',' ','VAT_DRAFT_YBNSR_YBHZ_01','tcvat_zlb_ybnsr_ybhz_fpb#4#xssr',' ','增值税汇总一般企业分配表#4#一般货物及劳务销售收入','1','4','1119375361449286656','draft_zzsybnsr_ybhz','tcvat_zlb_ybnsr_ybhz_fpb','xssr',' ',' ','{S[SELECT SUM(s.ftaxamount) FROM t_tcvat_hz_account_summar s,t_tpo_taxitemrateentry t WHERE s.FBUSINESSTYPEID = t.FENTRYID AND ( t.fmergecode LIKE ''1%'' OR t.fmergecode LIKE ''2%'') AND s.fjzjt= ''0'' AND s.fsuborgid =(SELECT fassignorg FROM t_tcvat_ybhz_assign WHERE fid IN (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate''))  and fseq = 4) AND s.fstartdate = to_date(''#startDate'') AND s.fenddate = to_date(''#endDate'') AND s.ftaxpayertype = ''#taxpayertype''  AND s.fruleid IN (SELECT fruleid FROM t_tcvat_ybhz_income WHERE fid IN (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate'')) AND fbelongsorg = (SELECT fassignorg FROM t_tcvat_ybhz_assign WHERE fid IN (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate''))  and fseq = 4))]}'); 
DELETE FROM t_tctb_formula WHERE FID = 1120283403988942848;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1120283403988942848,{ts'2021-04-08  00:00:00'},' ',' ','VAT_DRAFT_YBNSR_YBHZ_01','tcvat_zlb_ybnsr_ybhz_fpb#6#xssr',' ','增值税汇总一般企业分配表#6#一般货物及劳务销售收入','1','6','1119375361449286656','draft_zzsybnsr_ybhz','tcvat_zlb_ybnsr_ybhz_fpb','xssr',' ',' ','{S[SELECT SUM(s.ftaxamount) FROM t_tcvat_hz_account_summar s,t_tpo_taxitemrateentry t WHERE s.FBUSINESSTYPEID = t.FENTRYID AND ( t.fmergecode LIKE ''1%'' OR t.fmergecode LIKE ''2%'') AND s.fjzjt= ''0'' AND s.fsuborgid =(SELECT fassignorg FROM t_tcvat_ybhz_assign WHERE fid IN (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate''))  and fseq = 6) AND s.fstartdate = to_date(''#startDate'') AND s.fenddate = to_date(''#endDate'') AND s.ftaxpayertype = ''#taxpayertype''  AND s.fruleid IN (SELECT fruleid FROM t_tcvat_ybhz_income WHERE fid IN (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate'')) AND fbelongsorg = (SELECT fassignorg FROM t_tcvat_ybhz_assign WHERE fid IN (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate''))  and fseq = 6))]}'); 
DELETE FROM t_tctb_formula WHERE FID = 1120284011147767808;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1120284011147767808,{ts'2021-04-08  00:00:00'},' ',' ','VAT_DRAFT_YBNSR_YBHZ_01','tcvat_zlb_ybnsr_ybhz_fpb#1#jzjtxssr',' ','增值税汇总一般企业分配表#1#一般货物及劳务即征即退销售收入','1','1','1119375361449286656','draft_zzsybnsr_ybhz','tcvat_zlb_ybnsr_ybhz_fpb','jzjtxssr',' ',' ','{S[SELECT SUM(s.ftaxamount) FROM t_tcvat_hz_account_summar s,t_tpo_taxitemrateentry t WHERE s.FBUSINESSTYPEID = t.FENTRYID AND ( t.fmergecode LIKE ''1%'' OR t.fmergecode LIKE ''2%'') AND s.fjzjt= ''1'' AND s.fsuborgid =(SELECT fassignorg FROM t_tcvat_ybhz_assign WHERE fid IN (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate''))  and fseq = 1) AND s.fstartdate = to_date(''#startDate'') AND s.fenddate = to_date(''#endDate'') AND s.ftaxpayertype = ''#taxpayertype''  AND s.fruleid IN (SELECT fruleid FROM t_tcvat_ybhz_income WHERE fid IN (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate'')) AND fbelongsorg = (SELECT fassignorg FROM t_tcvat_ybhz_assign WHERE fid IN (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate''))  and fseq = 1))]}'); 
DELETE FROM t_tctb_formula WHERE FID = 1120284156228976640;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1120284156228976640,{ts'2021-04-08  00:00:00'},' ',' ','VAT_DRAFT_YBNSR_YBHZ_01','tcvat_zlb_ybnsr_ybhz_fpb#2#jzjtxssr',' ','增值税汇总一般企业分配表#2#一般货物及劳务即征即退销售收入','1','2','1119375361449286656','draft_zzsybnsr_ybhz','tcvat_zlb_ybnsr_ybhz_fpb','jzjtxssr',' ',' ','{S[SELECT SUM(s.ftaxamount) FROM t_tcvat_hz_account_summar s,t_tpo_taxitemrateentry t WHERE s.FBUSINESSTYPEID = t.FENTRYID AND ( t.fmergecode LIKE ''1%'' OR t.fmergecode LIKE ''2%'') AND s.fjzjt= ''1'' AND s.fsuborgid =(SELECT fassignorg FROM t_tcvat_ybhz_assign WHERE fid IN (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate''))  and fseq = 2) AND s.fstartdate = to_date(''#startDate'') AND s.fenddate = to_date(''#endDate'') AND s.ftaxpayertype = ''#taxpayertype''  AND s.fruleid IN (SELECT fruleid FROM t_tcvat_ybhz_income WHERE fid IN (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate'')) AND fbelongsorg = (SELECT fassignorg FROM t_tcvat_ybhz_assign WHERE fid IN (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate''))  and fseq = 2))]}'); 
DELETE FROM t_tctb_formula WHERE FID = 1120284271387553792;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1120284271387553792,{ts'2021-04-08  00:00:00'},' ',' ','VAT_DRAFT_YBNSR_YBHZ_01','tcvat_zlb_ybnsr_ybhz_fpb#3#jzjtxssr',' ','增值税汇总一般企业分配表#3#一般货物及劳务即征即退销售收入','1','3','1119375361449286656','draft_zzsybnsr_ybhz','tcvat_zlb_ybnsr_ybhz_fpb','jzjtxssr',' ',' ','{S[SELECT SUM(s.ftaxamount) FROM t_tcvat_hz_account_summar s,t_tpo_taxitemrateentry t WHERE s.FBUSINESSTYPEID = t.FENTRYID AND ( t.fmergecode LIKE ''1%'' OR t.fmergecode LIKE ''2%'') AND s.fjzjt= ''1'' AND s.fsuborgid =(SELECT fassignorg FROM t_tcvat_ybhz_assign WHERE fid IN (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate''))  and fseq = 3) AND s.fstartdate = to_date(''#startDate'') AND s.fenddate = to_date(''#endDate'') AND s.ftaxpayertype = ''#taxpayertype''  AND s.fruleid IN (SELECT fruleid FROM t_tcvat_ybhz_income WHERE fid IN (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate'')) AND fbelongsorg = (SELECT fassignorg FROM t_tcvat_ybhz_assign WHERE fid IN (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate''))  and fseq = 3))]}'); 
DELETE FROM t_tctb_formula WHERE FID = 1120284359333953536;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1120284359333953536,{ts'2021-04-08  00:00:00'},' ',' ','VAT_DRAFT_YBNSR_YBHZ_01','tcvat_zlb_ybnsr_ybhz_fpb#4#jzjtxssr',' ','增值税汇总一般企业分配表#4#一般货物及劳务即征即退销售收入','1','4','1119375361449286656','draft_zzsybnsr_ybhz','tcvat_zlb_ybnsr_ybhz_fpb','jzjtxssr',' ',' ','{S[SELECT SUM(s.ftaxamount) FROM t_tcvat_hz_account_summar s,t_tpo_taxitemrateentry t WHERE s.FBUSINESSTYPEID = t.FENTRYID AND ( t.fmergecode LIKE ''1%'' OR t.fmergecode LIKE ''2%'') AND s.fjzjt= ''1'' AND s.fsuborgid =(SELECT fassignorg FROM t_tcvat_ybhz_assign WHERE fid IN (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate''))  and fseq = 4) AND s.fstartdate = to_date(''#startDate'') AND s.fenddate = to_date(''#endDate'') AND s.ftaxpayertype = ''#taxpayertype''  AND s.fruleid IN (SELECT fruleid FROM t_tcvat_ybhz_income WHERE fid IN (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate'')) AND fbelongsorg = (SELECT fassignorg FROM t_tcvat_ybhz_assign WHERE fid IN (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate''))  and fseq = 4))]}'); 
DELETE FROM t_tctb_formula WHERE FID = 1120284516611964928;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1120284516611964928,{ts'2021-04-08  00:00:00'},' ',' ','VAT_DRAFT_YBNSR_YBHZ_01','tcvat_zlb_ybnsr_ybhz_fpb#6#jzjtxssr',' ','增值税汇总一般企业分配表#6#一般货物及劳务即征即退销售收入','1','6','1119375361449286656','draft_zzsybnsr_ybhz','tcvat_zlb_ybnsr_ybhz_fpb','jzjtxssr',' ',' ','{S[SELECT SUM(s.ftaxamount) FROM t_tcvat_hz_account_summar s,t_tpo_taxitemrateentry t WHERE s.FBUSINESSTYPEID = t.FENTRYID AND ( t.fmergecode LIKE ''1%'' OR t.fmergecode LIKE ''2%'') AND s.fjzjt= ''1'' AND s.fsuborgid =(SELECT fassignorg FROM t_tcvat_ybhz_assign WHERE fid IN (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate''))  and fseq = 6) AND s.fstartdate = to_date(''#startDate'') AND s.fenddate = to_date(''#endDate'') AND s.ftaxpayertype = ''#taxpayertype''  AND s.fruleid IN (SELECT fruleid FROM t_tcvat_ybhz_income WHERE fid IN (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate'')) AND fbelongsorg = (SELECT fassignorg FROM t_tcvat_ybhz_assign WHERE fid IN (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate''))  and fseq = 6))]}'); 
DELETE FROM t_tctb_formula WHERE FID = 1120285193488510976;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1120285193488510976,{ts'2021-04-08  00:00:00'},' ',' ','VAT_DRAFT_YBNSR_YBHZ_01','tcvat_zlb_ybnsr_ybhz_fpb#1#ysfwxssr',' ','增值税汇总一般企业分配表#1#应税服务销售收入','1','1','1119375361449286656','draft_zzsybnsr_ybhz','tcvat_zlb_ybnsr_ybhz_fpb','ysfwxssr',' ',' ','{S[SELECT SUM(s.ftaxamount) FROM t_tcvat_hz_account_summar s,t_tpo_taxitemrateentry t WHERE s.FBUSINESSTYPEID = t.FENTRYID AND ( t.fmergecode LIKE ''3%'' OR t.fmergecode LIKE ''4%''  OR t.fmergecode LIKE ''5%'') AND s.fjzjt= ''0'' AND s.fsuborgid =(SELECT fassignorg FROM t_tcvat_ybhz_assign WHERE fid IN (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate''))  and fseq = 1) AND s.fstartdate = to_date(''#startDate'') AND s.fenddate = to_date(''#endDate'') AND s.ftaxpayertype = ''#taxpayertype''  AND s.fruleid IN (SELECT fruleid FROM t_tcvat_ybhz_income WHERE fid IN (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate'')) AND fbelongsorg = (SELECT fassignorg FROM t_tcvat_ybhz_assign WHERE fid IN (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate''))  and fseq = 1))]}'); 
DELETE FROM t_tctb_formula WHERE FID = 1120285268977827840;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1120285268977827840,{ts'2021-04-08  00:00:00'},' ',' ','VAT_DRAFT_YBNSR_YBHZ_01','tcvat_zlb_ybnsr_ybhz_fpb#2#ysfwxssr',' ','增值税汇总一般企业分配表#2#应税服务销售收入','1','2','1119375361449286656','draft_zzsybnsr_ybhz','tcvat_zlb_ybnsr_ybhz_fpb','ysfwxssr',' ',' ','{S[SELECT SUM(s.ftaxamount) FROM t_tcvat_hz_account_summar s,t_tpo_taxitemrateentry t WHERE s.FBUSINESSTYPEID = t.FENTRYID AND ( t.fmergecode LIKE ''3%'' OR t.fmergecode LIKE ''4%''  OR t.fmergecode LIKE ''5%'') AND s.fjzjt= ''0'' AND s.fsuborgid =(SELECT fassignorg FROM t_tcvat_ybhz_assign WHERE fid IN (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate''))  and fseq = 2) AND s.fstartdate = to_date(''#startDate'') AND s.fenddate = to_date(''#endDate'') AND s.ftaxpayertype = ''#taxpayertype''  AND s.fruleid IN (SELECT fruleid FROM t_tcvat_ybhz_income WHERE fid IN (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate'')) AND fbelongsorg = (SELECT fassignorg FROM t_tcvat_ybhz_assign WHERE fid IN (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate''))  and fseq = 2))]}'); 
DELETE FROM t_tctb_formula WHERE FID = 1120285383574368256;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1120285383574368256,{ts'2021-04-08  00:00:00'},' ',' ','VAT_DRAFT_YBNSR_YBHZ_01','tcvat_zlb_ybnsr_ybhz_fpb#3#ysfwxssr',' ','增值税汇总一般企业分配表#3#应税服务销售收入','1','3','1119375361449286656','draft_zzsybnsr_ybhz','tcvat_zlb_ybnsr_ybhz_fpb','ysfwxssr',' ',' ','{S[SELECT SUM(s.ftaxamount) FROM t_tcvat_hz_account_summar s,t_tpo_taxitemrateentry t WHERE s.FBUSINESSTYPEID = t.FENTRYID AND ( t.fmergecode LIKE ''3%'' OR t.fmergecode LIKE ''4%''  OR t.fmergecode LIKE ''5%'') AND s.fjzjt= ''0'' AND s.fsuborgid =(SELECT fassignorg FROM t_tcvat_ybhz_assign WHERE fid IN (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate''))  and fseq = 3) AND s.fstartdate = to_date(''#startDate'') AND s.fenddate = to_date(''#endDate'') AND s.ftaxpayertype = ''#taxpayertype''  AND s.fruleid IN (SELECT fruleid FROM t_tcvat_ybhz_income WHERE fid IN (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate'')) AND fbelongsorg = (SELECT fassignorg FROM t_tcvat_ybhz_assign WHERE fid IN (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate''))  and fseq = 3))]}'); 
DELETE FROM t_tctb_formula WHERE FID = 1120285481486434304;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1120285481486434304,{ts'2021-04-08  00:00:00'},' ',' ','VAT_DRAFT_YBNSR_YBHZ_01','tcvat_zlb_ybnsr_ybhz_fpb#4#ysfwxssr',' ','增值税汇总一般企业分配表#4#应税服务销售收入','1','4','1119375361449286656','draft_zzsybnsr_ybhz','tcvat_zlb_ybnsr_ybhz_fpb','ysfwxssr',' ',' ','{S[SELECT SUM(s.ftaxamount) FROM t_tcvat_hz_account_summar s,t_tpo_taxitemrateentry t WHERE s.FBUSINESSTYPEID = t.FENTRYID AND ( t.fmergecode LIKE ''3%'' OR t.fmergecode LIKE ''4%''  OR t.fmergecode LIKE ''5%'') AND s.fjzjt= ''0'' AND s.fsuborgid =(SELECT fassignorg FROM t_tcvat_ybhz_assign WHERE fid IN (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate''))  and fseq = 4) AND s.fstartdate = to_date(''#startDate'') AND s.fenddate = to_date(''#endDate'') AND s.ftaxpayertype = ''#taxpayertype''  AND s.fruleid IN (SELECT fruleid FROM t_tcvat_ybhz_income WHERE fid IN (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate'')) AND fbelongsorg = (SELECT fassignorg FROM t_tcvat_ybhz_assign WHERE fid IN (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate''))  and fseq = 4))]}'); 
DELETE FROM t_tctb_formula WHERE FID = 1120285667537371136;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1120285667537371136,{ts'2021-04-08  00:00:00'},' ',' ','VAT_DRAFT_YBNSR_YBHZ_01','tcvat_zlb_ybnsr_ybhz_fpb#6#ysfwxssr',' ','增值税汇总一般企业分配表#6#应税服务销售收入','1','6','1119375361449286656','draft_zzsybnsr_ybhz','tcvat_zlb_ybnsr_ybhz_fpb','ysfwxssr',' ',' ','{S[SELECT SUM(s.ftaxamount) FROM t_tcvat_hz_account_summar s,t_tpo_taxitemrateentry t WHERE s.FBUSINESSTYPEID = t.FENTRYID AND ( t.fmergecode LIKE ''3%'' OR t.fmergecode LIKE ''4%''  OR t.fmergecode LIKE ''5%'') AND s.fjzjt= ''0'' AND s.fsuborgid =(SELECT fassignorg FROM t_tcvat_ybhz_assign WHERE fid IN (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate''))  and fseq = 6) AND s.fstartdate = to_date(''#startDate'') AND s.fenddate = to_date(''#endDate'') AND s.ftaxpayertype = ''#taxpayertype''  AND s.fruleid IN (SELECT fruleid FROM t_tcvat_ybhz_income WHERE fid IN (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate'')) AND fbelongsorg = (SELECT fassignorg FROM t_tcvat_ybhz_assign WHERE fid IN (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate''))  and fseq = 6))]}'); 
DELETE FROM t_tctb_formula WHERE FID = 1120285984911732736;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1120285984911732736,{ts'2021-04-08  00:00:00'},' ',' ','VAT_DRAFT_YBNSR_YBHZ_01','tcvat_zlb_ybnsr_ybhz_fpb#1#ysfwjzjtxssr',' ','增值税汇总一般企业分配表#1#应税服务即征即退销售收入','1','1','1119375361449286656','draft_zzsybnsr_ybhz','tcvat_zlb_ybnsr_ybhz_fpb','ysfwjzjtxssr',' ',' ','{S[SELECT SUM(s.ftaxamount) FROM t_tcvat_hz_account_summar s,t_tpo_taxitemrateentry t WHERE s.FBUSINESSTYPEID = t.FENTRYID AND ( t.fmergecode LIKE ''3%'' OR t.fmergecode LIKE ''4%''  OR t.fmergecode LIKE ''5%'') AND s.fjzjt= ''1'' AND s.fsuborgid =(SELECT fassignorg FROM t_tcvat_ybhz_assign WHERE fid IN (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate''))  and fseq = 1) AND s.fstartdate = to_date(''#startDate'') AND s.fenddate = to_date(''#endDate'') AND s.ftaxpayertype = ''#taxpayertype''  AND s.fruleid IN (SELECT fruleid FROM t_tcvat_ybhz_income WHERE fid IN (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate'')) AND fbelongsorg = (SELECT fassignorg FROM t_tcvat_ybhz_assign WHERE fid IN (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate''))  and fseq = 1))]}'); 
DELETE FROM t_tctb_formula WHERE FID = 1120286160636293120;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1120286160636293120,{ts'2021-04-08  00:00:00'},' ',' ','VAT_DRAFT_YBNSR_YBHZ_01','tcvat_zlb_ybnsr_ybhz_fpb#3#ysfwjzjtxssr',' ','增值税汇总一般企业分配表#3#应税服务即征即退销售收入','1','3','1119375361449286656','draft_zzsybnsr_ybhz','tcvat_zlb_ybnsr_ybhz_fpb','ysfwjzjtxssr',' ',' ','{S[SELECT SUM(s.ftaxamount) FROM t_tcvat_hz_account_summar s,t_tpo_taxitemrateentry t WHERE s.FBUSINESSTYPEID = t.FENTRYID AND ( t.fmergecode LIKE ''3%'' OR t.fmergecode LIKE ''4%''  OR t.fmergecode LIKE ''5%'') AND s.fjzjt= ''1'' AND s.fsuborgid =(SELECT fassignorg FROM t_tcvat_ybhz_assign WHERE fid IN (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate''))  and fseq = 3) AND s.fstartdate = to_date(''#startDate'') AND s.fenddate = to_date(''#endDate'') AND s.ftaxpayertype = ''#taxpayertype''  AND s.fruleid IN (SELECT fruleid FROM t_tcvat_ybhz_income WHERE fid IN (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate'')) AND fbelongsorg = (SELECT fassignorg FROM t_tcvat_ybhz_assign WHERE fid IN (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate''))  and fseq = 3))]}'); 
DELETE FROM t_tctb_formula WHERE FID = 1120286327779307520;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1120286327779307520,{ts'2021-04-08  00:00:00'},' ',' ','VAT_DRAFT_YBNSR_YBHZ_01','tcvat_zlb_ybnsr_ybhz_fpb#5#ysfwjzjtxssr',' ','增值税汇总一般企业分配表#5#应税服务即征即退销售收入','1','5','1119375361449286656','draft_zzsybnsr_ybhz','tcvat_zlb_ybnsr_ybhz_fpb','ysfwjzjtxssr',' ',' ','{S[SELECT SUM(s.ftaxamount) FROM t_tcvat_hz_account_summar s,t_tpo_taxitemrateentry t WHERE s.FBUSINESSTYPEID = t.FENTRYID AND ( t.fmergecode LIKE ''3%'' OR t.fmergecode LIKE ''4%''  OR t.fmergecode LIKE ''5%'') AND s.fjzjt= ''1'' AND s.fsuborgid =(SELECT fassignorg FROM t_tcvat_ybhz_assign WHERE fid IN (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate''))  and fseq = 5) AND s.fstartdate = to_date(''#startDate'') AND s.fenddate = to_date(''#endDate'') AND s.ftaxpayertype = ''#taxpayertype''  AND s.fruleid IN (SELECT fruleid FROM t_tcvat_ybhz_income WHERE fid IN (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate'')) AND fbelongsorg = (SELECT fassignorg FROM t_tcvat_ybhz_assign WHERE fid IN (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate''))  and fseq = 5))]}'); 
DELETE FROM t_tctb_formula WHERE FID = 1120286404812128256;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1120286404812128256,{ts'2021-04-08  00:00:00'},' ',' ','VAT_DRAFT_YBNSR_YBHZ_01','tcvat_zlb_ybnsr_ybhz_fpb#6#ysfwjzjtxssr',' ','增值税汇总一般企业分配表#6#应税服务即征即退销售收入','1','6','1119375361449286656','draft_zzsybnsr_ybhz','tcvat_zlb_ybnsr_ybhz_fpb','ysfwjzjtxssr',' ',' ','{S[SELECT SUM(s.ftaxamount) FROM t_tcvat_hz_account_summar s,t_tpo_taxitemrateentry t WHERE s.FBUSINESSTYPEID = t.FENTRYID AND ( t.fmergecode LIKE ''3%'' OR t.fmergecode LIKE ''4%''  OR t.fmergecode LIKE ''5%'') AND s.fjzjt= ''1'' AND s.fsuborgid =(SELECT fassignorg FROM t_tcvat_ybhz_assign WHERE fid IN (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate''))  and fseq = 6) AND s.fstartdate = to_date(''#startDate'') AND s.fenddate = to_date(''#endDate'') AND s.ftaxpayertype = ''#taxpayertype''  AND s.fruleid IN (SELECT fruleid FROM t_tcvat_ybhz_income WHERE fid IN (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate'')) AND fbelongsorg = (SELECT fassignorg FROM t_tcvat_ybhz_assign WHERE fid IN (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate''))  and fseq = 6))]}'); 
DELETE FROM t_tctb_formula WHERE FID = 1120307953132580864;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1120307953132580864,{ts'2021-03-29  00:00:00'},' ',' ','VAT_DRAFT_YBNSR_YBHZ_01','tcvat_zlb_ybnsr_ybhz_fpb#1#fpbl',' ','增值税汇总一般企业分配表#1#一般货物及劳务分配比例','1','1','1119375361449286656','draft_zzsybnsr_ybhz','tcvat_zlb_ybnsr_ybhz_fpb','fpbl',' ',' ','if({C[#assignplan]} = 0, if({Q[tcvat_zlb_ybnsr_ybhz_fpb#7#xssr]} > 0, {Q[tcvat_zlb_ybnsr_ybhz_fpb#1#xssr]}/{Q[tcvat_zlb_ybnsr_ybhz_fpb#7#xssr]} , 0), {S[SELECT fnormalgoods FROM t_tcvat_ybhz_assign WHERE fid = (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate''))  and fseq = 1]})'); 
DELETE FROM t_tctb_formula WHERE FID = 1120310266803175424;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1120310266803175424,{ts'2021-03-29  00:00:00'},' ',' ','VAT_DRAFT_YBNSR_YBHZ_01','tcvat_zlb_ybnsr_ybhz_fpb#2#fpbl',' ','增值税汇总一般企业分配表#2#一般货物及劳务分配比例','1','2','1119375361449286656','draft_zzsybnsr_ybhz','tcvat_zlb_ybnsr_ybhz_fpb','fpbl',' ',' ','if({C[#assignplan]} = 0, if( {Q[tcvat_zlb_ybnsr_ybhz_fpb#7#xssr]} > 0,{Q[tcvat_zlb_ybnsr_ybhz_fpb#2#xssr]}/{Q[tcvat_zlb_ybnsr_ybhz_fpb#7#xssr]} , 0) ,{S[SELECT fnormalgoods FROM t_tcvat_ybhz_assign WHERE fid = (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate''))  and fseq = 2]}) '); 
DELETE FROM t_tctb_formula WHERE FID = 1120310545246007296;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1120310545246007296,{ts'2021-03-29  00:00:00'},' ',' ','VAT_DRAFT_YBNSR_YBHZ_01','tcvat_zlb_ybnsr_ybhz_fpb#3#fpbl',' ','增值税汇总一般企业分配表#3#一般货物及劳务分配比例','1','3','1119375361449286656','draft_zzsybnsr_ybhz','tcvat_zlb_ybnsr_ybhz_fpb','fpbl',' ',' ','if({C[#assignplan]} = 0, if( {Q[tcvat_zlb_ybnsr_ybhz_fpb#7#xssr]}> 0, {Q[tcvat_zlb_ybnsr_ybhz_fpb#3#xssr]}/{Q[tcvat_zlb_ybnsr_ybhz_fpb#7#xssr]}, 0) , {S[SELECT fnormalgoods FROM t_tcvat_ybhz_assign WHERE fid = (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate''))  and fseq = 3]}) '); 
DELETE FROM t_tctb_formula WHERE FID = 1120310728830926848;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1120310728830926848,{ts'2021-03-29  00:00:00'},' ',' ','VAT_DRAFT_YBNSR_YBHZ_01','tcvat_zlb_ybnsr_ybhz_fpb#4#fpbl',' ','增值税汇总一般企业分配表#4#一般货物及劳务分配比例','1','4','1119375361449286656','draft_zzsybnsr_ybhz','tcvat_zlb_ybnsr_ybhz_fpb','fpbl',' ',' ','if({C[#assignplan]} = 0,if( {Q[tcvat_zlb_ybnsr_ybhz_fpb#7#xssr]}> 0,{Q[tcvat_zlb_ybnsr_ybhz_fpb#4#xssr]}/{Q[tcvat_zlb_ybnsr_ybhz_fpb#7#xssr]}  , 0) , {S[SELECT fnormalgoods FROM t_tcvat_ybhz_assign WHERE fid = (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate''))  and fseq = 4]}) '); 
DELETE FROM t_tctb_formula WHERE FID = 1120310863568515072;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1120310863568515072,{ts'2021-03-29  00:00:00'},' ',' ','VAT_DRAFT_YBNSR_YBHZ_01','tcvat_zlb_ybnsr_ybhz_fpb#5#fpbl',' ','增值税汇总一般企业分配表#5#一般货物及劳务分配比例','1','5','1119375361449286656','draft_zzsybnsr_ybhz','tcvat_zlb_ybnsr_ybhz_fpb','fpbl',' ',' ','if({C[#assignplan]} = 0, if({Q[tcvat_zlb_ybnsr_ybhz_fpb#7#xssr]} > 0,{Q[tcvat_zlb_ybnsr_ybhz_fpb#5#xssr]}/{Q[tcvat_zlb_ybnsr_ybhz_fpb#7#xssr]} , 0) ,{S[SELECT fnormalgoods FROM t_tcvat_ybhz_assign WHERE fid = (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate''))  and fseq = 5]}) '); 
DELETE FROM t_tctb_formula WHERE FID = 1120310975539888128;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1120310975539888128,{ts'2021-03-29  00:00:00'},' ',' ','VAT_DRAFT_YBNSR_YBHZ_01','tcvat_zlb_ybnsr_ybhz_fpb#6#fpbl',' ','增值税汇总一般企业分配表#6#一般货物及劳务分配比例','1','6','1119375361449286656','draft_zzsybnsr_ybhz','tcvat_zlb_ybnsr_ybhz_fpb','fpbl',' ',' ','if({C[#assignplan]} = 0, if({Q[tcvat_zlb_ybnsr_ybhz_fpb#7#xssr]}> 0,{Q[tcvat_zlb_ybnsr_ybhz_fpb#6#xssr]}/{Q[tcvat_zlb_ybnsr_ybhz_fpb#7#xssr]} , 0) , {S[SELECT fnormalgoods FROM t_tcvat_ybhz_assign WHERE fid = (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate''))  and fseq = 6]}) '); 
DELETE FROM t_tctb_formula WHERE FID = 1120311590332346368;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1120311590332346368,{ts'2021-03-29  00:00:00'},' ',' ','VAT_DRAFT_YBNSR_YBHZ_01','tcvat_zlb_ybnsr_ybhz_fpb#1#jzjtfpbl',' ','增值税汇总一般企业分配表#1#一般货物及劳务即征即退分配比例','1','1','1119375361449286656','draft_zzsybnsr_ybhz','tcvat_zlb_ybnsr_ybhz_fpb','jzjtfpbl',' ',' ','if({C[#assignplan]} = 0, if({Q[tcvat_zlb_ybnsr_ybhz_fpb#7#jzjtxssr]} > 0,{Q[tcvat_zlb_ybnsr_ybhz_fpb#1#jzjtxssr]}/{Q[tcvat_zlb_ybnsr_ybhz_fpb#7#jzjtxssr]} , 0) , {S[SELECT fjzjtgoods FROM t_tcvat_ybhz_assign WHERE fid = (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate''))  and fseq = 1]}) '); 
DELETE FROM t_tctb_formula WHERE FID = 1120312145264164864;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1120312145264164864,{ts'2021-03-29  00:00:00'},' ',' ','VAT_DRAFT_YBNSR_YBHZ_01','tcvat_zlb_ybnsr_ybhz_fpb#2#jzjtfpbl',' ','增值税汇总一般企业分配表#2#一般货物及劳务即征即退分配比例','1','2','1119375361449286656','draft_zzsybnsr_ybhz','tcvat_zlb_ybnsr_ybhz_fpb','jzjtfpbl',' ',' ','if({C[#assignplan]} = 0, if({Q[tcvat_zlb_ybnsr_ybhz_fpb#7#jzjtxssr]}  > 0,{Q[tcvat_zlb_ybnsr_ybhz_fpb#2#jzjtxssr]}/{Q[tcvat_zlb_ybnsr_ybhz_fpb#7#jzjtxssr]}  , 0),{S[SELECT fjzjtgoods FROM t_tcvat_ybhz_assign WHERE fid = (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate''))  and fseq = 2]}) '); 
DELETE FROM t_tctb_formula WHERE FID = 1120312299597541376;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1120312299597541376,{ts'2021-03-29  00:00:00'},' ',' ','VAT_DRAFT_YBNSR_YBHZ_01','tcvat_zlb_ybnsr_ybhz_fpb#3#jzjtfpbl',' ','增值税汇总一般企业分配表#3#一般货物及劳务即征即退分配比例','1','3','1119375361449286656','draft_zzsybnsr_ybhz','tcvat_zlb_ybnsr_ybhz_fpb','jzjtfpbl',' ',' ','if({C[#assignplan]} = 0, if({Q[tcvat_zlb_ybnsr_ybhz_fpb#7#jzjtxssr]}> 0,{Q[tcvat_zlb_ybnsr_ybhz_fpb#3#jzjtxssr]}/{Q[tcvat_zlb_ybnsr_ybhz_fpb#7#jzjtxssr]} , 0) ,{S[SELECT fjzjtgoods FROM t_tcvat_ybhz_assign WHERE fid = (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate''))  and fseq = 3]}) '); 
DELETE FROM t_tctb_formula WHERE FID = 1120312721972576256;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1120312721972576256,{ts'2021-03-29  00:00:00'},' ',' ','VAT_DRAFT_YBNSR_YBHZ_01','tcvat_zlb_ybnsr_ybhz_fpb#6#jzjtfpbl',' ','增值税汇总一般企业分配表#6#一般货物及劳务即征即退分配比例','1','6','1119375361449286656','draft_zzsybnsr_ybhz','tcvat_zlb_ybnsr_ybhz_fpb','jzjtfpbl',' ',' ','if({C[#assignplan]} = 0, if({Q[tcvat_zlb_ybnsr_ybhz_fpb#7#jzjtxssr]}> 0,{Q[tcvat_zlb_ybnsr_ybhz_fpb#6#jzjtxssr]}/{Q[tcvat_zlb_ybnsr_ybhz_fpb#7#jzjtxssr]} , 0) , {S[SELECT fjzjtgoods FROM t_tcvat_ybhz_assign WHERE fid = (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate''))  and fseq =6]}) '); 
DELETE FROM t_tctb_formula WHERE FID = 1120313348785909760;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1120313348785909760,{ts'2021-03-29  00:00:00'},' ',' ','VAT_DRAFT_YBNSR_YBHZ_01','tcvat_zlb_ybnsr_ybhz_fpb#1#ysfwfpbl',' ','增值税汇总一般企业分配表#1#应税服务分配比例','1','1','1119375361449286656','draft_zzsybnsr_ybhz','tcvat_zlb_ybnsr_ybhz_fpb','ysfwfpbl',' ',' ','if({C[#assignplan]} = 0,if({Q[tcvat_zlb_ybnsr_ybhz_fpb#7#ysfwxssr]}> 0,{Q[tcvat_zlb_ybnsr_ybhz_fpb#1#ysfwxssr]}/{Q[tcvat_zlb_ybnsr_ybhz_fpb#7#ysfwxssr]} , 0)  ,{S[SELECT fnormaltax FROM t_tcvat_ybhz_assign WHERE fid = (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate''))  and fseq = 1]}) '); 
DELETE FROM t_tctb_formula WHERE FID = 1120313589547581440;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1120313589547581440,{ts'2021-03-29  00:00:00'},' ',' ','VAT_DRAFT_YBNSR_YBHZ_01','tcvat_zlb_ybnsr_ybhz_fpb#2#ysfwfpbl',' ','增值税汇总一般企业分配表#2#应税服务分配比例','1','2','1119375361449286656','draft_zzsybnsr_ybhz','tcvat_zlb_ybnsr_ybhz_fpb','ysfwfpbl',' ',' ','if({C[#assignplan]} = 0, if({Q[tcvat_zlb_ybnsr_ybhz_fpb#7#ysfwxssr]}> 0,{Q[tcvat_zlb_ybnsr_ybhz_fpb#2#ysfwxssr]}/{Q[tcvat_zlb_ybnsr_ybhz_fpb#7#ysfwxssr]} , 0) , {S[SELECT fnormaltax FROM t_tcvat_ybhz_assign WHERE fid = (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate''))  and fseq = 2]}) '); 
DELETE FROM t_tctb_formula WHERE FID = 1120313754618376192;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1120313754618376192,{ts'2021-03-29  00:00:00'},' ',' ','VAT_DRAFT_YBNSR_YBHZ_01','tcvat_zlb_ybnsr_ybhz_fpb#3#ysfwfpbl',' ','增值税汇总一般企业分配表#3#应税服务分配比例','1','3','1119375361449286656','draft_zzsybnsr_ybhz','tcvat_zlb_ybnsr_ybhz_fpb','ysfwfpbl',' ',' ','if({C[#assignplan]} = 0, if({Q[tcvat_zlb_ybnsr_ybhz_fpb#7#ysfwxssr]} > 0,{Q[tcvat_zlb_ybnsr_ybhz_fpb#3#ysfwxssr]}/{Q[tcvat_zlb_ybnsr_ybhz_fpb#7#ysfwxssr]}  , 0), {S[SELECT fnormaltax FROM t_tcvat_ybhz_assign WHERE fid = (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate''))  and fseq = 3]}) '); 
DELETE FROM t_tctb_formula WHERE FID = 1120313882494550016;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1120313882494550016,{ts'2021-03-29  00:00:00'},' ',' ','VAT_DRAFT_YBNSR_YBHZ_01','tcvat_zlb_ybnsr_ybhz_fpb#4#ysfwfpbl',' ','增值税汇总一般企业分配表#4#应税服务分配比例','1','4','1119375361449286656','draft_zzsybnsr_ybhz','tcvat_zlb_ybnsr_ybhz_fpb','ysfwfpbl',' ',' ','if({C[#assignplan]} = 0,if({Q[tcvat_zlb_ybnsr_ybhz_fpb#7#ysfwxssr]} > 0, {Q[tcvat_zlb_ybnsr_ybhz_fpb#4#ysfwxssr]}/{Q[tcvat_zlb_ybnsr_ybhz_fpb#7#ysfwxssr]}  , 0), {S[SELECT fnormaltax FROM t_tcvat_ybhz_assign WHERE fid = (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate''))  and fseq = 4]}) '); 
DELETE FROM t_tctb_formula WHERE FID = 1120314043589144576;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1120314043589144576,{ts'2021-03-29  00:00:00'},' ',' ','VAT_DRAFT_YBNSR_YBHZ_01','tcvat_zlb_ybnsr_ybhz_fpb#5#ysfwfpbl',' ','增值税汇总一般企业分配表#5#应税服务分配比例','1','5','1119375361449286656','draft_zzsybnsr_ybhz','tcvat_zlb_ybnsr_ybhz_fpb','ysfwfpbl',' ',' ','if({C[#assignplan]} = 0, if({Q[tcvat_zlb_ybnsr_ybhz_fpb#7#ysfwxssr]} > 0,{Q[tcvat_zlb_ybnsr_ybhz_fpb#5#ysfwxssr]}/{Q[tcvat_zlb_ybnsr_ybhz_fpb#7#ysfwxssr]}  , 0), {S[SELECT fnormaltax FROM t_tcvat_ybhz_assign WHERE fid = (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate''))  and fseq = 5]}) '); 
DELETE FROM t_tctb_formula WHERE FID = 1120314205263020032;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1120314205263020032,{ts'2021-03-29  00:00:00'},' ',' ','VAT_DRAFT_YBNSR_YBHZ_01','tcvat_zlb_ybnsr_ybhz_fpb#6#ysfwfpbl',' ','增值税汇总一般企业分配表#6#应税服务分配比例','1','6','1119375361449286656','draft_zzsybnsr_ybhz','tcvat_zlb_ybnsr_ybhz_fpb','ysfwfpbl',' ',' ','if({C[#assignplan]} = 0, if({Q[tcvat_zlb_ybnsr_ybhz_fpb#7#ysfwxssr]}> 0,{Q[tcvat_zlb_ybnsr_ybhz_fpb#6#ysfwxssr]}/{Q[tcvat_zlb_ybnsr_ybhz_fpb#7#ysfwxssr]} , 0) , {S[SELECT fnormaltax FROM t_tcvat_ybhz_assign WHERE fid = (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate''))  and fseq = 6]}) '); 
DELETE FROM t_tctb_formula WHERE FID = 1120314771896479744;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1120314771896479744,{ts'2021-03-29  00:00:00'},' ',' ','VAT_DRAFT_YBNSR_YBHZ_01','tcvat_zlb_ybnsr_ybhz_fpb#1#ysfwjzjtfpbl',' ','增值税汇总一般企业分配表#1#应税服务即征即退分配比例','1','1','1119375361449286656','draft_zzsybnsr_ybhz','tcvat_zlb_ybnsr_ybhz_fpb','ysfwjzjtfpbl',' ',' ','if({C[#assignplan]} = 0, if({Q[tcvat_zlb_ybnsr_ybhz_fpb#7#ysfwjzjtxssr]} > 0,{Q[tcvat_zlb_ybnsr_ybhz_fpb#1#ysfwjzjtxssr]}/{Q[tcvat_zlb_ybnsr_ybhz_fpb#7#ysfwjzjtxssr]}  , 0), {S[SELECT fjzjttax FROM t_tcvat_ybhz_assign WHERE fid = (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate''))  and fseq = 1]}) '); 
DELETE FROM t_tctb_formula WHERE FID = 1120315662456504320;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1120315662456504320,{ts'2021-03-29  00:00:00'},' ',' ','VAT_DRAFT_YBNSR_YBHZ_01','tcvat_zlb_ybnsr_ybhz_fpb#3#ysfwjzjtfpbl',' ','增值税汇总一般企业分配表#3#应税服务即征即退分配比例','1','3','1119375361449286656','draft_zzsybnsr_ybhz','tcvat_zlb_ybnsr_ybhz_fpb','ysfwjzjtfpbl',' ',' ','if({C[#assignplan]} = 0, if({Q[tcvat_zlb_ybnsr_ybhz_fpb#7#ysfwjzjtxssr]}  > 0, {Q[tcvat_zlb_ybnsr_ybhz_fpb#3#ysfwjzjtxssr]}/{Q[tcvat_zlb_ybnsr_ybhz_fpb#7#ysfwjzjtxssr]} , 0), {S[SELECT fjzjttax FROM t_tcvat_ybhz_assign WHERE fid = (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate''))  and fseq = 3]}) '); 
DELETE FROM t_tctb_formula WHERE FID = 1120315796632055808;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1120315796632055808,{ts'2021-03-29  00:00:00'},' ',' ','VAT_DRAFT_YBNSR_YBHZ_01','tcvat_zlb_ybnsr_ybhz_fpb#4#ysfwjzjtfpbl',' ','增值税汇总一般企业分配表#4#应税服务即征即退分配比例','1','4','1119375361449286656','draft_zzsybnsr_ybhz','tcvat_zlb_ybnsr_ybhz_fpb','ysfwjzjtfpbl',' ',' ','if({C[#assignplan]} = 0, if({Q[tcvat_zlb_ybnsr_ybhz_fpb#7#ysfwjzjtxssr]}  > 0,{Q[tcvat_zlb_ybnsr_ybhz_fpb#4#ysfwjzjtxssr]}/{Q[tcvat_zlb_ybnsr_ybhz_fpb#7#ysfwjzjtxssr]}  , 0), {S[SELECT fjzjttax FROM t_tcvat_ybhz_assign WHERE fid = (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate''))  and fseq = 4]}) '); 
DELETE FROM t_tctb_formula WHERE FID = 1120315924927660032;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1120315924927660032,{ts'2021-03-29  00:00:00'},' ',' ','VAT_DRAFT_YBNSR_YBHZ_01','tcvat_zlb_ybnsr_ybhz_fpb#5#ysfwjzjtfpbl',' ','增值税汇总一般企业分配表#5#应税服务即征即退分配比例','1','5','1119375361449286656','draft_zzsybnsr_ybhz','tcvat_zlb_ybnsr_ybhz_fpb','ysfwjzjtfpbl',' ',' ','if({C[#assignplan]} = 0, if({Q[tcvat_zlb_ybnsr_ybhz_fpb#7#ysfwjzjtxssr]} > 0,{Q[tcvat_zlb_ybnsr_ybhz_fpb#5#ysfwjzjtxssr]}/{Q[tcvat_zlb_ybnsr_ybhz_fpb#7#ysfwjzjtxssr]}  , 0), {S[SELECT fjzjttax FROM t_tcvat_ybhz_assign WHERE fid = (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate''))  and fseq = 5]}) '); 
DELETE FROM t_tctb_formula WHERE FID = 1120316043315851264;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1120316043315851264,{ts'2021-03-29  00:00:00'},' ',' ','VAT_DRAFT_YBNSR_YBHZ_01','tcvat_zlb_ybnsr_ybhz_fpb#6#ysfwjzjtfpbl',' ','增值税汇总一般企业分配表#6#应税服务即征即退分配比例','1','6','1119375361449286656','draft_zzsybnsr_ybhz','tcvat_zlb_ybnsr_ybhz_fpb','ysfwjzjtfpbl',' ',' ','if({C[#assignplan]} = 0, if({Q[tcvat_zlb_ybnsr_ybhz_fpb#7#ysfwjzjtxssr]} > 0, {Q[tcvat_zlb_ybnsr_ybhz_fpb#6#ysfwjzjtxssr]}/{Q[tcvat_zlb_ybnsr_ybhz_fpb#7#ysfwjzjtxssr]}, 0) ,{S[SELECT fjzjttax FROM t_tcvat_ybhz_assign WHERE fid = (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate''))  and fseq = 6]}) '); 
DELETE FROM t_tctb_formula WHERE FID = 1012242613253911552;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1012242613253911552,{ts'2020-12-23  00:00:00'},' ',' ','VAT_PRE_201904','tcvat_prepay#1#sale',' ','增值税预缴税款表#1#销售额','1','1','1012120395395992576','zzsyjskb','tcvat_prepay','sale',' ',' ','{S[SELECT fsalesamount FROM T_TCVAT_PROJECT_ACCOUNT WHERE forgid = ''#orgid'' AND fprojectid= ''#projectid'' AND fprepaytype IN (''VAT_YJXMLX_001'',''VAT_YJXMLX_002'') AND fstartdate= to_date(''#startDate'') AND fenddate = to_date(''#endDate'') and fdeclareserialno = ''#declareserialno'' ]}'); 
DELETE FROM t_tctb_formula WHERE FID = 1012275352313105408;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1012275352313105408,{ts'2020-12-23  00:00:00'},' ',' ','VAT_PRE_201904','tcvat_prepay#2#sale',' ','增值税预缴税款表#2#销售额','1','2','1012120395395992576','zzsyjskb','tcvat_prepay','sale',' ',' ','{S[SELECT fsalesamount FROM T_TCVAT_PROJECT_ACCOUNT WHERE forgid = ''#orgid'' AND fprojectid= ''#projectid'' AND fprepaytype IN (''VAT_YJXMLX_003'',''VAT_YJXMLX_004'') AND fstartdate= to_date(''#startDate'') AND fenddate = to_date(''#endDate'') and fdeclareserialno = ''#declareserialno'' ]}'); 
DELETE FROM t_tctb_formula WHERE FID = 1012275514423063552;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1012275514423063552,{ts'2020-12-23  00:00:00'},' ',' ','VAT_PRE_201904','tcvat_prepay#3#sale',' ','增值税预缴税款表#3#销售额','1','3','1012120395395992576','zzsyjskb','tcvat_prepay','sale',' ',' ','{S[SELECT fsalesamount FROM T_TCVAT_PROJECT_ACCOUNT WHERE forgid = ''#orgid'' AND fprojectid= ''#projectid'' AND fprepaytype=''VAT_YJXMLX_005'' AND fstartdate= to_date(''#startDate'') AND fenddate = to_date(''#endDate'') and fdeclareserialno = ''#declareserialno'' ]}'); 
DELETE FROM t_tctb_formula WHERE FID = 1012329726649451520;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1012329726649451520,{ts'2020-12-23  00:00:00'},' ',' ','VAT_PRE_201904','tcvat_prepay#1#crossclaim',' ','增值税预缴税款表#1#扣除金额','1','1','1012120395395992576','zzsyjskb','tcvat_prepay','crossclaim',' ',' ','{S[SELECT fdeductionamount FROM T_TCVAT_PROJECT_ACCOUNT WHERE forgid = ''#orgid'' AND fprojectid= ''#projectid'' AND fprepaytype IN (''VAT_YJXMLX_001'',''VAT_YJXMLX_002'') AND fstartdate= to_date(''#startDate'') AND fenddate = to_date(''#endDate'') and fdeclareserialno = ''#declareserialno'' ]}'); 
DELETE FROM t_tctb_formula WHERE FID = 1012981126077357056;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1012981126077357056,{ts'2020-12-23  00:00:00'},' ',' ','VAT_PRE_201904','tcvat_prepay#3#advanceamount',' ','增值税预缴税款表#3#预征税额','1','3','1012120395395992576','zzsyjskb','tcvat_prepay','advanceamount',' ',' ','#if(''{S[SELECT a.flevytype FROM T_TCVAT_PROJECT_ACCOUNT a WHERE a.fprojectid= ''#projectid'' AND a.forgid = ''#orgid'' and a.fstartdate= to_date(''#startDate'') AND a.fenddate = to_date(''#endDate'') and a.fdeclareserialno = ''#declareserialno'']}'' == ''normal'')  {Q[tcvat_prepay#3#sale]} / 1.09 * {Q[tcvat_prepay#3#advancescale]}/100  #else  {Q[tcvat_prepay#3#sale]} / 1.05 * {Q[tcvat_prepay#3#advancescale]}/100  #end'); 
DELETE FROM t_tctb_formula WHERE FID = 1013000532895351808;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1013000532895351808,{ts'2020-12-23  00:00:00'},' ',' ','VAT_PRE_201904','tcvat_prepay#4#sfsyybjsff','0','增值税预缴税款表#4#是否适用一般计税方法','1','4','1012120395395992576','zzsyjskb','tcvat_prepay','sfsyybjsff','1',' ','#if(''{S[SELECT a.flevytype FROM T_TCVAT_PROJECT_ACCOUNT a WHERE a.fprojectid= ''#projectid'' AND a.forgid = ''#orgid'' and a.fstartdate= to_date(''#startDate'') AND a.fenddate = to_date(''#endDate'') and a.fdeclareserialno = ''#declareserialno'']}'' == ''normal'') 1 #else 0 #end'); 
DELETE FROM t_tctb_formula WHERE FID = 1017184449525530624;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1017184449525530624,{ts'2020-12-23  00:00:00'},' ',' ','VAT_PRE_201904','tcvat_prepay#4#projectname',' ','增值税预缴税款表#4#项目名称','4','4','1012120395395992576','zzsyjskb','tcvat_prepay','projectname',' ',' ','#if(''{S[SELECT a.fprepaytype FROM T_TCVAT_PROJECT_ACCOUNT a WHERE a.fprojectid= ''#projectid'' AND a.forgid = ''#orgid'' and a.fdeclareserialno = ''#declareserialno'']}'' != ''VAT_YJXMLX_004'' && ''{S[SELECT a.fprepaytype  FROM T_TCVAT_PROJECT_ACCOUNT a WHERE a.fprojectid= ''#projectid'' AND a.forgid = ''#orgid'' and a.fdeclareserialno = ''#declareserialno'']}'' != ''VAT_YJXMLX_005'')  {S[SELECT fname FROM t_tcvat_project_account where fprojectid = ''#projectid'' and fstartdate= to_date(''#startDate'') AND fenddate = to_date(''#endDate'') and fdeclareserialno = ''#declareserialno'']} #else #end'); 
DELETE FROM t_tctb_formula WHERE FID = 1017184611316610048;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1017184611316610048,{ts'2020-12-23  00:00:00'},' ',' ','VAT_PRE_201904','tcvat_prepay#4#projectnum',' ','增值税预缴税款表#4#项目编号','4','4','1012120395395992576','zzsyjskb','tcvat_prepay','projectnum',' ',' ','#if(''{S[SELECT a.fprepaytype FROM T_TCVAT_PROJECT_ACCOUNT a WHERE a.fprojectid= ''#projectid'' AND a.forgid = ''#orgid'' and a.fdeclareserialno = ''#declareserialno'' ]}'' != ''VAT_YJXMLX_004'' && ''{S[SELECT a.fprepaytype  FROM T_TCVAT_PROJECT_ACCOUNT a WHERE a.fprojectid= ''#projectid'' AND a.forgid = ''#orgid'' and a.fdeclareserialno = ''#declareserialno'']}'' != ''VAT_YJXMLX_005'') {S[SELECT flicensecode FROM t_tcvat_project_account where fprojectid = ''#projectid'' and fstartdate= to_date(''#startDate'') AND fenddate = to_date(''#endDate'') and fdeclareserialno = ''#declareserialno'']} #else #end'); 
DELETE FROM t_tctb_formula WHERE FID = 1120284438387961856;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1120284438387961856,{ts'2021-04-08  00:00:00'},' ',' ','VAT_DRAFT_YBNSR_YBHZ_01','tcvat_zlb_ybnsr_ybhz_fpb#5#jzjtxssr',' ','增值税汇总一般企业分配表#5#一般货物及劳务即征即退销售收入','1','5','1119375361449286656','draft_zzsybnsr_ybhz','tcvat_zlb_ybnsr_ybhz_fpb','jzjtxssr',' ',' ','{S[SELECT SUM(s.ftaxamount) FROM t_tcvat_hz_account_summar s,t_tpo_taxitemrateentry t WHERE s.FBUSINESSTYPEID = t.FENTRYID AND ( t.fmergecode LIKE ''1%'' OR t.fmergecode LIKE ''2%'') AND s.fjzjt= ''1'' AND s.fsuborgid =(SELECT fassignorg FROM t_tcvat_ybhz_assign WHERE fid IN (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate''))  and fseq = 5) AND s.fstartdate = to_date(''#startDate'') AND s.fenddate = to_date(''#endDate'') AND s.ftaxpayertype = ''#taxpayertype''  AND s.fruleid IN (SELECT fruleid FROM t_tcvat_ybhz_income WHERE fid IN (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate'')) AND fbelongsorg = (SELECT fassignorg FROM t_tcvat_ybhz_assign WHERE fid IN (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate''))  and fseq = 5))]}'); 
DELETE FROM t_tctb_formula WHERE FID = 1120285583785275392;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1120285583785275392,{ts'2021-04-08  00:00:00'},' ',' ','VAT_DRAFT_YBNSR_YBHZ_01','tcvat_zlb_ybnsr_ybhz_fpb#5#ysfwxssr',' ','增值税汇总一般企业分配表#5#应税服务销售收入','1','5','1119375361449286656','draft_zzsybnsr_ybhz','tcvat_zlb_ybnsr_ybhz_fpb','ysfwxssr',' ',' ','{S[SELECT SUM(s.ftaxamount) FROM t_tcvat_hz_account_summar s,t_tpo_taxitemrateentry t WHERE s.FBUSINESSTYPEID = t.FENTRYID AND ( t.fmergecode LIKE ''3%'' OR t.fmergecode LIKE ''4%''  OR t.fmergecode LIKE ''5%'') AND s.fjzjt= ''0'' AND s.fsuborgid =(SELECT fassignorg FROM t_tcvat_ybhz_assign WHERE fid IN (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate''))  and fseq = 5) AND s.fstartdate = to_date(''#startDate'') AND s.fenddate = to_date(''#endDate'') AND s.ftaxpayertype = ''#taxpayertype''  AND s.fruleid IN (SELECT fruleid FROM t_tcvat_ybhz_income WHERE fid IN (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate'')) AND fbelongsorg = (SELECT fassignorg FROM t_tcvat_ybhz_assign WHERE fid IN (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate''))  and fseq = 5))]}'); 
DELETE FROM t_tctb_formula WHERE FID = 1120286084392468480;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1120286084392468480,{ts'2021-03-29  00:00:00'},' ',' ','VAT_DRAFT_YBNSR_YBHZ_01','tcvat_zlb_ybnsr_ybhz_fpb#2#ysfwjzjtfpbl',' ','增值税汇总一般企业分配表#2#应税服务即征即退分配比例','1','2','1119375361449286656','draft_zzsybnsr_ybhz','tcvat_zlb_ybnsr_ybhz_fpb','ysfwjzjtfpbl',' ',' ','if({C[#assignplan]} = 0, if({Q[tcvat_zlb_ybnsr_ybhz_fpb#7#ysfwjzjtxssr]} > 0,{Q[tcvat_zlb_ybnsr_ybhz_fpb#2#ysfwjzjtxssr]}/{Q[tcvat_zlb_ybnsr_ybhz_fpb#7#ysfwjzjtxssr]}  , 0), {S[SELECT fjzjttax FROM t_tcvat_ybhz_assign WHERE fid = (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate''))  and fseq = 2]}) '); 
DELETE FROM t_tctb_formula WHERE FID = 1120286245311135744;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1120286245311135744,{ts'2021-04-08  00:00:00'},' ',' ','VAT_DRAFT_YBNSR_YBHZ_01','tcvat_zlb_ybnsr_ybhz_fpb#4#ysfwjzjtxssr',' ','增值税汇总一般企业分配表#4#应税服务即征即退销售收入','1','4','1119375361449286656','draft_zzsybnsr_ybhz','tcvat_zlb_ybnsr_ybhz_fpb','ysfwjzjtxssr',' ',' ','{S[SELECT SUM(s.ftaxamount) FROM t_tcvat_hz_account_summar s,t_tpo_taxitemrateentry t WHERE s.FBUSINESSTYPEID = t.FENTRYID AND ( t.fmergecode LIKE ''3%'' OR t.fmergecode LIKE ''4%''  OR t.fmergecode LIKE ''5%'') AND s.fjzjt= ''1'' AND s.fsuborgid =(SELECT fassignorg FROM t_tcvat_ybhz_assign WHERE fid IN (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate''))  and fseq = 4) AND s.fstartdate = to_date(''#startDate'') AND s.fenddate = to_date(''#endDate'') AND s.ftaxpayertype = ''#taxpayertype''  AND s.fruleid IN (SELECT fruleid FROM t_tcvat_ybhz_income WHERE fid IN (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate'')) AND fbelongsorg = (SELECT fassignorg FROM t_tcvat_ybhz_assign WHERE fid IN (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate''))  and fseq = 4))]}'); 
DELETE FROM t_tctb_formula WHERE FID = 1120312427993808896;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1120312427993808896,{ts'2021-03-29  00:00:00'},' ',' ','VAT_DRAFT_YBNSR_YBHZ_01','tcvat_zlb_ybnsr_ybhz_fpb#4#jzjtfpbl',' ','增值税汇总一般企业分配表#4#一般货物及劳务即征即退分配比例','1','4','1119375361449286656','draft_zzsybnsr_ybhz','tcvat_zlb_ybnsr_ybhz_fpb','jzjtfpbl',' ',' ','if({C[#assignplan]} = 0, if({Q[tcvat_zlb_ybnsr_ybhz_fpb#7#jzjtxssr]} > 0, {Q[tcvat_zlb_ybnsr_ybhz_fpb#4#jzjtxssr]}/{Q[tcvat_zlb_ybnsr_ybhz_fpb#7#jzjtxssr]}, 0) , {S[SELECT fjzjtgoods FROM t_tcvat_ybhz_assign WHERE fid = (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate''))  and fseq = 4]}) '); 
DELETE FROM t_tctb_formula WHERE FID = 1120312577210134528;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1120312577210134528,{ts'2021-03-29  00:00:00'},' ',' ','VAT_DRAFT_YBNSR_YBHZ_01','tcvat_zlb_ybnsr_ybhz_fpb#5#jzjtfpbl',' ','增值税汇总一般企业分配表#5#一般货物及劳务即征即退分配比例','1','5','1119375361449286656','draft_zzsybnsr_ybhz','tcvat_zlb_ybnsr_ybhz_fpb','jzjtfpbl',' ',' ','if({C[#assignplan]} = 0, if({Q[tcvat_zlb_ybnsr_ybhz_fpb#7#jzjtxssr]} > 0,{Q[tcvat_zlb_ybnsr_ybhz_fpb#5#jzjtxssr]}/{Q[tcvat_zlb_ybnsr_ybhz_fpb#7#jzjtxssr]}  , 0),{S[SELECT fjzjtgoods FROM t_tcvat_ybhz_assign WHERE fid = (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate''))  and fseq = 5]}) '); 
DELETE FROM t_tctb_formula WHERE FID = 1122411325981833216;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1122411325981833216,{ts'2021-04-08  00:00:00'},' ',' ','VAT_DRAFT_YBNSR_YBHZ_01','tcvat_zlb_ybnsr_ybhz_fpb#2#ysfwjzjtxssr',' ','增值税汇总一般企业分配表#2#应税服务即征即退销售收入','1','2','1119375361449286656','draft_zzsybnsr_ybhz','tcvat_zlb_ybnsr_ybhz_fpb','ysfwjzjtxssr',' ',' ','{S[SELECT SUM(s.ftaxamount) FROM t_tcvat_hz_account_summar s,t_tpo_taxitemrateentry t WHERE s.FBUSINESSTYPEID = t.FENTRYID AND ( t.fmergecode LIKE ''3%'' OR t.fmergecode LIKE ''4%''  OR t.fmergecode LIKE ''5%'') AND s.fjzjt= ''1'' AND s.fsuborgid =(SELECT fassignorg FROM t_tcvat_ybhz_assign WHERE fid IN (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate''))  and fseq = 2) AND s.fstartdate = to_date(''#startDate'') AND s.fenddate = to_date(''#endDate'') AND s.ftaxpayertype = ''#taxpayertype''  AND s.fruleid IN (SELECT fruleid FROM t_tcvat_ybhz_income WHERE fid IN (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate'')) AND fbelongsorg = (SELECT fassignorg FROM t_tcvat_ybhz_assign WHERE fid IN (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate''))  and fseq =2))]}'); 
DELETE FROM t_tctb_formula WHERE FID = 1120283330101850112;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1120283330101850112,{ts'2021-04-08  00:00:00'},' ',' ','VAT_DRAFT_YBNSR_YBHZ_01','tcvat_zlb_ybnsr_ybhz_fpb#5#xssr',' ','增值税汇总一般企业分配表#5#一般货物及劳务销售收入','1','5','1119375361449286656','draft_zzsybnsr_ybhz','tcvat_zlb_ybnsr_ybhz_fpb','xssr',' ',' ','{S[SELECT SUM(s.ftaxamount) FROM t_tcvat_hz_account_summar s,t_tpo_taxitemrateentry t WHERE s.FBUSINESSTYPEID = t.FENTRYID AND ( t.fmergecode LIKE ''1%'' OR t.fmergecode LIKE ''2%'') AND s.fjzjt= ''0'' AND s.fsuborgid =(SELECT fassignorg FROM t_tcvat_ybhz_assign WHERE fid IN (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate''))  and fseq = 5) AND s.fstartdate = to_date(''#startDate'') AND s.fenddate = to_date(''#endDate'') AND s.ftaxpayertype = ''#taxpayertype''  AND s.fruleid IN (SELECT fruleid FROM t_tcvat_ybhz_income WHERE fid IN (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate'')) AND fbelongsorg = (SELECT fassignorg FROM t_tcvat_ybhz_assign WHERE fid IN (SELECT fid FROM t_tcvat_ybhz_policy_conf WHERE forgid = ''#orgid'' AND fstartdate = to_date(''#startDate'') AND fenddate = to_date(''#endDate''))  and fseq = 5))]}'); 
DELETE FROM t_tctb_formula WHERE FID = 1327543369928463360;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1327543369928463360,{ts'2022-01-06  00:00:00'},' ',' ','VAT_PRE_202108','tcvat_prepay#4#projectnum',' ',' ','4','4','1327514460772141056','zzsyjskb','tcvat_prepay','projectnum',' ',' ','#if(''{S[SELECT a.fprepaytype FROM T_TCVAT_PROJECT_ACCOUNT a WHERE a.fprojectid= ''#projectid'' AND a.forgid = ''#orgid'' and a.fdeclareserialno = ''#declareserialno'' ]}'' != ''VAT_YJXMLX_004'' && ''{S[SELECT a.fprepaytype  FROM T_TCVAT_PROJECT_ACCOUNT a WHERE a.fprojectid= ''#projectid'' AND a.forgid = ''#orgid'' and a.fdeclareserialno = ''#declareserialno'']}'' != ''VAT_YJXMLX_005'') {S[SELECT flicensecode FROM t_tcvat_project_account where fprojectid = ''#projectid'' and fstartdate= to_date(''#startDate'') AND fenddate = to_date(''#endDate'') and fdeclareserialno = ''#declareserialno'']} #else #end'); 
DELETE FROM t_tctb_formula WHERE FID = 1327543553001444352;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1327543553001444352,{ts'2022-01-06  00:00:00'},' ',' ','VAT_PRE_202108','tcvat_prepay#4#projectname',' ',' ','4','4','1327514460772141056','zzsyjskb','tcvat_prepay','projectname',' ',' ','#if(''{S[SELECT a.fprepaytype FROM T_TCVAT_PROJECT_ACCOUNT a WHERE a.fprojectid= ''#projectid'' AND a.forgid = ''#orgid'' and a.fdeclareserialno = ''#declareserialno'']}'' != ''VAT_YJXMLX_004'' && ''{S[SELECT a.fprepaytype  FROM T_TCVAT_PROJECT_ACCOUNT a WHERE a.fprojectid= ''#projectid'' AND a.forgid = ''#orgid'' and a.fdeclareserialno = ''#declareserialno'']}'' != ''VAT_YJXMLX_005'')  {S[SELECT fname FROM t_tcvat_project_account where fprojectid = ''#projectid'' and fstartdate= to_date(''#startDate'') AND fenddate = to_date(''#endDate'') and fdeclareserialno = ''#declareserialno'']} #else #end'); 
DELETE FROM t_tctb_formula WHERE FID = 1327544092179223552;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1327544092179223552,{ts'2022-01-06  00:00:00'},' ',' ','VAT_PRE_202108','tcvat_prepay#1#sale',' ',' ','1','1','1327514460772141056','zzsyjskb','tcvat_prepay','sale',' ',' ','{S[SELECT fsalesamount FROM T_TCVAT_PROJECT_ACCOUNT WHERE forgid = ''#orgid'' AND fprojectid= ''#projectid'' AND fprepaytype IN (''VAT_YJXMLX_001'',''VAT_YJXMLX_002'') AND fstartdate= to_date(''#startDate'') AND fenddate = to_date(''#endDate'') and fdeclareserialno = ''#declareserialno'' ]}'); 
DELETE FROM t_tctb_formula WHERE FID = 1327544242536633344;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1327544242536633344,{ts'2022-01-06  00:00:00'},' ',' ','VAT_PRE_202108','tcvat_prepay#2#sale',' ',' ','1','2','1327514460772141056','zzsyjskb','tcvat_prepay','sale',' ',' ','{S[SELECT fsalesamount FROM T_TCVAT_PROJECT_ACCOUNT WHERE forgid = ''#orgid'' AND fprojectid= ''#projectid'' AND fprepaytype IN (''VAT_YJXMLX_003'',''VAT_YJXMLX_004'') AND fstartdate= to_date(''#startDate'') AND fenddate = to_date(''#endDate'') and fdeclareserialno = ''#declareserialno'' ]}'); 
DELETE FROM t_tctb_formula WHERE FID = 1327544358785963008;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1327544358785963008,{ts'2022-01-06  00:00:00'},' ',' ','VAT_PRE_202108','tcvat_prepay#3#sale',' ',' ','1','3','1327514460772141056','zzsyjskb','tcvat_prepay','sale',' ',' ','{S[SELECT fsalesamount FROM T_TCVAT_PROJECT_ACCOUNT WHERE forgid = ''#orgid'' AND fprojectid= ''#projectid'' AND fprepaytype=''VAT_YJXMLX_005'' AND fstartdate= to_date(''#startDate'') AND fenddate = to_date(''#endDate'') and fdeclareserialno = ''#declareserialno'' ]}'); 
DELETE FROM t_tctb_formula WHERE FID = 1327544655625245696;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1327544655625245696,{ts'2022-01-06  00:00:00'},' ',' ','VAT_PRE_202108','tcvat_prepay#1#crossclaim',' ',' ','1','1','1327514460772141056','zzsyjskb','tcvat_prepay','crossclaim',' ',' ','{S[SELECT fdeductionamount FROM T_TCVAT_PROJECT_ACCOUNT WHERE forgid = ''#orgid'' AND fprojectid= ''#projectid'' AND fprepaytype IN (''VAT_YJXMLX_001'',''VAT_YJXMLX_002'') AND fstartdate= to_date(''#startDate'') AND fenddate = to_date(''#endDate'') and fdeclareserialno = ''#declareserialno'' ]}'); 
DELETE FROM t_tctb_formula WHERE FID = 1327544778015036416;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1327544778015036416,{ts'2022-01-06  00:00:00'},' ',' ','VAT_PRE_202108','tcvat_prepay#2#crossclaim',' ',' ','1','2','1327514460772141056','zzsyjskb','tcvat_prepay','crossclaim',' ',' ','{S[SELECT fdeductionamount  FROM T_TCVAT_PROJECT_ACCOUNT WHERE forgid = ''#orgid'' AND fprojectid= ''#projectid'' AND fprepaytype IN (''VAT_YJXMLX_003'',''VAT_YJXMLX_004'') AND fstartdate= to_date(''#startDate'') AND fenddate = to_date(''#endDate'') and fdeclareserialno = ''#declareserialno'' ]}'); 
DELETE FROM t_tctb_formula WHERE FID = 1327546049451185152;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1327546049451185152,{ts'2022-01-06  00:00:00'},' ',' ','VAT_PRE_202108','tcvat_prepay#1#advanceamount',' ',' ','1','1','1327514460772141056','zzsyjskb','tcvat_prepay','advanceamount',' ',' ','#if(''{S[SELECT a.flevytype FROM T_TCVAT_PROJECT_ACCOUNT a WHERE a.fprojectid= ''#projectid'' AND a.forgid = ''#orgid'' and a.fstartdate= to_date(''#startDate'') AND a.fenddate = to_date(''#endDate'') and a.fdeclareserialno = ''#declareserialno'']}'' == ''normal'')  ({Q[tcvat_prepay#1#sale]}-{Q[tcvat_prepay#1#crossclaim]})/1.09*{Q[tcvat_prepay#1#advancescale]}/100  #else  #if(''{C[#type]}'' == ''0'') ({Q[tcvat_prepay#1#sale]}-{Q[tcvat_prepay#1#crossclaim]})/1.03*{Q[tcvat_prepay#1#advancescale]}/100 #else  ({Q[tcvat_prepay#1#sale]}-{Q[tcvat_prepay#1#crossclaim]})/1.01*{Q[tcvat_prepay#1#advancescale]}/100   #end  #end'); 
DELETE FROM t_tctb_formula WHERE FID = 1327546176555373568;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1327546176555373568,{ts'2022-01-06  00:00:00'},' ',' ','VAT_PRE_202108','tcvat_prepay#2#advanceamount',' ',' ','1','2','1327514460772141056','zzsyjskb','tcvat_prepay','advanceamount',' ',' ','#if(''{S[SELECT a.fprepaytype FROM T_TCVAT_PROJECT_ACCOUNT a WHERE a.fprojectid= ''#projectid'' AND a.forgid = ''#orgid'' and a.fstartdate= to_date(''#startDate'') AND a.fenddate = to_date(''#endDate'') and a.fdeclareserialno = ''#declareserialno'']}'' == ''VAT_YJXMLX_003'')  #if(''{S[SELECT a.flevytype FROM T_TCVAT_PROJECT_ACCOUNT a WHERE a.fprojectid= ''#projectid'' AND a.forgid = ''#orgid'' and a.fstartdate= to_date(''#startDate'') AND a.fenddate = to_date(''#endDate'') and a.fdeclareserialno = ''#declareserialno'']}'' == ''normal'')  {Q[tcvat_prepay#2#sale]}/1.09*{Q[tcvat_prepay#2#advancescale]}/100 #else  {Q[tcvat_prepay#2#sale]}/1.05*{Q[tcvat_prepay#2#advancescale]}/100  #end  #else #if(''{S[SELECT a.fprepaytype FROM T_TCVAT_PROJECT_ACCOUNT a WHERE a.fprojectid= ''#projectid'' AND a.forgid = ''#orgid'' and a.fstartdate= to_date(''#startDate'') AND a.fenddate = to_date(''#endDate'') and a.fdeclareserialno = ''#declareserialno'']}'' == ''VAT_YJXMLX_004'')   ({Q[tcvat_prepay#2#sale]}-{Q[tcvat_prepay#2#crossclaim]})/1.05*{Q[tcvat_prepay#2#advancescale]} /100#else 0 #end  #end'); 
DELETE FROM t_tctb_formula WHERE FID = 1327546299985351680;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1327546299985351680,{ts'2022-01-06  00:00:00'},' ',' ','VAT_PRE_202108','tcvat_prepay#3#advanceamount',' ',' ','1','3','1327514460772141056','zzsyjskb','tcvat_prepay','advanceamount',' ',' ','#if(''{S[SELECT a.flevytype FROM T_TCVAT_PROJECT_ACCOUNT a WHERE a.fprojectid= ''#projectid'' AND a.forgid = ''#orgid'' and a.fstartdate= to_date(''#startDate'') AND a.fenddate = to_date(''#endDate'') and a.fdeclareserialno = ''#declareserialno'']}'' == ''normal'')  {Q[tcvat_prepay#3#sale]} / 1.09 * {Q[tcvat_prepay#3#advancescale]}/100  #else  {Q[tcvat_prepay#3#sale]} / 1.05 * {Q[tcvat_prepay#3#advancescale]}/100  #end'); 
DELETE FROM t_tctb_formula WHERE FID = 1386788771537664000;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1386788771537664000,{ts'2022-03-29  00:00:00'},' ',' ','VAT_PRE_202206','tcvat_prepay#4#sfsyybjsff',' ',' ','1','4','1386788769012694016','zzsyjskb','tcvat_prepay','sfsyybjsff',' ',' ','#if(''{S[SELECT a.flevytype FROM T_TCVAT_PROJECT_ACCOUNT a WHERE a.fprojectid= ''#projectid'' AND a.forgid = ''#orgid'' and a.fstartdate= to_date(''#startDate'') AND a.fenddate = to_date(''#endDate'') and a.fdeclareserialno = ''#declareserialno'']}'' == ''normal'') 1 #else 0 #end'); 
DELETE FROM t_tctb_formula WHERE FID = 1386788771537664003;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1386788771537664003,{ts'2022-03-29  00:00:00'},' ',' ','VAT_PRE_202206','tcvat_prepay#4#projectnum',' ',' ','4','4','1386788769012694016','zzsyjskb','tcvat_prepay','projectnum',' ',' ','#if(''{S[SELECT a.fprepaytype FROM T_TCVAT_PROJECT_ACCOUNT a WHERE a.fprojectid= ''#projectid'' AND a.forgid = ''#orgid'' and a.fdeclareserialno = ''#declareserialno'' ]}'' != ''VAT_YJXMLX_004'' && ''{S[SELECT a.fprepaytype  FROM T_TCVAT_PROJECT_ACCOUNT a WHERE a.fprojectid= ''#projectid'' AND a.forgid = ''#orgid'' and a.fdeclareserialno = ''#declareserialno'']}'' != ''VAT_YJXMLX_005'') {S[SELECT flicensecode FROM t_tcvat_project_account where fprojectid = ''#projectid'' and fstartdate= to_date(''#startDate'') AND fenddate = to_date(''#endDate'') and fdeclareserialno = ''#declareserialno'']} #else #end'); 
DELETE FROM t_tctb_formula WHERE FID = 1386788771537664004;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1386788771537664004,{ts'2022-03-29  00:00:00'},' ',' ','VAT_PRE_202206','tcvat_prepay#4#projectname',' ',' ','4','4','1386788769012694016','zzsyjskb','tcvat_prepay','projectname',' ',' ','#if(''{S[SELECT a.fprepaytype FROM T_TCVAT_PROJECT_ACCOUNT a WHERE a.fprojectid= ''#projectid'' AND a.forgid = ''#orgid'' and a.fdeclareserialno = ''#declareserialno'']}'' != ''VAT_YJXMLX_004'' && ''{S[SELECT a.fprepaytype  FROM T_TCVAT_PROJECT_ACCOUNT a WHERE a.fprojectid= ''#projectid'' AND a.forgid = ''#orgid'' and a.fdeclareserialno = ''#declareserialno'']}'' != ''VAT_YJXMLX_005'')  {S[SELECT fname FROM t_tcvat_project_account where fprojectid = ''#projectid'' and fstartdate= to_date(''#startDate'') AND fenddate = to_date(''#endDate'') and fdeclareserialno = ''#declareserialno'']} #else #end'); 
DELETE FROM t_tctb_formula WHERE FID = 1386788771537664018;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1386788771537664018,{ts'2022-03-29  00:00:00'},' ',' ','VAT_PRE_202206','tcvat_prepay#3#advanceamount',' ',' ','1','3','1386788769012694016','zzsyjskb','tcvat_prepay','advanceamount',' ',' ','#if(''{S[SELECT a.flevytype FROM T_TCVAT_PROJECT_ACCOUNT a WHERE a.fprojectid= ''#projectid'' AND a.forgid = ''#orgid'' and a.fstartdate= to_date(''#startDate'') AND a.fenddate = to_date(''#endDate'') and a.fdeclareserialno = ''#declareserialno'']}'' == ''normal'')  {Q[tcvat_prepay#3#sale]} / 1.09 * {Q[tcvat_prepay#3#advancescale]}/100  #else  {Q[tcvat_prepay#3#sale]} / 1.05 * {Q[tcvat_prepay#3#advancescale]}/100  #end'); 
