Browse Source

台账分解,导出Excel调整

MaiXinRong 3 năm trước cách đây
mục cha
commit
d2a70e6d17
1 tập tin đã thay đổi với 4 bổ sung1 xóa
  1. 4 1
      app/public/js/ledger.js

+ 4 - 1
app/public/js/ledger.js

@@ -3371,10 +3371,13 @@ $(document).ready(function() {
             headerFont: 'bold 10px 微软雅黑',
             font: '10px 微软雅黑'
         };
+        const hasCl = ledgerSpreadSetting.cols.find(x => { return x.field === 'sjcl_qty'});
+        const qtyF = hasCl ? 'quantity' : 'sgfh_qty';
+        const tpF = hasCl ? 'total_price' : 'sgfh_tp';
         for (const node of ledgerTree.nodes) {
             data.push({
                 code: node.code, b_code: node.b_code, name: node.name, unit: node.unit,
-                unit_price: node.unit_price, quantity: node.quantity, total_price: node.total_price,
+                unit_price: node.unit_price, quantity: node[qtyF], total_price: node[tpF],
                 dgn_qty1: node.dgn_qty1, dgn_qty2: node.dgn_qty2,
                 drawing_code: node.drawing_code, memo: node.memo
             });