Browse Source

Merge branch 'dev' of http://192.168.1.41:3000/maixinrong/Calculation into dev

Tony Kang 1 year ago
parent
commit
5e24e342cc
1 changed files with 2 additions and 2 deletions
  1. 2 2
      app/service/stage_change_final.js

+ 2 - 2
app/service/stage_change_final.js

@@ -104,8 +104,8 @@ module.exports = app => {
 
             return changeBills.filter(cb => {
                 cb.qty = parseFloat(cb.samount);
-                const qtyDecimal = self.ctx.helper.findDecimal(changeBills.unit);
-                cb.limitQty = self.ctx.helper.mul(cb.qty, self.ctx.helper.div(changeBills.delimit, 100, 2), qtyDecimal);
+                const qtyDecimal = self.ctx.helper.findDecimal(cb.unit);
+                cb.limitQty = self.ctx.helper.mul(cb.qty, self.ctx.helper.div(cb.delimit, 100, 2), qtyDecimal);
                 cb.valid_qty = self.ctx.helper.sub(cb.limitQty, cb.used_qty);
                 return cb.valid_qty;
             });