mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-02 19:59:12 +00:00
use nowdate instead of date.today()
Co-Authored-By: Deepesh Garg <42651287+deepeshgarg007@users.noreply.github.com>
This commit is contained in:
@@ -189,7 +189,8 @@ def set_expired_status():
|
|||||||
from datetime import date
|
from datetime import date
|
||||||
DATE_FORMAT = "%Y%m%d" # For converting python date to SQL comparable date
|
DATE_FORMAT = "%Y%m%d" # For converting python date to SQL comparable date
|
||||||
today = date.today().strftime(DATE_FORMAT)
|
today = date.today().strftime(DATE_FORMAT)
|
||||||
frappe.db.sql("UPDATE tabQuotation SET status = 'Expired' WHERE valid_till < " + today)
|
frappe.db.sql("""UPDATE `tabQuotation` SET status = 'Expired'
|
||||||
|
WHERE status != 'Expired' AND 'valid_till < %s""" , (nowdate()))
|
||||||
|
|
||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
def make_sales_invoice(source_name, target_doc=None):
|
def make_sales_invoice(source_name, target_doc=None):
|
||||||
|
|||||||
Reference in New Issue
Block a user