소스 검색

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

MaiXinRong 2 년 전
부모
커밋
19effc586f
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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) {