浏览代码

计量台账,清单,调用变更令,取消原调用报错

MaiXinRong 6 年之前
父节点
当前提交
f449e2038a
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      app/service/stage_bills.js

+ 2 - 2
app/service/stage_bills.js

@@ -220,11 +220,11 @@ module.exports = app => {
             const info = this.ctx.tender.info;
             const precision = this.ctx.helper.findPrecision(info.precision, ledgerBills.unit);
             const updateData = {};
-            if (data.contract_qty) {
+            if (data.contract_qty !== undefined) {
                 updateData.contract_qty = this.round(data.contract_qty, precision.value);
                 updateData.contract_tp = this.ctx.helper.mul(updateData.contract_qty, ledgerBills.unit_price, info.decimal.tp);
             }
-            if (data.qc_qty) {
+            if (data.qc_qty !== undefined) {
                 updateData.qc_qty = this.round(data.qc_qty, precision.value);
                 updateData.qc_tp = this.ctx.helper.mul(updateData.qc_qty, ledgerBills.unit_price, info.decimal.tp);
             }