瀏覽代碼

甲供材料、安全生产、临时占地,数量保留小数位数调整

MaiXinRong 3 年之前
父節點
當前提交
e323a30d03
共有 3 個文件被更改,包括 3 次插入3 次删除
  1. 1 1
      app/service/stage_jgcl.js
  2. 1 1
      app/service/stage_safe_prod.js
  3. 1 1
      app/service/stage_temp_land.js

+ 1 - 1
app/service/stage_jgcl.js

@@ -147,7 +147,7 @@ module.exports = app => {
                 // } else {
                 //     nd.unit_price = od.unit_price;
                 // }
-                const precision = this.ctx.helper.findPrecision(info.precision, d.unit);
+                const precision = this.ctx.helper.findPrecision(info.precision, d.unit || od.unit);
                 if (d.arrive_qty !== undefined) {
                     nd.arrive_qty = this.ctx.helper.round(d.arrive_qty, precision.value);
                     nd.arrive_tp = this.ctx.helper.mul(nd.unit_price, nd.arrive_qty, tpDecimal);

+ 1 - 1
app/service/stage_safe_prod.js

@@ -132,7 +132,7 @@ module.exports = app => {
                 }
                 if (d.unit_price !== undefined && od.pre_used) throw '往期已使用,不可修改单价';
                 nd.unit_price = d.unit_price !== undefined ? this.ctx.helper.round(d.unit_price, info.decimal.up) : od.unit_price;
-                const precision = this.ctx.helper.findPrecision(info.precision, d.unit);
+                const precision = this.ctx.helper.findPrecision(info.precision, d.unit || od.unit);
                 if (d.order !== undefined) nd.order = d.order;
                 if (d.quantity !== undefined) {
                     if (od.pre_used) throw '往期已使用,不可修改数量';

+ 1 - 1
app/service/stage_temp_land.js

@@ -130,7 +130,7 @@ module.exports = app => {
                 }
                 if (d.unit_price !== undefined && od.pre_used) throw '往期已使用,不可修改单价';
                 nd.unit_price = d.unit_price !== undefined ? this.ctx.helper.round(d.unit_price, info.decimal.up) : od.unit_price;
-                const precision = this.ctx.helper.findPrecision(info.precision, d.unit);
+                const precision = this.ctx.helper.findPrecision(info.precision, d.unit || od.unit);
                 if (d.order !== undefined) nd.order = d.order;
                 if (d.qty !== undefined) {
                     nd.qty = this.ctx.helper.round(d.qty, precision.value);