update financial controller and fix curriculum subjects

This commit is contained in:
root
2026-03-02 00:04:38 -05:00
parent 35b9cba882
commit 7c5028a76d
5 changed files with 320 additions and 268 deletions
+7 -3
View File
@@ -11,9 +11,13 @@
<div class="text-muted">
<?= esc(ucfirst($semester ?? '')) ?> • <?= esc($schoolYear ?? '') ?>
</div>
<a class="btn btn-outline-secondary btn-sm" href="<?= base_url('grading') ?>">
Back to Grading
</a>
<?php if (!empty($canViewGrading)): ?>
<a class="btn btn-outline-secondary btn-sm" href="<?= base_url('grading') ?>">
Back to Grading
</a>
<?php else: ?>
<span class="text-muted small">You do not have access to the Grading page.</span>
<?php endif; ?>
</div>
<?php
+3 -5
View File
@@ -1,7 +1,7 @@
<?php
/** @var string $school_year */
/** @var array<string> $schoolYears */
/** @var array<int,array{parent_id:int,parent_name:string,email:string,total_invoice:float,total_balance:float,total_discount:float,total_paid:float,remaining_installments:int,installment_amount:float,type:string,has_installment?:int,next_installment?:string}> $rows */
/** @var array<int,array{parent_id:int,parent_name:string,email:string,total_invoice:float,total_balance:float,total_discount:float,total_paid:float,payment_count:int,remaining_installments:int,installment_amount:float,type:string,has_installment?:int,next_installment?:string}> $rows */
?>
<?= $this->extend('layout/management_layout') ?>
@@ -15,8 +15,6 @@
.table thead th { background: var(--mgmt-thead-bg, #f1f3f5); }
.actions { white-space: nowrap; }
.actions .btn { --bs-btn-padding-y: .25rem; --bs-btn-padding-x: .5rem; }
.email-cell { max-width: 280px; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 576px){ .email-cell { max-width: 180px; } }
/* Disable sticky header for this table to avoid overlap */
table.no-mgmt-sticky thead th { position: static !important; }
</style>
@@ -54,7 +52,7 @@
<thead>
<tr>
<th>Parent</th>
<th>Email</th>
<th class="text-center">Nbr of Installements</th>
<th>Type</th>
<th class="text-end">Invoice Amount</th>
<th class="text-end">Applied Discount</th>
@@ -86,7 +84,7 @@
</a>
<small class="text-muted">#<?= (int)$r['parent_id'] ?></small>
</td>
<td class="email-cell"><a href="mailto:<?= esc($r['email']) ?>"><?= esc($r['email']) ?></a></td>
<td class="text-center"><?= (int)($r['payment_count'] ?? 0) ?></td>
<td>
<?php if (($r['type'] ?? '') === 'no_payment'): ?>
<span class="badge bg-danger badge-type">no payment</span>