MaiXinRong 3 anni fa
parent
commit
ffed8a0192
1 ha cambiato i file con 3 aggiunte e 3 eliminazioni
  1. 3 3
      app/lib/analysis_excel.js

+ 3 - 3
app/lib/analysis_excel.js

@@ -973,12 +973,12 @@ class AnalysisStageExcelTree extends AnalysisExcelTree {
         node.unit_price = this.ctx.helper.round(aeUtils.toNumber(row[this.colsDef.unit_price]), this.decimal.up);
         const precision = this.ctx.helper.findPrecision(this.precision, node.unit);
         node.contract_qty = this.ctx.helper.round(aeUtils.toNumber(row[this.colsDef.contract_qty]), precision.value);
-        if (node.quantity && node.unit_price) {
-            node.contract_tp = this.ctx.helper.mul(node.quantity, node.unit_price, this.decimal.tp);
+        if (node.contract_qty && node.unit_price) {
+            node.contract_tp = this.ctx.helper.mul(node.contract_qty, node.unit_price, this.decimal.tp);
         } else {
             node.contract_tp = null;
         }
-        if (this.filter.filterZeroGcl && !node.quantity && !node.total_price) return true;
+        if (this.filter.filterZeroGcl && !node.contract_qty && !node.contract_tp) return true;
         return this.cacheTree.addGclNode(node);
     }
     /**