MaiXinRong 2 napja
szülő
commit
2c6022ea0f
1 módosított fájl, 1 hozzáadás és 1 törlés
  1. 1 1
      app/service/cost_stage_analysis.js

+ 1 - 1
app/service/cost_stage_analysis.js

@@ -175,7 +175,7 @@ module.exports = app => {
                     ln[prop] = 0;
                     ln[prop] = 0;
                 }
                 }
                 insertLedgerData.push(ln);
                 insertLedgerData.push(ln);
-                if (node.detail) {
+                if (node.detail && node.detail.length > 0) {
                     for (const [i, d] of node.detail.entries()) {
                     for (const [i, d] of node.detail.entries()) {
                         const idd = {
                         const idd = {
                             id: this.uuid.v4(), tender_id: stage.tid, stage_id: stage.id,
                             id: this.uuid.v4(), tender_id: stage.tid, stage_id: stage.id,