fix(Contact): mobile_no re-introduced and travis fixes (#19009)

* fix: mobile_no re-introduced

* fix: test cases

* fix: set email as primary

* fix: add primary email and phone

* fix: utils for contact creation

* chore: remove = from dict
This commit is contained in:
Himanshu
2019-09-30 10:08:15 +05:30
committed by Nabin Hait
parent 83b0b2adec
commit 25ab1e41df
7 changed files with 40 additions and 30 deletions

View File

@@ -817,6 +817,7 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
if(reg.test(data.name.toLowerCase())
|| reg.test(data.customer_name.toLowerCase())
|| (contact && reg.test(contact["phone"]))
|| (contact && reg.test(contact["mobile_no"]))
|| (data.customer_group && reg.test(data.customer_group.toLowerCase()))){
return data;
}
@@ -833,6 +834,7 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
if(contact && !c['phone']) {
c["phone"] = contact["phone"];
c["email_id"] = contact["email_id"];
c["mobile_no"] = contact["mobile_no"];
}
me.customers_mapper.push({
@@ -842,9 +844,10 @@ 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"] : '',
searchtext: ['customer_name', 'customer_group', 'name', 'value',
'label', 'email_id', 'phone']
'label', 'email_id', 'phone', 'mobile_no']
.map(key => c[key]).join(' ')
.toLowerCase()
});