Merge pull request #9218 from rohitwaghchaure/pos_mobile_search
[minor] added mobile no to search customer in POS
This commit is contained in:
commit
f9fe5787a2
@ -198,7 +198,7 @@ def get_contacts(customers):
|
||||
customers = [frappe._dict({'name': customers})]
|
||||
|
||||
for data in customers:
|
||||
contact = frappe.db.sql(""" select email_id, phone from `tabContact`
|
||||
contact = frappe.db.sql(""" select email_id, phone, mobile_no from `tabContact`
|
||||
where is_primary_contact =1 and name in
|
||||
(select parent from `tabDynamic Link` where link_doctype = 'Customer' and link_name = %s
|
||||
and parenttype = 'Contact')""", data.name, as_dict=1)
|
||||
|
@ -717,7 +717,7 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
|
||||
item = this.get_item(item.value);
|
||||
var searchtext =
|
||||
Object.keys(item)
|
||||
.filter(key => ['customer_name', 'customer_group', 'value', 'label', 'email_id', 'phone'].includes(key))
|
||||
.filter(key => ['customer_name', 'customer_group', 'value', 'label', 'email_id', 'phone', 'mobile_no'].includes(key))
|
||||
.map(key => item[key])
|
||||
.join(" ")
|
||||
.toLowerCase();
|
||||
@ -795,6 +795,7 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
|
||||
customer_group: c.customer_group,
|
||||
territory: c.territory,
|
||||
phone: contact ? contact["phone"] : '',
|
||||
mobile_no: contact ? contact["mobile_no"] : '',
|
||||
email_id: contact ? contact["email_id"] : ''
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user