Explorar el Código

财务账面,明细数据汇总计算问题

MaiXinRong hace 2 días
padre
commit
9a7cef49f9
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  1. 3 1
      app/service/cost_stage_book_detail.js

+ 3 - 1
app/service/cost_stage_book_detail.js

@@ -103,7 +103,7 @@ module.exports = app => {
         async _getBookUpdateData(data, ledger_id, details) {
             const detailDatas = details || await this.getAllDataByCondition({ columns: ['id', 'ledger_id', ...costFields.curFields], where: { ledger_id, stage_id: this.ctx.costStage.id } });
 
-            const updateData = { id: ledger_id, update_user_id: this.ctx.session.sessionUser.accountId };
+            const updateData = { update_user_id: this.ctx.session.sessionUser.accountId };
             for (const prop of costFields.curFields) {
                 updateData[prop] = 0;
             }
@@ -169,6 +169,8 @@ module.exports = app => {
                     bookUpdate.ledger_id = orgLedger.id;
                     bookUpdate.cost_id = orgLedger.cost_id;
                     bookUpdate.add_user_id = user_id;
+                } else {
+                    bookUpdate.id = orgBook.id;
                 }
             }