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
(cherry picked from commit 29a6eb2)
  • Loading branch information
sudarsan2001 authored and mergify[bot] committed Nov 18, 2024
1 parent 73a31cb commit c0d3f8c
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 @@ -1248,13 +1248,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 c0d3f8c

Please sign in to comment.