fix: query for finding lost quotation (#19800)
* fix: query for finding lost quotation * Update opportunity.py
This commit is contained in:
parent
d285e9b7bd
commit
114e0db419
@ -130,10 +130,10 @@ 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():
|
||||
|
Loading…
Reference in New Issue
Block a user