function renamed

This commit is contained in:
Nabin Hait 2014-06-05 15:18:10 +05:30
parent 4d4df03f88
commit c8be8ba42c

View File

@ -30,7 +30,7 @@ class Account(Document):
self.validate_mandatory()
self.validate_warehouse_account()
self.validate_frozen_accounts_modifier()
self.validate_balance_must_be_settings()
self.validate_balance_must_be_debit_or_credit()
def validate_master_name(self):
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():
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
if not self.get("__islocal") and self.balance_must_be:
account_balance = get_balance_on(self.name)