/**  对公报销单发票信息分录添加多次报销开关后，非多次报销的发票 本次报销金额应该等于总额 历史数据维护 **/
UPDATE t_er_pubreiminvoiceinfo BILL SET (fpoolreimburseamount,fismutilreimburse) =  (SELECT TI.ftotalamount,'0' fismutilreimburse FROM t_er_pubreiminvoiceinfo TI WHERE TI.fentryid = BILL.fentryid and  (TI.fismutilreimburse is null or TI.fismutilreimburse ='0' ) and (TI.fpoolreimburseamount is null or TI.fpoolreimburseamount=0) ) WHERE EXISTS (select 1 from t_er_pubreimbill TI2 where TI2.fbillstatus in('A','B','C','D','E','F') and BILL.FID = TI2.FID );