MaiXinRong 1 月之前
父節點
當前提交
17dec09e1d
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      app/lib/sum_load.js

+ 2 - 2
app/lib/sum_load.js

@@ -409,7 +409,7 @@ class gatherStageGclTree extends loadGclBaseTree {
             let end_contract_qty = node.contract_qty;
             activeQty = this.ctx.helper.add(activeQty, node.pre_qc_minus_qty);
             end_contract_qty = this.ctx.helper.add(end_contract_qty, node.pre_contract_qty);
-            const end_contract_tp = this.ctx.helper.mul(this.ctx.helper.div(end_contract_qty, activeQty), node.total_price, decimal.tp);
+            const end_contract_tp = this.ctx.helper.mul(this.ctx.helper.div(end_contract_qty, activeQty), node.total_price, info.decimal.tp);
             return this.ctx.helper.sub(end_contract_tp, node.pre_contract_tp);
         } else if (info.calc_type === 'up') {
             if (correct) {
@@ -417,7 +417,7 @@ class gatherStageGclTree extends loadGclBaseTree {
                 let end_contract_qty = node.contract_qty;
                 activeQty = this.ctx.helper.add(activeQty, node.pre_qc_minus_qty);
                 end_contract_qty = this.ctx.helper.add(end_contract_qty, node.pre_contract_qty);
-                const end_contract_tp = this.ctx.helper.mul(end_contract_qty, node.total_price, decimal.tp);
+                const end_contract_tp = this.ctx.helper.mul(end_contract_qty, node.total_price, info.decimal.tp);
                 return activeQty === end_contract_qty ? this.ctx.helper.sub(end_contract_tp, node.pre_contract_tp) : this.ctx.helper.mul(node.unit_price, node.contract_qty, info.decimal.tp);
             } else {
                 return this.ctx.helper.mul(node.unit_price, node.contract_qty, info.decimal.tp);