mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-25 16:04:46 +00:00
dynamic query for root in sales browser, validation for tree structure document
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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>';
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user