/* 建筑项目云需求 更新历史数据 */
/* 对公报销单-费用明细分录-价款字段 */
UPDATE t_er_pubreimexpdet SET fprice = fexpeapproveamount - fdeductibletax;
/* 费用报销单-费用明细分录-价款字段 */
UPDATE t_er_expensedetail SET fprice = fexpeapproveamount - fdeductibletax;
/* 差旅报销单报销单-行程信息分录-费用明细分录-“价款”字段 */
UPDATE T_ER_ReimburseEntry SET fprice = FOriEntryAppAmount - fdeductibletax;
/* 差旅报销单报销单-行程信息分录-“价款汇总”字段 */
UPDATE T_ER_ReimburseTripEntry T SET fpricetotal=(SELECT SUM(E.fprice*E.FExchangeRate) FROM T_ER_ReimburseEntry E WHERE E.fentryid=T.fentryid) WHERE EXISTS (SELECT 1 FROM T_ER_ReimburseEntry E WHERE E.fentryid=T.fentryid);