fix: remove report field db set

This commit is contained in:
Gursheen Anand 2023-08-29 16:16:50 +05:30
parent a006b66e45
commit 060da2c5bc

View File

@ -412,10 +412,11 @@ def send_emails(document_name, from_scheduler=False, posting_date=None):
doc.add_comment(
"Comment", "Emails sent on: " + frappe.utils.format_datetime(frappe.utils.now())
)
doc.db_set("to_date", new_to_date, commit=True)
doc.db_set("from_date", new_from_date, commit=True)
doc.db_set("posting_date", new_to_date, commit=True)
doc.db_set("report", doc.report, commit=True)
if doc.report == "General Ledger":
doc.db_set("to_date", new_to_date, commit=True)
doc.db_set("from_date", new_from_date, commit=True)
else:
doc.db_set("posting_date", new_to_date, commit=True)
return True
else:
return False