Skip to content

Commit

Permalink
fix: liability account in payments
Browse files Browse the repository at this point in the history
  • Loading branch information
GursheenK committed Dec 29, 2023
1 parent 83613be commit d93fdad
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions erpnext/accounts/doctype/payment_entry/payment_entry.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
make_reverse_gl_entries,
process_gl_map,
)
from erpnext.accounts.party import get_party_account
from erpnext.accounts.party import get_party_account, get_party_and_advance_accounts
from erpnext.accounts.utils import (
cancel_exchange_gain_loss_journal,
get_account_currency,
Expand Down Expand Up @@ -135,9 +135,7 @@ def set_liability_account(self):
self.book_advance_payments_in_separate_party_account = False
return

liability_account = get_party_account(
self.party_type, self.party, self.company, include_advance=True
)[1]
liability_account = get_party_and_advance_accounts(self.party_type, self.party, self.company)[1]

self.set(self.party_account_field, liability_account)

Expand Down

0 comments on commit d93fdad

Please sign in to comment.