소스 검색

暂存计量问题

MaiXinRong 1 년 전
부모
커밋
aace9582bb
1개의 변경된 파일10개의 추가작업 그리고 10개의 파일을 삭제
  1. 10 10
      app/service/stage_stash.js

+ 10 - 10
app/service/stage_stash.js

@@ -265,14 +265,14 @@ module.exports = app => {
                                 insertChangeData.push(ncs);
                                 if (!ncs.no_value) {
                                     nps.qc_qty = this.ctx.helper.add(nps.qc_qty, ncs.qty);
+                                    if (ncs.minus) {
+                                        nps.negative_qc_qty = this.ctx.helper.add(nps.negative_qc_qty, ncs.qty);
+                                    } else {
+                                        nps.positive_qc_qty = this.ctx.helper.add(nps.positive_qc_qty, ncs.qty);
+                                    }
                                 } else {
                                     nps.qc_minus_qty = this.ctx.helper.add(nps.qc_minus_qty, ncs.qty);
                                 }
-                                if (ncs.minus) {
-                                    nps.negative_qc_qty = this.ctx.helper.add(nps.negative_qc_qty, ncs.qty);
-                                } else {
-                                    nps.positive_qc_qty = this.ctx.helper.add(nps.positive_qc_qty, ncs.qty);
-                                }
                             }
                         }
                         nbs.contract_qty = this.ctx.helper.add(nbs.contract_qty, nps.contract_qty);
@@ -300,14 +300,14 @@ module.exports = app => {
                                 insertChangeData.push(ncs);
                                 if (!ncs.no_value) {
                                     nbs.qc_qty = this.ctx.helper.add(nbs.qc_qty, ncs.qty);
+                                    if (ncs.minus) {
+                                        nbs.negative_qc_qty = this.ctx.helper.add(nbs.negative_qc_qty, ncs.qty);
+                                    } else {
+                                        nbs.positive_qc_qty = this.ctx.helper.add(nbs.positive_qc_qty, ncs.qty);
+                                    }
                                 } else {
                                     nbs.qc_minus_qty = this.ctx.helper.add(nbs.qc_minus_qty, ncs.qty);
                                 }
-                                if (ncs.minus) {
-                                    nbs.negative_qc_qty = this.ctx.helper.add(nbs.negative_qc_qty, ncs.qty);
-                                } else {
-                                    nbs.positive_qc_qty = this.ctx.helper.add(nbs.positive_qc_qty, ncs.qty);
-                                }
                             }
                         }
                         nbs.qc_tp = this.ctx.helper.mul(nbs.qc_qty, b.unit_price, decimal.tp);