Merge pull request #9218 from rohitwaghchaure/pos_mobile_search

[minor] added mobile no to search customer in POS
This commit is contained in:
rohitwaghchaure 2017-06-11 17:07:05 +05:30 committed by GitHub
commit f9fe5787a2
2 changed files with 3 additions and 2 deletions

View File

@ -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)

View File

@ -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"] : ''
}
});