Merge pull request #41717 from deepeshgarg007/jv_transaction_currency_new

fix: Transaction currency value in Journal Entry
This commit is contained in:
Deepesh Garg
2024-06-01 20:46:43 +05:30
committed by GitHub

View File

@@ -1058,6 +1058,17 @@ class JournalEntry(AccountsController):
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]