Selaa lähdekoodia

台账修订,章节合计,计算问题

MaiXinRong 4 vuotta sitten
vanhempi
commit
7cba16d0c4
1 muutettua tiedostoa jossa 8 lisäystä ja 11 poistoa
  1. 8 11
      app/public/js/shares/gcl_gather_compare.js

+ 8 - 11
app/public/js/shares/gcl_gather_compare.js

@@ -332,22 +332,22 @@ const gclCompareModel = (function () {
             if (d.children && d.children.length > 0) continue;
 
             if (checkFilterPath(d,otherChapter.zlj.matchPath)) {
-                gatherfields(otherChapter.zlj, d, fields);
-                gatherfields(otherChapter.hj, d, fields);
+                gatherfields(otherChapter.zlj, d, ledgerSetting.chapterFields, ledgerSetting.prefix);
+                gatherfields(otherChapter.hj, d, ledgerSetting.chapterFields, ledgerSetting.prefix);
             } else {
-                gatherfields(otherChapter.hj, d, fields);
+                gatherfields(otherChapter.hj, d, ledgerSetting.chapterFields, ledgerSetting.prefix);
                 if (d.b_code) {
-                    gatherfields(otherChapter.qd, d, fields);
+                    gatherfields(otherChapter.qd, d, ledgerSetting.chapterFields, ledgerSetting.prefix);
                 }
                 if (!d.b_code || d.b_code === '') {
-                    gatherfields(otherChapter.fqd, d, fields);
+                    gatherfields(otherChapter.fqd, d, ledgerSetting.chapterFields, ledgerSetting.prefix);
                 }
 
                 if (d.b_code) {
                     const c = checkFilterPath(d, chapterFilterPath)
                         ? gclChapter.find(x => { return x.cType === 21})
                         : _getGclChapter(gclChapter, d);
-                    gatherfields(c, d, fields);
+                    gatherfields(c, d, ledgerSetting.chapterFields, ledgerSetting.prefix);
                 }
             }
         }
@@ -444,11 +444,8 @@ const gclCompareModel = (function () {
                 gcl.deal_bills_qty = node.quantity || 0;
                 gcl.deal_bills_tp = node.total_price || 0;
 
-                for (const c of otherChapter) {
-                    if (c.cType === 41 || c.cType === 11) {
-                        c.deal_bills_tp = ZhCalc.add(c.deal_bills_tp, node.total_price);
-                    }
-                }
+                otherChapter.hj.deal_bills_tp = ZhCalc.add(otherChapter.hj.deal_bills_tp, node.total_price);
+                otherChapter.qd.deal_bills_tp = ZhCalc.add(otherChapter.qd.deal_bills_tp, node.total_price);
                 const c = _getGclChapter(gclChapter, node);
                 c.deal_bills_tp = ZhCalc.add(c.deal_bills_tp, node.total_price);
             }