|
@@ -699,10 +699,11 @@ module.exports = app => {
|
|
for (const t of tenders) {
|
|
for (const t of tenders) {
|
|
await this.ctx.service.tenderCache.loadTenderCache(t, this.ctx.session.sessionUser.accountId);
|
|
await this.ctx.service.tenderCache.loadTenderCache(t, this.ctx.session.sessionUser.accountId);
|
|
tp_cache.contract_price = this.ctx.helper.add(tp_cache.contract_price, t.contract_price);
|
|
tp_cache.contract_price = this.ctx.helper.add(tp_cache.contract_price, t.contract_price);
|
|
- tp_cache.ledger_tp = this.ctx.helper.add(tp_cache.ledger_tp, t.ledger_tp.total_price);
|
|
|
|
|
|
+ if (t.ledger_tp) tp_cache.ledger_tp = this.ctx.helper.add(tp_cache.ledger_tp, t.ledger_tp.total_price;
|
|
tp_cache.advance_tp = this.ctx.helper.add(tp_cache.advance_tp, t.advance_tp);
|
|
tp_cache.advance_tp = this.ctx.helper.add(tp_cache.advance_tp, t.advance_tp);
|
|
tp_cache.change_tp = this.ctx.helper.add(tp_cache.change_tp, t.change_tp);
|
|
tp_cache.change_tp = this.ctx.helper.add(tp_cache.change_tp, t.change_tp);
|
|
|
|
|
|
|
|
+ if (!t.stage_tp) continue;
|
|
tp_cache.contract_tp = this.ctx.helper.add(tp_cache.contract_tp, t.stage_tp.contract_tp);
|
|
tp_cache.contract_tp = this.ctx.helper.add(tp_cache.contract_tp, t.stage_tp.contract_tp);
|
|
tp_cache.qc_tp = this.ctx.helper.add(tp_cache.qc_tp, t.stage_tp.qc_tp);
|
|
tp_cache.qc_tp = this.ctx.helper.add(tp_cache.qc_tp, t.stage_tp.qc_tp);
|
|
tp_cache.positive_qc_tp = this.ctx.helper.add(tp_cache.positive_qc_tp, t.stage_tp.positive_qc_tp);
|
|
tp_cache.positive_qc_tp = this.ctx.helper.add(tp_cache.positive_qc_tp, t.stage_tp.positive_qc_tp);
|