diff --git a/erpnext/stock/get_item_details.py b/erpnext/stock/get_item_details.py index 3dca6a1608e..d251e49c0a6 100644 --- a/erpnext/stock/get_item_details.py +++ b/erpnext/stock/get_item_details.py @@ -588,7 +588,7 @@ def get_party_item_code(args, item_doc, out): if args.transaction_type=="selling" and args.customer: out.customer_item_code = None - if args.quotation_to != 'Customer': + if args.quotation_to and args.quotation_to != 'Customer': return customer_item_code = item_doc.get("customer_items", {"customer_name": args.customer})