Skip to content

Commit

Permalink
fix: TypeError in PR for non-stock item
Browse files Browse the repository at this point in the history
  • Loading branch information
s-aga-r committed Nov 1, 2023
1 parent 7a3e4a8 commit 028b3e2
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 @@ -600,11 +600,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 028b3e2

Please sign in to comment.