mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-26 08:24:47 +00:00
fix: Missing if condition in Customer Default Bank Account Validation. (#20970)
This commit is contained in:
@@ -76,6 +76,7 @@ class Customer(TransactionBase):
|
|||||||
def validate_default_bank_account(self):
|
def validate_default_bank_account(self):
|
||||||
if self.default_bank_account:
|
if self.default_bank_account:
|
||||||
is_company_account = frappe.db.get_value('Bank Account', self.default_bank_account, 'is_company_account')
|
is_company_account = frappe.db.get_value('Bank Account', self.default_bank_account, 'is_company_account')
|
||||||
|
if not is_company_account:
|
||||||
frappe.throw(_("{0} is not a company bank account").format(frappe.bold(self.default_bank_account)))
|
frappe.throw(_("{0} is not a company bank account").format(frappe.bold(self.default_bank_account)))
|
||||||
|
|
||||||
def on_update(self):
|
def on_update(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user