chore: remove scaffolding

(cherry picked from commit 191c0e65a1)
This commit is contained in:
ruthra kumar
2025-10-20 12:22:45 +05:30
committed by Mergify
parent 5cc6a1771d
commit 4ebddc591f

View File

@@ -15,8 +15,6 @@ from erpnext.accounts.doctype.account_closing_balance.account_closing_balance im
make_closing_entries, make_closing_entries,
) )
BACKGROUND = True
class ProcessPeriodClosingVoucher(Document): class ProcessPeriodClosingVoucher(Document):
# begin: auto-generated types # begin: auto-generated types
@@ -91,7 +89,6 @@ class ProcessPeriodClosingVoucher(Document):
@frappe.whitelist() @frappe.whitelist()
def start_pcv_processing(docname: str): def start_pcv_processing(docname: str):
if frappe.db.get_value("Process Period Closing Voucher", docname, "status") in ["Queued", "Running"]: if frappe.db.get_value("Process Period Closing Voucher", docname, "status") in ["Queued", "Running"]:
# TODO: move this inside if block
frappe.db.set_value("Process Period Closing Voucher", docname, "status", "Running") frappe.db.set_value("Process Period Closing Voucher", docname, "status", "Running")
if normal_balances := frappe.db.get_all( if normal_balances := frappe.db.get_all(
"Process Period Closing Voucher Detail", "Process Period Closing Voucher Detail",
@@ -113,8 +110,6 @@ def start_pcv_processing(docname: str):
"status", "status",
"Running", "Running",
) )
if BACKGROUND:
frappe.enqueue( frappe.enqueue(
method="erpnext.accounts.doctype.process_period_closing_voucher.process_period_closing_voucher.process_individual_date", method="erpnext.accounts.doctype.process_period_closing_voucher.process_period_closing_voucher.process_individual_date",
queue="long", queue="long",
@@ -125,8 +120,6 @@ def start_pcv_processing(docname: str):
report_type=x.report_type, report_type=x.report_type,
parentfield=x.parentfield, parentfield=x.parentfield,
) )
else:
process_individual_date(docname, x.processing_date, x.report_type, x.parentfield)
else: else:
frappe.db.set_value("Process Period Closing Voucher", docname, "status", "Completed") frappe.db.set_value("Process Period Closing Voucher", docname, "status", "Completed")
@@ -260,7 +253,6 @@ def schedule_next_date(docname: str):
"status", "status",
"Running", "Running",
) )
if BACKGROUND:
frappe.enqueue( frappe.enqueue(
method="erpnext.accounts.doctype.process_period_closing_voucher.process_period_closing_voucher.process_individual_date", method="erpnext.accounts.doctype.process_period_closing_voucher.process_period_closing_voucher.process_individual_date",
queue="long", queue="long",
@@ -271,13 +263,6 @@ def schedule_next_date(docname: str):
report_type=to_process[0].report_type, report_type=to_process[0].report_type,
parentfield=to_process[0].parentfield, parentfield=to_process[0].parentfield,
) )
else:
process_individual_date(
docname,
to_process[0].processing_date,
to_process[0].report_type,
to_process[0].parentfield,
)
else: else:
ppcvd = qb.DocType("Process Period Closing Voucher Detail") ppcvd = qb.DocType("Process Period Closing Voucher Detail")
total_no_of_dates = ( total_no_of_dates = (