mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-16 03:29:16 +00:00
function renamed
This commit is contained in:
@@ -30,7 +30,7 @@ class Account(Document):
|
|||||||
self.validate_mandatory()
|
self.validate_mandatory()
|
||||||
self.validate_warehouse_account()
|
self.validate_warehouse_account()
|
||||||
self.validate_frozen_accounts_modifier()
|
self.validate_frozen_accounts_modifier()
|
||||||
self.validate_balance_must_be_settings()
|
self.validate_balance_must_be_debit_or_credit()
|
||||||
|
|
||||||
def validate_master_name(self):
|
def validate_master_name(self):
|
||||||
if self.master_type in ('Customer', 'Supplier') or self.account_type == "Warehouse":
|
if self.master_type in ('Customer', 'Supplier') or self.account_type == "Warehouse":
|
||||||
@@ -70,7 +70,7 @@ class Account(Document):
|
|||||||
frozen_accounts_modifier not in frappe.user.get_roles():
|
frozen_accounts_modifier not in frappe.user.get_roles():
|
||||||
throw(_("You are not authorized to set Frozen value"))
|
throw(_("You are not authorized to set Frozen value"))
|
||||||
|
|
||||||
def validate_balance_must_be_settings(self):
|
def validate_balance_must_be_debit_or_credit(self):
|
||||||
from erpnext.accounts.utils import get_balance_on
|
from erpnext.accounts.utils import get_balance_on
|
||||||
if not self.get("__islocal") and self.balance_must_be:
|
if not self.get("__islocal") and self.balance_must_be:
|
||||||
account_balance = get_balance_on(self.name)
|
account_balance = get_balance_on(self.name)
|
||||||
|
|||||||
Reference in New Issue
Block a user