Browse Source

fix: 修复预付款截至本期金额计算错误的bug

lanjianrong 4 years ago
parent
commit
d8d3b20dd2
1 changed files with 3 additions and 2 deletions
  1. 3 2
      app/service/tender_info.js

+ 3 - 2
app/service/tender_info.js

@@ -232,8 +232,9 @@ module.exports = app => {
                 // 根据精度重新计算相关金额
                 for (const ad of ad_bills) {
                     const cb = { id: ad.id };
-                    cb.cur_amount = this.ctx.helper.round(ad.cur_amount, decimal);
-                    cb.prev_total_amount = this.ctx.helper.add(ad.cur_amount, ad.prev_amount);
+                    const cur_amount = this.ctx.helper.round(ad.cur_amount, decimal);
+                    cb.cur_amount = cur_amount;
+                    cb.prev_total_amount = this.ctx.helper.add(cur_amount, ad.prev_amount);
                     changeAdvanceBills.push(cb);
                 }
             }