Преглед на файлове

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

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);