Explorar o código

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

lanjianrong %!s(int64=4) %!d(string=hai) anos
pai
achega
d8d3b20dd2
Modificáronse 1 ficheiros con 3 adicións e 2 borrados
  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);
                 }
             }