Skip to content

Commit

Permalink
Merge pull request frappe#41717 from deepeshgarg007/jv_transaction_cu…
Browse files Browse the repository at this point in the history
…rrency_new

fix: Transaction currency value in Journal Entry
  • Loading branch information
deepeshgarg007 authored Jun 1, 2024
2 parents 666232f + 169d77d commit 24926ab
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions erpnext/accounts/doctype/journal_entry/journal_entry.py
Original file line number Diff line number Diff line change
Expand Up @@ -1058,6 +1058,17 @@ def set_total_amount(self, amt, currency):

def build_gl_map(self):
gl_map = []

company_currency = erpnext.get_company_currency(self.company)
if self.multi_currency:
for row in self.get("accounts"):
if row.account_currency != company_currency:
self.currency = row.account_currency
self.conversion_rate = row.exchange_rate
break
else:
self.currency = company_currency

for d in self.get("accounts"):
if d.debit or d.credit or (self.voucher_type == "Exchange Gain Or Loss"):
r = [d.user_remark, self.remark]
Expand Down

0 comments on commit 24926ab

Please sign in to comment.