fix school year for all tables
Tests / PHPUnit (push) Failing after 1m20s

This commit is contained in:
root
2026-07-18 14:45:38 -04:00
parent 4db8334a3c
commit 716cc8b8d3
125 changed files with 2315 additions and 81 deletions
@@ -860,8 +860,13 @@ class LandingPageController extends BaseController
->get()
->getResultArray();
// Fetch latest invoice balance
$paymentBalance = $this->invoiceModel->getLatestInvoiceTotalAmount($parentId);
$paymentRow = $this->db->table('invoices')
->select('COALESCE(SUM(balance), 0) AS account_balance')
->where('parent_id', $parentId)
->where('school_year', $this->schoolYear)
->get()
->getRowArray();
$paymentBalance = (float) ($paymentRow['account_balance'] ?? 0);
// Pass data to the view, including the deadlines
return view('/landing_page/parent_dashboard', [