|
@@ -415,7 +415,7 @@ class gatherStageGclTree extends loadGclBaseTree {
|
|
return this.ctx.helper.sub(end_contract_tp, node.pre_contract_tp);
|
|
return this.ctx.helper.sub(end_contract_tp, node.pre_contract_tp);
|
|
} else if (info.calc_type === 'up') {
|
|
} else if (info.calc_type === 'up') {
|
|
if (correct) {
|
|
if (correct) {
|
|
- let activeQty = this.ctx.helper.add(node.quantity, node.qc_minus_qty);
|
|
|
|
|
|
+ let activeQty = this.ctx.helper.add(node.quantity, node.qc_minus_qty || node.org_qc_minus_qty);
|
|
let end_contract_qty = node.contract_qty;
|
|
let end_contract_qty = node.contract_qty;
|
|
activeQty = this.ctx.helper.add(activeQty, node.pre_qc_minus_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);
|
|
end_contract_qty = this.ctx.helper.add(end_contract_qty, node.pre_contract_qty);
|
|
@@ -460,7 +460,7 @@ class gatherStageGclTree extends loadGclBaseTree {
|
|
for (const bn of this.baseNodes) {
|
|
for (const bn of this.baseNodes) {
|
|
if (!this.cover && !bn.is_import && !bn.contract_qty && !bn.qc_qty && !bn.contract_tp && !bn.qc_minus_qty) continue;
|
|
if (!this.cover && !bn.is_import && !bn.contract_qty && !bn.qc_qty && !bn.contract_tp && !bn.qc_minus_qty) continue;
|
|
|
|
|
|
- if (!bn.is_import && bn.org_qc_qty !== 0 && bn.qc_qty !== 0) {
|
|
|
|
|
|
+ if (!bn.is_import && ((bn.org_qc_qty !== 0 && bn.qc_qty !== 0) || (bn.org_qc_minus_qty !== 0 && bn.qc_minus_qty !== 0))) {
|
|
result.errors.push({ b_code: bn.b_code, name: bn.name, unit: bn.unit, qc_qty: bn.qc_qty, qc_minus_qty: bn.qc_minus_qty, ledger_id: bn.ledger_id, type: 'qc-conflict'});
|
|
result.errors.push({ b_code: bn.b_code, name: bn.name, unit: bn.unit, qc_qty: bn.qc_qty, qc_minus_qty: bn.qc_minus_qty, ledger_id: bn.ledger_id, type: 'qc-conflict'});
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|