diff --git a/accounts/page/accounts_home/accounts_home.html b/accounts/page/accounts_home/accounts_home.html index 7fb2c326eec..5950173c5ba 100644 --- a/accounts/page/accounts_home/accounts_home.html +++ b/accounts/page/accounts_home/accounts_home.html @@ -69,12 +69,12 @@ href="#!Form/Sales and Purchase Return Tool/Sales and Purchase Return Tool">Sales or Purchase Returns
- Trend Analyzer
- Financial Statements
diff --git a/selling/search_criteria/customer_address_contact/customer_address_contact.sql b/selling/search_criteria/customer_address_contact/customer_address_contact.sql index 3752ebc04ec..b30a6f9f09a 100644 --- a/selling/search_criteria/customer_address_contact/customer_address_contact.sql +++ b/selling/search_criteria/customer_address_contact/customer_address_contact.sql @@ -1,4 +1,4 @@ -select +SELECT `tabCustomer`.name, `tabCustomer`.customer_name, `tabAddress`.address_line1, @@ -12,7 +12,7 @@ select `tabContact`.phone, `tabContact`.mobile_no, `tabContact`.email_id -from +FROM `tabCustomer` left join `tabAddress` on ( `tabAddress`.customer=`tabCustomer`.name and @@ -22,5 +22,7 @@ from `tabContact`.customer=`tabCustomer`.name and ifnull(`tabContact`.is_primary_contact, 0)=1 ) -order by +WHERE + `tabCustomer`.docstatus<2 +ORDER BY `tabCustomer`.customer_name asc \ No newline at end of file diff --git a/startup/js/modules.js b/startup/js/modules.js index 71d012e44be..914df8116d8 100644 --- a/startup/js/modules.js +++ b/startup/js/modules.js @@ -28,13 +28,19 @@ erpnext.module_page.setup_page = function(module, wrapper) { // not have read permissions erpnext.module_page.hide_links = function(wrapper) { + function replace_link(link) { + var txt = $(link).text(); + $(link).parent().css('color', '#999'); + $(link).replaceWith('' + +txt+''); + } + // lists $(wrapper).find('[href*="List/"]').each(function() { var href = $(this).attr('href'); var dt = href.split('/')[1]; if(wn.boot.profile.all_read.indexOf(get_label_doctype(dt))==-1) { - var txt = $(this).text(); - $(this).parent().css('color', '#999').html(txt); + replace_link(this); } }); @@ -42,8 +48,7 @@ erpnext.module_page.hide_links = function(wrapper) { $(wrapper).find('[data-doctype]').each(function() { var dt = $(this).attr('data-doctype'); if(wn.boot.profile.all_read.indexOf(dt)==-1) { - var txt = $(this).text(); - $(this).parent().css('color', '#999').html(txt); + replace_link(this); } }); @@ -52,8 +57,7 @@ erpnext.module_page.hide_links = function(wrapper) { var href = $(this).attr('href'); var dt = href.split('/')[1]; if(wn.boot.profile.all_read.indexOf(get_label_doctype(dt))==-1) { - var txt = $(this).text(); - $(this).parent().css('color', '#999').html(txt); + replace_link(this); } }); @@ -62,7 +66,9 @@ erpnext.module_page.hide_links = function(wrapper) { if(!has_common(user_roles, [$(this).attr("data-role"), "System Manager"])) { var html = $(this).html(); $(this).parent().css('color', '#999'); - $(this).replaceWith(html); + $(this).replaceWith(''+html+''); } }); }