mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-19 02:04:50 +00:00
fix: don't validate for currency, if account is unavailable
(cherry picked from commit 3cde81be65)
This commit is contained in:
@@ -56,7 +56,7 @@ class BankTransaction(Document):
|
|||||||
Bank Transaction should be on the same currency as the Bank Account.
|
Bank Transaction should be on the same currency as the Bank Account.
|
||||||
"""
|
"""
|
||||||
if self.currency and self.bank_account:
|
if self.currency and self.bank_account:
|
||||||
account = frappe.get_cached_value("Bank Account", self.bank_account, "account")
|
if account := frappe.get_cached_value("Bank Account", self.bank_account, "account"):
|
||||||
account_currency = frappe.get_cached_value("Account", account, "account_currency")
|
account_currency = frappe.get_cached_value("Account", account, "account_currency")
|
||||||
|
|
||||||
if self.currency != account_currency:
|
if self.currency != account_currency:
|
||||||
|
|||||||
Reference in New Issue
Block a user