MaiXinRong 1 год назад
Родитель
Сommit
dea8362506
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      app/lib/ledger.js

+ 2 - 2
app/lib/ledger.js

@@ -1115,8 +1115,8 @@ class checkData {
             if (!c.used) return;
             if (!c.used) return;
             c.bills.forEach(b => {
             c.bills.forEach(b => {
                 if (!b.cur_used) return;
                 if (!b.cur_used) return;
-                const qtyDecimal = this.ctx.helper.findDecimal(changeBills.unit);
-                const limitQty = this.ctx.helper.mul(qty, this.ctx.helper.div(changeBills.delimit, 100, 2), qtyDecimal);
+                const qtyDecimal = helper.findDecimal(changeBills.unit);
+                const limitQty = helper.mul(b.qty, helper.div(changeBills.delimit, 100, 2), qtyDecimal);
                 if (Math.abs(b.used_qty) > Math.abs(limitQty)) error.push({ b_code: b.code, name: b.name, errorType: 'change_over', memo: c.code, lid: b.lid });
                 if (Math.abs(b.used_qty) > Math.abs(limitQty)) error.push({ b_code: b.code, name: b.name, errorType: 'change_over', memo: c.code, lid: b.lid });
 
 
             });
             });