fix: Use correct doctype name for PCV perm-check (#56606)

closes https://github.com/frappe/erpnext/issues/56593
This commit is contained in:
Ankush Menat
2026-06-29 14:26:46 +05:30
committed by GitHub
parent 5523c15ab8
commit 747374e767

View File

@@ -92,7 +92,7 @@ class ProcessPeriodClosingVoucher(Document):
@frappe.whitelist()
def start_pcv_processing(docname: str):
if frappe.db.get_value("Process Period Closing Voucher", docname, "status") in ["Queued", "Running"]:
frappe.has_permission("Process Payment Reconciliation", "write", doc=docname, throw=True)
frappe.has_permission("Process Period Closing Voucher", "write", doc=docname, throw=True)
frappe.db.set_value("Process Period Closing Voucher", docname, "status", "Running")
timeout = frappe.db.get_single_value("Accounts Settings", "pcv_job_timeout") or 3600