MaiXinRong 1 year ago
parent
commit
e4dc9a2b97
1 changed files with 1 additions and 1 deletions
  1. 1 1
      app/service/stage_change.js

+ 1 - 1
app/service/stage_change.js

@@ -585,7 +585,7 @@ module.exports = app => {
                 const p = pos.find(y => { return y.id === x.pid });
                 return {
                     ...x,
-                    ledger_id: b.ledger_id, l_code: b.b_code, l_name: b.name, l_unit: b.unit, l_up: b.unit_price,
+                    ledger_id: b ? b.ledger_id : -1, l_code: b.b_code, l_name: b.name, l_unit: b.unit, l_up: b.unit_price,
                     l_deal_qty: b.deal_qty, l_deal_tp: b.deal_tp, l_qty: b.quantity, l_tp: b.total_price, l_drawing_code: b.drawing_code,
                     p_name: p ? p.name : '', p_drawing_code: p ? p.drawing_code : '', p_qty: p ? p.quantity : '',
                 };