/* 财务应收单表头已结算金额、已结算折本币、发票日期字段数据升级 */
update t_ar_finarbill_e set fsettleamount = 0, fsettlelocalamt = 0;
update t_ar_finarbill_e a set fsettleamount = (select b.frecamount-b.funsettleamount from t_ar_finarbill b where b.fid = a.fid) where exists(select 1 from t_ar_finarbill b where a.fid=b.fid);
update t_ar_finarbill_e a set fsettlelocalamt = (select b.freclocalamt-b.funsettlelocalamt from t_ar_finarbill b where b.fid = a.fid) where exists(select 1 from t_ar_finarbill b where a.fid=b.fid);