refactor: hooks for monthly re-evaluation jobs

(cherry picked from commit fc4e5f165c)

# Conflicts:
#	erpnext/hooks.py
This commit is contained in:
ruthra kumar
2024-07-24 18:16:20 +05:30
committed by Mergify
parent 8e340bb7fd
commit c1fd95ac66
2 changed files with 16 additions and 0 deletions

View File

@@ -1571,6 +1571,18 @@ def auto_create_exchange_rate_revaluation_weekly() -> None:
create_err_and_its_journals(companies)
def auto_create_exchange_rate_revaluation_monthly() -> None:
"""
Executed by background job
"""
companies = frappe.db.get_all(
"Company",
filters={"auto_exchange_rate_revaluation": 1, "auto_err_frequency": "Montly"},
fields=["name", "submit_err_jv"],
)
create_err_and_its_journals(companies)
def get_payment_ledger_entries(gl_entries, cancel=0):
ple_map = []
if gl_entries: