MaiXinRong před 3 týdny
rodič
revize
b7c27d738b
1 změnil soubory, kde provedl 4 přidání a 0 odebrání
  1. 4 0
      app/service/stage_bills.js

+ 4 - 0
app/service/stage_bills.js

@@ -223,6 +223,8 @@ module.exports = app => {
             if (data.qc_qty !== undefined) {
                 data.qc_qty = this.round(data.qc_qty, precision.value);
                 data.qc_tp = this.ctx.helper.mul(data.qc_qty, ledgerData.unit_price, info.decimal.tp);
+            } else if (data.qc_tp !== undefined) {
+                data.qc_tp = this.ctx.helper.round(data.qc_tp, info.decimal.tp);
             }
             if (data.positive_qc_qty !== undefined) {
                 data.positive_qc_qty = this.round(data.positive_qc_qty, precision.value);
@@ -277,6 +279,8 @@ module.exports = app => {
             if (insertData.qc_qty !== undefined) {
                 d.qc_qty = this.round(insertData.qc_qty, precision.value);
                 d.qc_tp = this.ctx.helper.mul(d.qc_qty, ledgerData.unit_price, info.decimal.tp);
+            } else if (insertData.qc_tp !== undefined) {
+                d.qc_tp = this.ctx.helper.round(insertData.qc_tp, info.decimal.tp);
             }
             if (insertData.positive_qc_qty !== undefined) {
                 d.positive_qc_qty = this.round(insertData.positive_qc_qty, precision.value);