MaiXinRong преди 1 година
родител
ревизия
7f8eaa868c
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  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;
             });