commit | 9ba9a91631efdd5723b1d5039289410c15a65cfb | [log] [tgz] |
---|---|---|
author | Suraj Shetty <surajshetty3416@gmail.com> | Tue Jun 18 10:56:47 2019 +0530 |
committer | Suraj Shetty <surajshetty3416@gmail.com> | Tue Jun 18 10:56:47 2019 +0530 |
tree | aaa66f7c785ca0c6889d81df4172ad5c8a53d788 | |
parent | 04d623ab66b939551c9f18087836f980dc064a2d [diff] |
fix: Strip leading zero from phone number
diff --git a/erpnext/crm/doctype/utils.py b/erpnext/crm/doctype/utils.py index f0f3e08..5f7a72e 100644 --- a/erpnext/crm/doctype/utils.py +++ b/erpnext/crm/doctype/utils.py
@@ -6,7 +6,7 @@ def get_document_with_phone_number(number): # finds contacts and leads if not number: return - number = number[-10:] + number = number.lstrip('0') number_filter = { 'phone': ['like', '%{}'.format(number)], 'mobile_no': ['like', '%{}'.format(number)]