Explorar o código

fix: 修复新建预付款期截止本期金额数据异常的bug

lanjianrong %!s(int64=4) %!d(string=hai) anos
pai
achega
b3dada0395
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      app/service/advance.js

+ 1 - 1
app/service/advance.js

@@ -76,7 +76,7 @@ module.exports = app => {
             const tid = ctx.tender.id;
             const latestOrder = await this.getLastestAdvance(tid, type);
             const order = !latestOrder ? 1 : latestOrder.order + 1;
-            const record = await this.db.insert(this.tableName, { type, uid, tid, status: auditConst.status.uncheck, order });
+            const record = await this.db.insert(this.tableName, { type, uid, tid, status: auditConst.status.uncheck, order, prev_amount: latestOrder.prev_total_amount });
             return await this.getDataById(record.insertId);
         }