MaiXinRong 4 年之前
父節點
當前提交
3d6bbe8670
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      app/lib/ledger.js

+ 3 - 3
app/lib/ledger.js

@@ -638,7 +638,7 @@ class checkData {
         }
     };
 
-    _checkLeafBills3fLimit(checkType, bills, result, checkInfo) {
+    _checkLeafBills3fLimit(checkType, bills, checkInfo) {
         const over = [], lost = [];
         const posRange = this.checkPos.getLedgerPos(bills.id);
         if (posRange && posRange.length > 0) {
@@ -871,7 +871,7 @@ class checkData {
         const isTz = this.ctx.tender.data.measure_type === this.measureType.tz.value;
         for (const b of this.checkBills.nodes) {
             if (b.children && b.children.length > 0) continue;
-            const pr = this.checkPos.getLedgerPos(b.id);
+            const pr = this.checkPos.getLedgerPos(b.id) || [];
 
             if (this._checkBillsOverRange(b, pr, isTz)) {
                 this.checkResult.error.push({
@@ -882,7 +882,7 @@ class checkData {
                 });
                 if (!this.checkResult.source.bills.find(x => {return x.ledger_id === b.ledger_id})) {
                     this.checkResult.source.bills.push(b);
-                    if (pr && pr.length > 0) this.checkResult.source.pos.push(...pr);
+                    if (pr.length > 0) this.checkResult.source.pos.push(...pr);
                 }
             }
         }