Browse Source

合同支付,引用计算,兼容引用行被删除的情况

MaiXinRong 2 years ago
parent
commit
19effc586f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      app/lib/pay_calc.js

+ 1 - 1
app/lib/pay_calc.js

@@ -59,7 +59,7 @@ class PayCalculate {
             for (const op of orderParam) {
                 const order = parseInt(op.substring(1, op.length));
                 const orderPay = pays.find(x => { return x.order === order });
-                formula = formula.replace(op, orderPay.tp || 0);
+                formula = formula.replace(op, orderPay && orderPay.tp || 0);
             }
         }
         for (const b of this.bases) {