|
@@ -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;
|
|
|
});
|