/** 立项单 立项明细 历史核定税额 = 核定金额/（1+税率） * 税率 **/
UPDATE t_er_applyprojectentry SET fapprovetax = (fexpeapproveamount * (ftaxrate / 100) / (1+(ftaxrate / 100)));

/** 暂估单 暂估明细 历史核定税额 = 核定金额/（1+税率） * 税率 **/
UPDATE t_er_costestimateentry SET fapprovetax = (fexpeapproveamount * (ftaxrate / 100) / (1+(ftaxrate / 100)));

/** 立项单 摊销明细 历史核定税额 = 税额 **/
UPDATE t_er_applyprojectshared SET fapprovetax = ftaxamount;

/** 暂估单 摊销明细 历史核定税额 = 税额 **/
UPDATE t_er_costestimateshared SET fapprovetax = ftaxamount;

/** 对公报销单 摊销明细 历史核定税额 = 抵扣税额 **/
UPDATE t_er_publicresharedetail SET fapprovetax = fdeductibletax;

/** 费用报销单 摊销明细 历史核定税额 = 抵扣税额 **/
UPDATE t_er_dailyresharedetail SET fapprovetax = fdeductibletax;

/** 差旅报销单 摊销明细 历史核定税额 = 抵扣税额 **/
UPDATE t_er_tripresharedetail SET fapprovetax = fdeductibletax;