fix(accounts): added permission checks on get_available_payment_schedules (#58588)

This commit is contained in:
Diptanil Saha
2026-08-31 13:06:01 +05:30
committed by GitHub
parent 83dea1a24e
commit 0e4b384af1

View File

@@ -1359,6 +1359,7 @@ def get_irequests_of_payment_request(doc: str | None = None) -> list:
@frappe.whitelist()
def get_available_payment_schedules(reference_doctype: str, reference_name: str):
ref_doc = frappe.get_doc(reference_doctype, reference_name)
ref_doc.check_permission()
if not hasattr(ref_doc, "payment_schedule") or not ref_doc.payment_schedule:
return []