Jelajahi Sumber

单价调整,计算相关

MaiXinRong 3 minggu lalu
induk
melakukan
fa7e67ef2d
1 mengubah file dengan 2 tambahan dan 2 penghapusan
  1. 2 2
      app/lib/revise_price.js

+ 2 - 2
app/lib/revise_price.js

@@ -235,11 +235,11 @@ class revisePriceCalc {
             if (b.gcl_id) {
                 sb = sumBills.find(x => { return x.gcl_id === b.gcl_id });
                 if (!sb) {
-                    sb = {gcl_id: b.gcl_id, unit_price: b.unit_price, v_qty: 0, uv_qty: 0, p_qty: 0, n_qty: 0 };
+                    sb = {gcl_id: b.gcl_id, unit_price: p ? p.new_price : b.unit_price, v_qty: 0, uv_qty: 0, p_qty: 0, n_qty: 0 };
                     sumBills.push(sb);
                 }
             } else {
-                sb = { gcl_id: b.gcl_id, unit_price: b.unit_price, v_qty: 0, uv_qty: 0, p_qty: 0, n_qty: 0 };
+                sb = { gcl_id: b.gcl_id, unit_price: p ? p.new_price : b.unit_price, v_qty: 0, uv_qty: 0, p_qty: 0, n_qty: 0 };
                 sumBills.push(sb);
             }
             if (b.spamount >= 0) {