fix: Cart test fixes

This commit is contained in:
deepeshgarg007
2019-04-03 10:50:09 +05:30
parent 3987b4b714
commit e2fc03e561
2 changed files with 3 additions and 3 deletions

View File

@@ -205,8 +205,8 @@ def _make_sales_invoice(source_name, target_doc=None, ignore_permissions=False):
def _make_customer(source_name, ignore_permissions=False):
quotation = frappe.db.get_value("Quotation", source_name, ["order_type", "customer_lead"])
if quotation and quotation[0] and not quotation[2]:
lead_name = quotation[0]
if quotation and quotation[1]:
lead_name = quotation[1]
customer_name = frappe.db.get_value("Customer", {"lead_name": lead_name},
["name", "customer_name"], as_dict=True)
if not customer_name:

View File

@@ -192,7 +192,7 @@ def _get_cart_quotation(party=None):
party = get_party()
quotation = frappe.get_all("Quotation", fields=["name"], filters=
{party.doctype.lower(): party.name, "order_type": "Shopping Cart", "docstatus": 0},
{"customer_lead": party.name, "order_type": "Shopping Cart", "docstatus": 0},
order_by="modified desc", limit_page_length=1)
if quotation: