Przeglądaj źródła

导入计量,清单无导入不计价变更的情况下,读取原不计价进行计算

MaiXinRong 2 tygodni temu
rodzic
commit
773d57848c
1 zmienionych plików z 2 dodań i 2 usunięć
  1. 2 2
      app/lib/sum_load.js

+ 2 - 2
app/lib/sum_load.js

@@ -415,7 +415,7 @@ class gatherStageGclTree extends loadGclBaseTree {
             return this.ctx.helper.sub(end_contract_tp, node.pre_contract_tp);
         } else if (info.calc_type === 'up') {
             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;
                 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);
@@ -460,7 +460,7 @@ class gatherStageGclTree extends loadGclBaseTree {
         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 (!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'});
                 continue;
             }