mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-19 02:04:50 +00:00
fix: query for finding lost quotation (#19801)
* fix:query for finding lost quotation * Update opportunity.py
This commit is contained in:
committed by
Nabin Hait
parent
dc248b9458
commit
d16ef54665
@@ -130,10 +130,11 @@ class Opportunity(TransactionBase):
|
||||
|
||||
def has_lost_quotation(self):
|
||||
lost_quotation = frappe.db.sql("""
|
||||
select q.name
|
||||
from `tabQuotation` q, `tabQuotation Item` qi
|
||||
where q.name = qi.parent and q.docstatus=1
|
||||
and qi.prevdoc_docname =%s and q.status = 'Lost'
|
||||
select name
|
||||
from `tabQuotation`
|
||||
where docstatus=1
|
||||
and opportunity =%s
|
||||
and status = 'Lost'
|
||||
""", self.name)
|
||||
if lost_quotation:
|
||||
if self.has_active_quotation():
|
||||
|
||||
@@ -67,7 +67,6 @@ class Quotation(SellingController):
|
||||
opportunity = self.opportunity
|
||||
|
||||
opp = frappe.get_doc("Opportunity", opportunity)
|
||||
opp.status = None
|
||||
opp.set_status(update=True)
|
||||
|
||||
def declare_enquiry_lost(self, lost_reasons_list, detailed_reason=None):
|
||||
|
||||
Reference in New Issue
Block a user