diff --git a/erpnext/selling/doctype/customer/customer.py b/erpnext/selling/doctype/customer/customer.py index 1db07972bb..88ed1c6667 100644 --- a/erpnext/selling/doctype/customer/customer.py +++ b/erpnext/selling/doctype/customer/customer.py @@ -633,7 +633,7 @@ def make_contact(args, is_primary_contact=1): party_type = args.customer_type if args.doctype == "Customer" else args.supplier_type party_name_key = "customer_name" if args.doctype == "Customer" else "supplier_name" - if party_type == "Individual": + if party_type == "Individual": first, middle, last = parse_full_name(args.get(party_name_key)) values.update( { @@ -648,7 +648,7 @@ def make_contact(args, is_primary_contact=1): "company_name": args.get(party_name_key), } ) - + contact = frappe.get_doc(values) if args.get("email_id"):