Skip to content

Commit

Permalink
fix: set debit in transaction currency in GL Entry
Browse files Browse the repository at this point in the history
  • Loading branch information
sudarsan2001 committed Nov 13, 2024
1 parent f0e5036 commit 29a6eb2
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions erpnext/accounts/doctype/payment_entry/payment_entry.py
Original file line number Diff line number Diff line change
Expand Up @@ -1347,13 +1347,22 @@ def add_party_gl_entries(self, gl_entries):
base_unallocated_amount = self.unallocated_amount * exchange_rate

gle = party_gl_dict.copy()

gle.update(
{
dr_or_cr + "_in_account_currency": self.unallocated_amount,
dr_or_cr: base_unallocated_amount,
}
self.get_gl_dict(
{
"account": self.party_account,
"party_type": self.party_type,
"party": self.party,
"against": against_account,
"account_currency": self.party_account_currency,
"cost_center": self.cost_center,
dr_or_cr + "_in_account_currency": self.unallocated_amount,
dr_or_cr: base_unallocated_amount,
},
item=self,
)
)

if self.book_advance_payments_in_separate_party_account:
gle.update(
{
Expand Down

0 comments on commit 29a6eb2

Please sign in to comment.