|
@@ -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);
|