fix installment for carry over balance parent account
This commit is contained in:
@@ -161,6 +161,7 @@ if (!function_exists('enrollment_admin_rule_label')) {
|
||||
'SIBLING_LAST_NAME_MISMATCH' => 'Sibling last names do not match',
|
||||
'OUTSTANDING_BALANCE_BLOCKED' => 'Previous-year balance must be paid',
|
||||
'FINANCE_APPROVAL_REQUIRED' => 'Finance approval required',
|
||||
'CURRENT_YEAR_INSTALLMENT_OVERRIDE' => 'Allow installments for new-year balance only',
|
||||
'AGE_RULE_BLOCKED' => 'Age rule not met',
|
||||
'REGISTRATION_CLOSED' => 'Registration is closed',
|
||||
'REGISTRATION_NOT_OPEN' => 'Registration is not open yet',
|
||||
@@ -427,6 +428,14 @@ $reasonCodes = is_array($exceptionReasonCodes ?? null) ? $exceptionReasonCodes :
|
||||
<form method="post" action="<?= site_url('administrator/enrollment-admin/flags/' . $flagId . '/approve-exception') ?>" class="mb-2">
|
||||
<?= csrf_field() ?>
|
||||
<div class="small fw-semibold mb-1">Approve an exception for this student</div>
|
||||
<?php if ($flagTypeValue === 'FINANCIAL_REVIEW_REQUIRED'): ?>
|
||||
<div class="form-check mb-2">
|
||||
<input class="form-check-input" type="checkbox" name="allow_current_year_installments" id="allow_current_year_installments_<?= $flagId ?>" value="1">
|
||||
<label class="form-check-label small" for="allow_current_year_installments_<?= $flagId ?>">
|
||||
<?= esc(enrollment_admin_rule_label('CURRENT_YEAR_INSTALLMENT_OVERRIDE')) ?>
|
||||
</label>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<input class="form-control form-control-sm mb-2" name="reason" placeholder="Approval reason" required>
|
||||
<button class="btn btn-sm btn-warning" type="submit">Approve exception</button>
|
||||
</form>
|
||||
@@ -516,17 +525,13 @@ $reasonCodes = is_array($exceptionReasonCodes ?? null) ? $exceptionReasonCodes :
|
||||
$warningCodes = array_values(array_filter(array_map('strval', $evaluation['warning_rule_codes'] ?? [])));
|
||||
$failedCodes = array_values(array_unique(array_merge($blockingCodes, $reviewCodes)));
|
||||
$overridableCodes = array_values(array_diff($failedCodes, $nonOverridableCodes));
|
||||
$hasGrantableStudent = $hasGrantableStudent || $overridableCodes !== [];
|
||||
$hasGrantableStudent = true;
|
||||
$decision = (string) ($evaluation['decision'] ?? '');
|
||||
$canEnroll = !empty($evaluation['can_enroll']);
|
||||
?>
|
||||
<tr>
|
||||
<td>
|
||||
<?php if ($overridableCodes !== []): ?>
|
||||
<input class="form-check-input" type="checkbox" name="student_ids[]" value="<?= $studentId ?>">
|
||||
<?php else: ?>
|
||||
<span class="text-muted">-</span>
|
||||
<?php endif; ?>
|
||||
<input class="form-check-input" type="checkbox" name="student_ids[]" value="<?= $studentId ?>">
|
||||
</td>
|
||||
<td>
|
||||
<?= esc($studentPreview['student_name'] ?? '') ?>
|
||||
@@ -550,9 +555,13 @@ $reasonCodes = is_array($exceptionReasonCodes ?? null) ? $exceptionReasonCodes :
|
||||
</label>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
<?php else: ?>
|
||||
<span class="text-muted small">None</span>
|
||||
<?php endif; ?>
|
||||
<div class="form-check mt-1">
|
||||
<input class="form-check-input" type="checkbox" name="bypassed_rule_codes_by_student[<?= $studentId ?>][]" id="bypass_<?= $studentId ?>_current_year_installments" value="CURRENT_YEAR_INSTALLMENT_OVERRIDE">
|
||||
<label class="form-check-label small" for="bypass_<?= $studentId ?>_current_year_installments">
|
||||
<?= esc(enrollment_admin_rule_label('CURRENT_YEAR_INSTALLMENT_OVERRIDE')) ?>
|
||||
</label>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<?php if ($warningCodes !== []): ?>
|
||||
|
||||
Reference in New Issue
Block a user