|
@@ -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 });
|