Merge pull request #18385 from rohitwaghchaure/offline_pos_syncing_issue_for_customer_develop

fix: offline pos syncing issue for customer
This commit is contained in:
rohitwaghchaure 2019-07-17 21:37:55 +05:30 committed by GitHub
commit 6349f61882
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -451,6 +451,10 @@ def make_customer_and_address(customers):
def add_customer(data):
customer = data.get('full_name') or data.get('customer')
if frappe.db.exists("Customer", customer.strip()):
return customer.strip()
customer_doc = frappe.new_doc('Customer')
customer_doc.customer_name = data.get('full_name') or data.get('customer')
customer_doc.customer_pos_id = data.get('customer_pos_id')