MaiXinRong 3 년 전
부모
커밋
b7598c9393
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      app/service/stage_change.js

+ 3 - 1
app/service/stage_change.js

@@ -467,8 +467,10 @@ module.exports = app => {
             }
             const stageChangeBills = await this._getChangeBillsWithUsedInfo(stage);
             for (const scb of stageChangeBills) {
+                if (!scb.qty) continue;
+
                 const cb = changeBillsIndex[scb.cbid];
-                cb.used_qty = this.ctx.helper.add(cb.used_qty, scb.qty);
+                if (cb) cb.used_qty = this.ctx.helper.add(cb.used_qty, scb.qty);
             }
             for (const cid in changeBillsPart) {
                 const c = change.find(x => { return x.cid === cid });