Skip to content

Commit e2fc03e

Browse files
fix: Cart test fixes
1 parent 3987b4b commit e2fc03e

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

erpnext/selling/doctype/quotation/quotation.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,8 @@ def update_item(obj, target, source_parent):
205205

206206
def _make_customer(source_name, ignore_permissions=False):
207207
quotation = frappe.db.get_value("Quotation", source_name, ["order_type", "customer_lead"])
208-
if quotation and quotation[0] and not quotation[2]:
209-
lead_name = quotation[0]
208+
if quotation and quotation[1]:
209+
lead_name = quotation[1]
210210
customer_name = frappe.db.get_value("Customer", {"lead_name": lead_name},
211211
["name", "customer_name"], as_dict=True)
212212
if not customer_name:

erpnext/shopping_cart/cart.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ def _get_cart_quotation(party=None):
192192
party = get_party()
193193

194194
quotation = frappe.get_all("Quotation", fields=["name"], filters=
195-
{party.doctype.lower(): party.name, "order_type": "Shopping Cart", "docstatus": 0},
195+
{"customer_lead": party.name, "order_type": "Shopping Cart", "docstatus": 0},
196196
order_by="modified desc", limit_page_length=1)
197197

198198
if quotation:

0 commit comments

Comments
 (0)