mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-06 21:59:13 +00:00
refactor(supplier_quotation): Replace SQL by the orm (#55155)
This commit is contained in:
@@ -347,14 +347,12 @@ def make_quotation(source_name: str, target_doc: str | Document | None = None):
|
|||||||
|
|
||||||
|
|
||||||
def set_expired_status():
|
def set_expired_status():
|
||||||
frappe.db.sql(
|
frappe.db.set_value(
|
||||||
"""
|
"Supplier Quotation",
|
||||||
UPDATE
|
filters={"status": ["not in", ["Cancelled", "Stopped"]], "valid_till": ["<", nowdate()]},
|
||||||
`tabSupplier Quotation` SET `status` = 'Expired'
|
fieldname="status",
|
||||||
WHERE
|
value="Expired",
|
||||||
`status` not in ('Cancelled', 'Stopped') AND `valid_till` < %s
|
update_modified=True,
|
||||||
""",
|
|
||||||
(nowdate()),
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user