Procházet zdrojové kódy

合同支付,本期合同、本期完成,达起扣金额时,计算bug

MaiXinRong před 1 měsícem
rodič
revize
a1d0af4bbd
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1 1
      app/service/phase_pay_detail.js

+ 1 - 1
app/service/phase_pay_detail.js

@@ -101,7 +101,7 @@ class PayCalculator {
         }
         }
         for (const b of this.bases) {
         for (const b of this.bases) {
             const value = b.checkStart && (!pay.pre_used && pay.start_tp)
             const value = b.checkStart && (!pay.pre_used && pay.start_tp)
-                ? this.ctx.helper.sub(this.addBase[pay.checkStart], pay.start_tp)
+                ? Math.max(this.ctx.helper.sub(this.addBase[b.checkStart], pay.start_tp), 0)
                 : b.value;
                 : b.value;
             formula = formula.replace(b.reg, value);
             formula = formula.replace(b.reg, value);
         }
         }