mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-07 15:12:51 +00:00
[fix] validate_multi_currency
This commit is contained in:
@@ -280,10 +280,14 @@ class JournalEntry(AccountsController):
|
|||||||
alternate_currency = []
|
alternate_currency = []
|
||||||
for d in self.get("accounts"):
|
for d in self.get("accounts"):
|
||||||
account = frappe.db.get_value("Account", d.account, ["account_currency", "account_type"], as_dict=1)
|
account = frappe.db.get_value("Account", d.account, ["account_currency", "account_type"], as_dict=1)
|
||||||
d.account_currency = account.account_currency or self.company_currency
|
if account:
|
||||||
d.account_type = account.account_type
|
d.account_currency = account.account_currency
|
||||||
|
d.account_type = account.account_type
|
||||||
|
|
||||||
if d.account_currency!=self.company_currency and d.account_currency not in alternate_currency:
|
if not d.account_currency:
|
||||||
|
d.account_currency = self.company_currency
|
||||||
|
|
||||||
|
if d.account_currency != self.company_currency and d.account_currency not in alternate_currency:
|
||||||
alternate_currency.append(d.account_currency)
|
alternate_currency.append(d.account_currency)
|
||||||
|
|
||||||
if alternate_currency:
|
if alternate_currency:
|
||||||
|
|||||||
Reference in New Issue
Block a user