|
@@ -73,7 +73,7 @@ class loadStageExcelTree {
|
|
|
end_contract_qty = this.ctx.helper.add(end_contract_qty, preSb.contract_qty);
|
|
|
}
|
|
|
const end_contract_tp = this.ctx.helper.mul(this.ctx.helper.div(end_contract_qty, activeQty), node.total_price, this.decimal.tp);
|
|
|
- return preSb ? this.ctx.helper.sub(end_contract_tp, preSb.pre_contract_tp) : end_contract_tp;
|
|
|
+ return preSb ? this.ctx.helper.sub(end_contract_tp, preSb.contract_tp) : end_contract_tp;
|
|
|
} else if (this.info.calc_type === 'up') {
|
|
|
if (correct) {
|
|
|
const preSb = this.preStageBills.find(x => { return x.lid === node.id; });
|
|
@@ -84,7 +84,7 @@ class loadStageExcelTree {
|
|
|
end_contract_qty = this.ctx.helper.add(end_contract_qty, preSb.contract_qty);
|
|
|
}
|
|
|
const end_contract_tp = this.ctx.helper.mul(end_contract_qty, node.unit_price, this.decimal.tp);
|
|
|
- return activeQty === end_contract_qty ? this.ctx.helper.sub(end_contract_tp, preSb.pre_contract_tp) : this.ctx.helper.mul(contract_qty, node.unit_price, this.decimal.tp);
|
|
|
+ return activeQty === end_contract_qty ? this.ctx.helper.sub(end_contract_tp, preSb.contract_tp) : this.ctx.helper.mul(contract_qty, node.unit_price, this.decimal.tp);
|
|
|
} else {
|
|
|
return this.ctx.helper.mul(contract_qty, node.unit_price, this.decimal.tp);
|
|
|
}
|