Browse Source

fix(product-listing): Check if customer exists (#24030)

- It might happen that perty_name might not always be Customer
(it might be Supplier as well)
develop
Suraj Shetty 4 years ago
committed by GitHub
parent
commit
ad57eef40c
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      erpnext/shopping_cart/cart.py

2
erpnext/shopping_cart/cart.py

@ -345,7 +345,7 @@ def _set_price_list(cart_settings, quotation=None):
selling_price_list = None
# check if default customer price list exists
if party_name:
if party_name and frappe.db.exists("Customer", party_name):
selling_price_list = get_default_price_list(frappe.get_doc("Customer", party_name))
# check default price list in shopping cart

Loading…
Cancel
Save