Check for active quotations before declaring it as lost (#8969)
diff --git a/erpnext/crm/doctype/opportunity/opportunity.py b/erpnext/crm/doctype/opportunity/opportunity.py
index 8c695ed..eebf464 100644
--- a/erpnext/crm/doctype/opportunity/opportunity.py
+++ b/erpnext/crm/doctype/opportunity/opportunity.py
@@ -75,7 +75,7 @@
self.lead = lead_name
def declare_enquiry_lost(self,arg):
- if not self.has_lost_quotation():
+ if not self.has_active_quotation():
frappe.db.set(self, 'status', 'Lost')
frappe.db.set(self, 'order_lost_reason', arg)
else: