Merge pull request #1470 from pateljannat/issues-98

fix: don't allow billing page access if batch has started
This commit is contained in:
Jannat Patel
2025-04-28 12:38:13 +05:30
committed by GitHub
2 changed files with 6 additions and 2 deletions

View File

@@ -662,8 +662,7 @@ usePageMeta(() => {
}
iframe {
border-top: 3px solid theme('colors.gray.700');
border-bottom: 3px solid theme('colors.gray.700');
border: none !important;
}
.tc-table {

View File

@@ -240,6 +240,11 @@ def validate_billing_access(billing_type, name):
access = False
message = _("Batch is sold out.")
start_date = frappe.get_cached_value("LMS Batch", name, "start_date")
if start_date and date_diff(start_date, now()) < 0:
access = False
message = _("Batch has already started.")
elif access and billing_type == "certificate":
purchased_certificate = frappe.db.exists(
"LMS Enrollment",