MaiXinRong 3 年之前
父节点
当前提交
88c8cec8f8
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      app/service/stage_pos.js

+ 1 - 1
app/service/stage_pos.js

@@ -364,7 +364,7 @@ module.exports = app => {
                 if (updateBills) await transaction.update(this.ctx.service.ledger.tableName, updateBills);
                 if (updatePosStage.length > 0) await transaction.updateRows(this.tableName, updatePosStage);
                 if (insertPosStage.length > 0) await transaction.insert(this.tableName, insertPosStage);
-                await this.ctx.service.stageBills.calc(this.ctx.tender.id, this.ctx.stage.id, bills.id, transaction);
+                if (bills) await this.ctx.service.stageBills.calc(this.ctx.tender.id, this.ctx.stage.id, bills.id, transaction);
                 await transaction.commit();
                 return result;
             } catch (err) {