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):
|
def has_lost_quotation(self):
|
||||||
lost_quotation = frappe.db.sql("""
|
lost_quotation = frappe.db.sql("""
|
||||||
select q.name
|
select name
|
||||||
from `tabQuotation` q, `tabQuotation Item` qi
|
from `tabQuotation`
|
||||||
where q.name = qi.parent and q.docstatus=1
|
where docstatus=1
|
||||||
and qi.prevdoc_docname =%s and q.status = 'Lost'
|
and opportunity =%s and status = 'Lost'
|
||||||
""", self.name)
|
""", self.name)
|
||||||
if lost_quotation:
|
if lost_quotation:
|
||||||
if self.has_active_quotation():
|
if self.has_active_quotation():
|
||||||
|
Loading…
Reference in New Issue
Block a user