refactor: only run checks on specified companies
(cherry picked from commit 00eeacd06a)
# Conflicts:
# erpnext/accounts/utils.py
This commit is contained in:
@@ -2104,9 +2104,9 @@ def run_ledger_health_checks():
|
|||||||
|
|
||||||
# Debit-Credit mismatch report
|
# Debit-Credit mismatch report
|
||||||
if health_monitor_settings.debit_credit_mismatch:
|
if health_monitor_settings.debit_credit_mismatch:
|
||||||
|
for x in health_monitor_settings.companies:
|
||||||
|
filters = {"company": x.company, "from_date": period_start, "to_date": period_end}
|
||||||
voucher_wise = frappe.get_doc("Report", "Voucher-wise Balance")
|
voucher_wise = frappe.get_doc("Report", "Voucher-wise Balance")
|
||||||
filters = {"company": "நுண்ணறி", "from_date": period_start, "to_date": period_end}
|
|
||||||
|
|
||||||
res = voucher_wise.execute_script_report(filters=filters)
|
res = voucher_wise.execute_script_report(filters=filters)
|
||||||
for x in res[1]:
|
for x in res[1]:
|
||||||
doc = frappe.new_doc("Ledger Health")
|
doc = frappe.new_doc("Ledger Health")
|
||||||
@@ -2118,6 +2118,7 @@ def run_ledger_health_checks():
|
|||||||
|
|
||||||
# General Ledger and Payment Ledger discrepancy
|
# General Ledger and Payment Ledger discrepancy
|
||||||
if health_monitor_settings.general_and_payment_ledger_mismatch:
|
if health_monitor_settings.general_and_payment_ledger_mismatch:
|
||||||
|
<<<<<<< HEAD
|
||||||
gl_pl_comparison = frappe.get_doc("Report", "General and Payment Ledger Comparison")
|
gl_pl_comparison = frappe.get_doc("Report", "General and Payment Ledger Comparison")
|
||||||
filters = {
|
filters = {
|
||||||
"company": "நுண்ணறி",
|
"company": "நுண்ணறி",
|
||||||
@@ -2150,3 +2151,20 @@ def run_ledger_health_checks():
|
|||||||
doc.checked_on = run_date
|
doc.checked_on = run_date
|
||||||
doc.save()
|
doc.save()
|
||||||
>>>>>>> a42482ce35 (refactor: control monitoring through settings page)
|
>>>>>>> a42482ce35 (refactor: control monitoring through settings page)
|
||||||
|
=======
|
||||||
|
for x in health_monitor_settings.companies:
|
||||||
|
filters = {
|
||||||
|
"company": x.company,
|
||||||
|
"period_start_date": period_start,
|
||||||
|
"period_end_date": period_end,
|
||||||
|
}
|
||||||
|
gl_pl_comparison = frappe.get_doc("Report", "General and Payment Ledger Comparison")
|
||||||
|
res = gl_pl_comparison.execute_script_report(filters=filters)
|
||||||
|
for x in res[1]:
|
||||||
|
doc = frappe.new_doc("Ledger Health")
|
||||||
|
doc.voucher_type = x.voucher_type
|
||||||
|
doc.voucher_no = x.voucher_no
|
||||||
|
doc.general_and_payment_ledger_mismatch = True
|
||||||
|
doc.checked_on = run_date
|
||||||
|
doc.save()
|
||||||
|
>>>>>>> 00eeacd06a (refactor: only run checks on specified companies)
|
||||||
|
|||||||
Reference in New Issue
Block a user