DELETE FROM t_tctb_formula WHERE FID = 1616568741121108992;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1616568741121108992,{ts'2023-02-24  00:00:00'},' ',' ','VAT_DRAFT_YBNSR_01','tcvat_zlb_ybnsr#35#ybxm',' ','增值税一般纳税人总览表#35#一般项目','1','35','1611554577046620160','draft_zzsybnsr_sjjt','tcvat_zlb_ybnsr','ybxm',' ',' ','if({C[#cswhjssenable]} = 1, {Q[tcvat_zlb_ybnsr#34#ybxm]}+{Q[tcvat_zlb_ybnsr#34#jzjtxm]} + min({S[select sum(fqmye) from t_tcvat_ybnsr_jsxm where fsbbid =''#predeclaresbbid'' and fswsxdm in (789806480298652672,789806480307039232,789806484249687040,789806484258073600,789806484266464256,789806484274850816)]} + {S[select sum(fcurrentamount) from t_tcvat_taxreduc_sum_sjjt where forgid = #orgid and ftaxperiod in (''#startPeriod'',''#middlePeriod'',''#endPeriod'') and fdeadline=''#deadline'' and ftaxreductionid in (789806480298652672,789806480307039232,789806484249687040,789806484258073600,789806484266464256,789806484274850816)]} ,{Q[tcvat_zlb_ybnsr#28#ybxm]}+{Q[tcvat_zlb_ybnsr#28#jzjtxm]}),0)');
DELETE FROM t_tctb_formula WHERE FID = 1616568890102787072;
INSERT INTO t_tctb_formula(FID,FUPDATETIME,FCONTENT,FTITLE,FTEMPLATENUM,FFORMULAKEY,FFORMULANAME,FNAME,FFORMULATYPE,FROW,FTEMPLATEID,FTAXTYPE,FTABLE,FCOLUMN,FCELLTYPE,FDESCRIBE,FFORMULA) VALUES (1616568890102787072,{ts'2023-02-24  00:00:00'},' ',' ','VAT_DRAFT_YBNSR_01','tcvat_zlb_ybnsr#37#ybxm',' ','增值税一般纳税人总览表#37#一般项目','1','37','1611554577046620160','draft_zzsybnsr_sjjt','tcvat_zlb_ybnsr','ybxm',' ',' ','if( {Q[tcvat_zlb_ybnsr#35#ybxm]} + {Q[tcvat_zlb_ybnsr#36#ybxm]} >= 0 && {Q[tcvat_zlb_ybnsr#59#ybxm]} + {Q[tcvat_zlb_ybnsr#60#ybxm]} >= 0, min({Q[tcvat_zlb_ybnsr#35#ybxm]} + {Q[tcvat_zlb_ybnsr#36#ybxm]},{Q[tcvat_zlb_ybnsr#59#ybxm]} + {Q[tcvat_zlb_ybnsr#60#ybxm]}),0)');
