Skip to content

Commit a2612d5

Browse files
venkat102mergify[bot]
authored andcommitted
fix: set debit transaction currency in gl entry
(cherry picked from commit 6e19c06)
1 parent 632412b commit a2612d5

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

erpnext/accounts/doctype/payment_entry/payment_entry.py

+13-5
Original file line numberDiff line numberDiff line change
@@ -1219,11 +1219,19 @@ def add_party_gl_entries(self, gl_entries):
12191219
dr_or_cr = "debit" if dr_or_cr == "credit" else "credit"
12201220

12211221
gle.update(
1222-
{
1223-
dr_or_cr: allocated_amount_in_company_currency,
1224-
dr_or_cr + "_in_account_currency": d.allocated_amount,
1225-
"cost_center": cost_center,
1226-
}
1222+
self.get_gl_dict(
1223+
{
1224+
"account": self.party_account,
1225+
"party_type": self.party_type,
1226+
"party": self.party,
1227+
"against": against_account,
1228+
"account_currency": self.party_account_currency,
1229+
"cost_center": cost_center,
1230+
dr_or_cr + "_in_account_currency": d.allocated_amount,
1231+
dr_or_cr: allocated_amount_in_company_currency,
1232+
},
1233+
item=self,
1234+
)
12271235
)
12281236

12291237
if self.book_advance_payments_in_separate_party_account:

0 commit comments

Comments
 (0)