fix: TypeError in PR for non-stock item

(cherry picked from commit 028b3e2fbf)
This commit is contained in:
s-aga-r
2023-11-01 11:48:27 +05:30
committed by Mergify
parent e616a0bb63
commit ef4471f8c0

View File

@@ -601,11 +601,10 @@ class PurchaseReceipt(BuyingController):
make_rate_difference_entry(d) make_rate_difference_entry(d)
make_sub_contracting_gl_entries(d) make_sub_contracting_gl_entries(d)
make_divisional_loss_gl_entry(d, outgoing_amount) make_divisional_loss_gl_entry(d, outgoing_amount)
elif ( elif (d.warehouse and d.warehouse not in warehouse_with_no_account) or (
d.warehouse not in warehouse_with_no_account d.rejected_warehouse and d.rejected_warehouse not in warehouse_with_no_account
or 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: if d.is_fixed_asset:
self.update_assets(d, d.valuation_rate) self.update_assets(d, d.valuation_rate)