[minor] Fixed address listing
This commit is contained in:
parent
f8b318aef1
commit
9c018fe984
@ -69,8 +69,8 @@ cur_frm.cscript.make_address = function() {
|
|||||||
page_length: 5,
|
page_length: 5,
|
||||||
new_doctype: "Address",
|
new_doctype: "Address",
|
||||||
get_query: function() {
|
get_query: function() {
|
||||||
return "select name, address_type, address_line1, address_line2, city, state, country, pincode, fax, email_id, phone, is_primary_address, is_shipping_address from tabAddress where supplier='" +
|
return "select name, address_type, address_line1, address_line2, city, state, country, pincode, fax, email_id, phone, is_primary_address, is_shipping_address from tabAddress where supplier='" +
|
||||||
cur_frm.doc.name.replace("'", "\\'") + "' and docstatus != 2 order by is_primary_address desc"
|
cur_frm.doc.name.replace(/'/g, "\\'") + "' and docstatus != 2 order by is_primary_address desc"
|
||||||
},
|
},
|
||||||
as_dict: 1,
|
as_dict: 1,
|
||||||
no_results_message: __('No addresses created'),
|
no_results_message: __('No addresses created'),
|
||||||
@ -88,8 +88,8 @@ cur_frm.cscript.make_contact = function() {
|
|||||||
page_length: 5,
|
page_length: 5,
|
||||||
new_doctype: "Contact",
|
new_doctype: "Contact",
|
||||||
get_query: function() {
|
get_query: function() {
|
||||||
return "select name, first_name, last_name, email_id, phone, mobile_no, department, designation, is_primary_contact from tabContact where supplier='" +
|
return "select name, first_name, last_name, email_id, phone, mobile_no, department, designation, is_primary_contact from tabContact where supplier='" +
|
||||||
cur_frm.doc.name.replace("'", "\\'") + "' and docstatus != 2 order by is_primary_contact desc"
|
cur_frm.doc.name.replace(/'/g, "\\'") + "' and docstatus != 2 order by is_primary_contact desc"
|
||||||
},
|
},
|
||||||
as_dict: 1,
|
as_dict: 1,
|
||||||
no_results_message: __('No contacts created'),
|
no_results_message: __('No contacts created'),
|
||||||
|
|||||||
@ -86,8 +86,8 @@ cur_frm.cscript.make_address = function() {
|
|||||||
page_length: 5,
|
page_length: 5,
|
||||||
new_doctype: "Address",
|
new_doctype: "Address",
|
||||||
get_query: function() {
|
get_query: function() {
|
||||||
return "select name, address_type, address_line1, address_line2, city, state, country, pincode, fax, email_id, phone, is_primary_address, is_shipping_address from tabAddress where customer='" +
|
return "select name, address_type, address_line1, address_line2, city, state, country, pincode, fax, email_id, phone, is_primary_address, is_shipping_address from tabAddress where customer='" +
|
||||||
cur_frm.doc.name.replace("'", "\\'") + "' and docstatus != 2 order by is_primary_address desc"
|
cur_frm.doc.name.replace(/'/g, "\\'") + "' and docstatus != 2 order by is_primary_address desc"
|
||||||
},
|
},
|
||||||
as_dict: 1,
|
as_dict: 1,
|
||||||
no_results_message: __('No addresses created'),
|
no_results_message: __('No addresses created'),
|
||||||
@ -105,8 +105,8 @@ cur_frm.cscript.make_contact = function() {
|
|||||||
page_length: 5,
|
page_length: 5,
|
||||||
new_doctype: "Contact",
|
new_doctype: "Contact",
|
||||||
get_query: function() {
|
get_query: function() {
|
||||||
return "select name, first_name, last_name, email_id, phone, mobile_no, department, designation, is_primary_contact from tabContact where customer='" +
|
return "select name, first_name, last_name, email_id, phone, mobile_no, department, designation, is_primary_contact from tabContact where customer='" +
|
||||||
cur_frm.doc.name.replace("'", "\\'") + "' and docstatus != 2 order by is_primary_contact desc"
|
cur_frm.doc.name.replace(/'/g, "\\'") + "' and docstatus != 2 order by is_primary_contact desc"
|
||||||
},
|
},
|
||||||
as_dict: 1,
|
as_dict: 1,
|
||||||
no_results_message: __('No contacts created'),
|
no_results_message: __('No contacts created'),
|
||||||
|
|||||||
@ -41,8 +41,8 @@ cur_frm.cscript.make_address = function() {
|
|||||||
frappe.set_route("Form", "Address", address.name);
|
frappe.set_route("Form", "Address", address.name);
|
||||||
},
|
},
|
||||||
get_query: function() {
|
get_query: function() {
|
||||||
return "select name, address_type, address_line1, address_line2, city, state, country, pincode, fax, email_id, phone, is_primary_address, is_shipping_address from tabAddress where sales_partner='" +
|
return "select name, address_type, address_line1, address_line2, city, state, country, pincode, fax, email_id, phone, is_primary_address, is_shipping_address from tabAddress where sales_partner='" +
|
||||||
cur_frm.doc.name.replace("'", "\\'") + "' and docstatus != 2 order by is_primary_address desc"
|
cur_frm.doc.name.replace(/'/g, "\\'") + "' and docstatus != 2 order by is_primary_address desc"
|
||||||
},
|
},
|
||||||
as_dict: 1,
|
as_dict: 1,
|
||||||
no_results_message: __('No addresses created'),
|
no_results_message: __('No addresses created'),
|
||||||
@ -65,8 +65,8 @@ cur_frm.cscript.make_contact = function() {
|
|||||||
frappe.set_route("Form", "Contact", contact.name);
|
frappe.set_route("Form", "Contact", contact.name);
|
||||||
},
|
},
|
||||||
get_query: function() {
|
get_query: function() {
|
||||||
return "select name, first_name, last_name, email_id, phone, mobile_no, department, designation, is_primary_contact from tabContact where sales_partner='" +
|
return "select name, first_name, last_name, email_id, phone, mobile_no, department, designation, is_primary_contact from tabContact where sales_partner='" +
|
||||||
cur_frm.doc.name.replace("'", "\\'") + "' and docstatus != 2 order by is_primary_contact desc"
|
cur_frm.doc.name.replace(/'/g, "\\'") + "' and docstatus != 2 order by is_primary_contact desc"
|
||||||
},
|
},
|
||||||
as_dict: 1,
|
as_dict: 1,
|
||||||
no_results_message: __('No contacts created'),
|
no_results_message: __('No contacts created'),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user