-- 容差类型预制数据，增加付款处理与采购订单、采购合同、委外采购订单的总额控制的容差类型预制数据

IF NOT EXISTS (SELECT 1 FROM t_ap_tolerancetype WHERE FID = 2013776737128727552)
INSERT INTO t_ap_tolerancetype(FID,FCONTROLITEMNAME,FISPREINSERT,FCONTRASTITEMNAME,FCONTRASTITEM,FMASTERID,FSTATUS,FNUMBER,FNAME,FCREATETIME,FCONTROLLER,FMODIFIERID,FENABLE,FMODIFYTIME,FCONTROLITEM,FCONTRASTER,FDESCRIBE,FCREATORID) VALUES (2013776737128727552,'付款明细.应付金额','1','价税合计','totalallamount',2013776737128727552,'C','056_S','付款处理与采购订单总额差异',{ts'2018-08-08  00:00:00'},'cas_paybill',1,'1',{ts'2018-08-08  00:00:00'},'e_payableamt','pm_purorderbill',' ',1); 

IF NOT EXISTS (SELECT 1 FROM t_ap_tolerancetype WHERE FID = 2013777251727884288)
INSERT INTO t_ap_tolerancetype(FID,FCONTROLITEMNAME,FISPREINSERT,FCONTRASTITEMNAME,FCONTRASTITEM,FMASTERID,FSTATUS,FNUMBER,FNAME,FCREATETIME,FCONTROLLER,FMODIFIERID,FENABLE,FMODIFYTIME,FCONTROLITEM,FCONTRASTER,FDESCRIBE,FCREATORID) VALUES (2013777251727884288,'付款明细.应付金额','1','价税合计','totalallamount',2013777251727884288,'C','057_S','付款处理与委外采购订单总额差异',{ts'2018-08-08  00:00:00'},'cas_paybill',1,'1',{ts'2018-08-08  00:00:00'},'e_payableamt','sctm_scpo',' ',1); 

IF NOT EXISTS (SELECT 1 FROM t_ap_tolerancetype WHERE FID = 2013777574018204672)
INSERT INTO t_ap_tolerancetype(FID,FCONTROLITEMNAME,FISPREINSERT,FCONTRASTITEMNAME,FCONTRASTITEM,FMASTERID,FSTATUS,FNUMBER,FNAME,FCREATETIME,FCONTROLLER,FMODIFIERID,FENABLE,FMODIFYTIME,FCONTROLITEM,FCONTRASTER,FDESCRIBE,FCREATORID) VALUES (2013777574018204672,'付款明细.应付金额','1','价税合计','totalallamount',2013777574018204672,'C','058_S','付款处理与采购合同总额差异',{ts'2018-08-08  00:00:00'},'cas_paybill',1,'1',{ts'2018-08-08  00:00:00'},'e_payableamt','conm_purcontract',' ',1); 


IF NOT EXISTS (SELECT 1 FROM t_ap_tolerancetype_l WHERE FPKID = '4ABTIMYGO=3M')
INSERT INTO t_ap_tolerancetype_l(FID,FPKID,FLOCALEID,FNAME) VALUES (2013776737128727552,'4ABTIMYGO=3M','zh_CN','付款处理与采购订单总额差异'); 

IF NOT EXISTS (SELECT 1 FROM t_ap_tolerancetype_l WHERE FPKID = '4ABTMD13BGVO')
INSERT INTO t_ap_tolerancetype_l(FID,FPKID,FLOCALEID,FNAME) VALUES (2013777251727884288,'4ABTMD13BGVO','zh_CN','付款处理与委外采购订单总额差异'); 

IF NOT EXISTS (SELECT 1 FROM t_ap_tolerancetype_l WHERE FPKID = '4ABTOQNA1PGH')
INSERT INTO t_ap_tolerancetype_l(FID,FPKID,FLOCALEID,FNAME) VALUES (2013777574018204672,'4ABTOQNA1PGH','zh_CN','付款处理与采购合同总额差异'); 

