for tax account, rate is no more mandatory
diff --git a/accounts/doctype/account/account.py b/accounts/doctype/account/account.py
index ed374b1..350ebbe 100644
--- a/accounts/doctype/account/account.py
+++ b/accounts/doctype/account/account.py
@@ -49,11 +49,6 @@
msgprint("Message: Please enter Master Name once the account is created.")
- # Rate is mandatory for tax account
- def validate_rate_for_tax(self):
- if self.doc.account_type == 'Tax' and not self.doc.tax_rate:
- msgprint("Please Enter Rate", raise_exception=1)
-
# Fetch Parent Details and validation for account not to be created under ledger
def validate_parent(self):
if self.doc.parent_account:
@@ -135,7 +130,6 @@
def validate(self):
self.validate_master_name()
- self.validate_rate_for_tax()
self.validate_parent()
self.validate_duplicate_account()
self.validate_root_details()
diff --git a/accounts/page/accounts_browser/accounts_browser.js b/accounts/page/accounts_browser/accounts_browser.js
index 3ef5045..323135b 100644
--- a/accounts/page/accounts_browser/accounts_browser.js
+++ b/accounts/page/accounts_browser/accounts_browser.js
@@ -185,9 +185,9 @@
// tax rate if tax
$(fd.account_type.input).change(function() {
if($(this).val()=='Tax') {
- $(fd.tax_rate.wrapper).toggle(true);
+ $(fd.tax_rate.wrapper).toggle(true);
} else {
- $(fd.tax_rate.wrapper).toggle(false);
+ $(fd.tax_rate.wrapper).toggle(false);
}
})
@@ -214,6 +214,7 @@
// show
d.onshow = function() {
$(fd.group_or_ledger.input).change();
+ $(fd.account_type.input).change();
}
d.show();
},