Skip to content

Commit

Permalink
fix: TypeError in PR for non-stock item (backport #37819) (backport #…
Browse files Browse the repository at this point in the history
…37841) (#37853)

fix: `TypeError` in PR for non-stock item

(cherry picked from commit 028b3e2)
(cherry picked from commit ef4471f)

Co-authored-by: s-aga-r <sagarsharma.s312@gmail.com>
  • Loading branch information
mergify[bot] and s-aga-r authored Nov 2, 2023
1 parent 42ccc09 commit f6418c1
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions erpnext/stock/doctype/purchase_receipt/purchase_receipt.py
Original file line number Diff line number Diff line change
Expand Up @@ -601,11 +601,10 @@ def make_divisional_loss_gl_entry(item, outgoing_amount):
make_rate_difference_entry(d)
make_sub_contracting_gl_entries(d)
make_divisional_loss_gl_entry(d, outgoing_amount)
elif (
d.warehouse not in warehouse_with_no_account
or d.rejected_warehouse not in warehouse_with_no_account
elif (d.warehouse and d.warehouse not in warehouse_with_no_account) or (
d.rejected_warehouse and d.rejected_warehouse not in warehouse_with_no_account
):
warehouse_with_no_account.append(d.warehouse)
warehouse_with_no_account.append(d.warehouse or d.rejected_warehouse)

if d.is_fixed_asset:
self.update_assets(d, d.valuation_rate)
Expand Down

0 comments on commit f6418c1

Please sign in to comment.