style: format code with black
This commit is contained in:
@@ -13,12 +13,13 @@ def execute():
|
||||
so_item.docstatus = 1 and so.docstatus = 1
|
||||
and so_item.parent = so.name
|
||||
and so_item.prevdoc_docname = qo.name
|
||||
and qo.valid_till < so.transaction_date""" # check if SO was created after quotation expired
|
||||
and qo.valid_till < so.transaction_date""" # check if SO was created after quotation expired
|
||||
|
||||
frappe.db.sql(
|
||||
"""UPDATE `tabQuotation` qo SET qo.status = 'Expired' WHERE {cond} and exists({invalid_so_against_quo})"""
|
||||
.format(cond=cond, invalid_so_against_quo=invalid_so_against_quo)
|
||||
"""UPDATE `tabQuotation` qo SET qo.status = 'Expired' WHERE {cond} and exists({invalid_so_against_quo})""".format(
|
||||
cond=cond, invalid_so_against_quo=invalid_so_against_quo
|
||||
)
|
||||
)
|
||||
|
||||
valid_so_against_quo = """
|
||||
SELECT
|
||||
@@ -27,9 +28,10 @@ def execute():
|
||||
so_item.docstatus = 1 and so.docstatus = 1
|
||||
and so_item.parent = so.name
|
||||
and so_item.prevdoc_docname = qo.name
|
||||
and qo.valid_till >= so.transaction_date""" # check if SO was created before quotation expired
|
||||
and qo.valid_till >= so.transaction_date""" # check if SO was created before quotation expired
|
||||
|
||||
frappe.db.sql(
|
||||
"""UPDATE `tabQuotation` qo SET qo.status = 'Closed' WHERE {cond} and exists({valid_so_against_quo})"""
|
||||
.format(cond=cond, valid_so_against_quo=valid_so_against_quo)
|
||||
"""UPDATE `tabQuotation` qo SET qo.status = 'Closed' WHERE {cond} and exists({valid_so_against_quo})""".format(
|
||||
cond=cond, valid_so_against_quo=valid_so_against_quo
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user