dynamic query for root in sales browser, validation for tree structure document

This commit is contained in:
Nabin Hait
2012-12-12 16:26:39 +05:30
parent 73ccac4ccb
commit 06cbd3427f
11 changed files with 59 additions and 33 deletions

View File

@@ -39,8 +39,7 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) {
'is_pl_account', 'company'], false);
// read-only for root accounts
root_acc = doc.parent ? false : true;
if(in_list(root_acc, doc.account_name)) {
if(!doc.parent_account) {
cur_frm.perm = [[1,0,0], [1,0,0]];
cur_frm.set_intro("This is a root account and cannot be edited.");
} else {

View File

@@ -20,7 +20,7 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) {
cur_frm.toggle_enable(['group_or_ledger', 'company_name'], doc.__islocal);
if(!doc.__islocal && doc.group_or_ledger=='Group') {
intro_txt += '<p><b>Note:</b> This is Cost Center is a <i>Group</i>, \
intro_txt += '<p><b>Note:</b> This Cost Center is a <i>Group</i>, \
Accounting Entries are not allowed against groups.</p>';
}