Procházet zdrojové kódy

永久材料计算调整

MaiXinRong před 11 měsíci
rodič
revize
799ee9c9c3
1 změnil soubory, kde provedl 5 přidání a 1 odebrání
  1. 5 1
      app/service/stage_yjcl.js

+ 5 - 1
app/service/stage_yjcl.js

@@ -144,7 +144,11 @@ module.exports = app => {
                     unit_price = nd.unit_price;
                     ex_tax_up = nd.ex_tax_up;
                 }
-                if (d.qty !== undefined || nd.unit_price !== undefined) nd.qty = d.qty ? this.ctx.helper.round(d.qty, decimal.qty) : 0;
+                if (d.qty !== undefined) {
+                    nd.qty = d.qty ? this.ctx.helper.round(d.qty, decimal.qty) : 0;
+                } else {
+                    nd.qty = od.qty;
+                }
                 if (nd.qty !== undefined) nd.tp = this.ctx.helper.mul(unit_price, nd.qty, tpDecimal);
                 uDatas.push(nd);
             }