mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-06 15:00:27 +00:00
fix: Cart test fixes
This commit is contained in:
@@ -205,8 +205,8 @@ def _make_sales_invoice(source_name, target_doc=None, ignore_permissions=False):
|
|||||||
|
|
||||||
def _make_customer(source_name, ignore_permissions=False):
|
def _make_customer(source_name, ignore_permissions=False):
|
||||||
quotation = frappe.db.get_value("Quotation", source_name, ["order_type", "customer_lead"])
|
quotation = frappe.db.get_value("Quotation", source_name, ["order_type", "customer_lead"])
|
||||||
if quotation and quotation[0] and not quotation[2]:
|
if quotation and quotation[1]:
|
||||||
lead_name = quotation[0]
|
lead_name = quotation[1]
|
||||||
customer_name = frappe.db.get_value("Customer", {"lead_name": lead_name},
|
customer_name = frappe.db.get_value("Customer", {"lead_name": lead_name},
|
||||||
["name", "customer_name"], as_dict=True)
|
["name", "customer_name"], as_dict=True)
|
||||||
if not customer_name:
|
if not customer_name:
|
||||||
|
|||||||
@@ -192,7 +192,7 @@ def _get_cart_quotation(party=None):
|
|||||||
party = get_party()
|
party = get_party()
|
||||||
|
|
||||||
quotation = frappe.get_all("Quotation", fields=["name"], filters=
|
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)
|
order_by="modified desc", limit_page_length=1)
|
||||||
|
|
||||||
if quotation:
|
if quotation:
|
||||||
|
|||||||
Reference in New Issue
Block a user