fix: gl_map for auto-set against accounts

This commit is contained in:
Gursheen Anand 2024-01-09 15:08:30 +05:30
parent 62bbcbc7ef
commit ce7d05aa1f

View File

@ -765,6 +765,7 @@ class JournalEntry(AccountsController):
self.get_debited_credited_accounts()
if len(self.accounts_credited) > 1 and len(self.accounts_debited) > 1:
self.auto_set_against_accounts()
self.separate_against_account_entries = 0
return
self.get_against_accounts()
@ -1035,7 +1036,7 @@ class JournalEntry(AccountsController):
transaction_currency_map = self.get_transaction_currency_map()
company_currency = erpnext.get_company_currency(self.company)
self.get_against_accounts()
self.set_against_account()
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]