fix: offline pos syncing issue for customer

This commit is contained in:
Rohit Waghchaure
2019-07-17 20:34:50 +05:30
parent 6b86bb462b
commit fddef7bd5c

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