Skip to content

Commit

Permalink
fix: get unique provisional accounts
Browse files Browse the repository at this point in the history
  • Loading branch information
nabinhait committed Mar 19, 2024
1 parent 9996d6b commit b73f51a
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -1148,10 +1148,12 @@ def get_provisional_accounts(self):
fields=["name", "provisional_expense_account", "qty", "base_rate"],
)
default_provisional_account = self.get_company_default("default_provisional_account")
provisional_accounts = [
d.provisional_expense_account if d.provisional_expense_account else default_provisional_account
for d in pr_items
]
provisional_accounts = set(
[
d.provisional_expense_account if d.provisional_expense_account else default_provisional_account
for d in pr_items
]
)

provisional_gl_entries = frappe.get_all(
"GL Entry",
Expand Down

0 comments on commit b73f51a

Please sign in to comment.