MaiXinRong 3 rokov pred
rodič
commit
56c9fbb0c7
1 zmenil súbory, kde vykonal 1 pridanie a 1 odobranie
  1. 1 1
      app/service/ledger_history.js

+ 1 - 1
app/service/ledger_history.js

@@ -74,7 +74,7 @@ module.exports = app => {
             const sbCount = await this.ctx.service.ledger.count({ tender_id: this.ctx.stage.tid });
             const spCount = await this.ctx.service.pos.count({ tid: this.ctx.stage.tid });
             const ledgerHis = await this.ctx.service.ledgerHistory.getLatestHistory(this.ctx.tender.id);
-            if (sbCount === ledgerHis.bills_count || spCount === ledgerHis.pos_count) return ledgerHis.id;
+            if (sbCount === ledgerHis.bills_count && spCount === ledgerHis.pos_count) return ledgerHis.id;
 
             const now = new Date();
             const timestamp = (now).getTime();