Forráskód Böngészése

永久材料计算相关

MaiXinRong 11 hónapja
szülő
commit
726f0fa0f4
1 módosított fájl, 1 hozzáadás és 1 törlés
  1. 1 1
      app/service/stage_yjcl.js

+ 1 - 1
app/service/stage_yjcl.js

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