= $this->extend('layout/management_layout') ?> = $this->section('content') ?> [], 'rows' => []]; $promotionSummary = $promotion['summary'] ?? []; $promotionTable = $promotionTable ?? []; $promotionRows = $promotionTable['rows'] ?? ($promotion['rows'] ?? []); $promotionSort = (string) ($promotionTable['sort'] ?? 'class'); $promotionOrder = (string) ($promotionTable['order'] ?? 'asc'); $promotionPage = (int) ($promotionTable['page'] ?? 1); $promotionPerPage = (int) ($promotionTable['perPage'] ?? 25); $promotionTotal = (int) ($promotionTable['total'] ?? count($promotionRows)); $promotionPageCount = (int) ($promotionTable['pageCount'] ?? 1); $promotionFrom = (int) ($promotionTable['from'] ?? ($promotionTotal === 0 ? 0 : 1)); $promotionTo = (int) ($promotionTable['to'] ?? count($promotionRows)); $promotionPerPageOptions = $promotionTable['allowedPerPage'] ?? [10, 25, 50, 100]; $blockers = $preview['blockers'] ?? []; $warnings = $preview['warnings'] ?? []; $carryForward = $preview['carry_forward'] ?? []; $status = (string) ($source['status'] ?? ''); $batchStatus = (string) ($latestBatch['status'] ?? ''); $money = static fn ($value): string => '$' . number_format((float) $value, 2); $score = static fn ($value): string => is_numeric($value) ? number_format((float) $value, 2) : '-'; $promotionUrl = static function (array $overrides = []) use ($source, $target, $promotionSort, $promotionOrder, $promotionPage, $promotionPerPage): string { $query = array_merge([ 'target_school_year_id' => $target['id'] ?? null, 'sort' => $promotionSort, 'order' => $promotionOrder, 'page' => $promotionPage, 'per_page' => $promotionPerPage, ], $overrides); $query = array_filter($query, static fn ($value): bool => $value !== null && $value !== ''); return site_url('administrator/school-years/' . (int) ($source['id'] ?? 0) . '/closing/preview?' . http_build_query($query)); }; $sortLink = static function (string $key, string $label, string $class = '') use ($promotionSort, $promotionOrder, $promotionUrl): string { $nextOrder = $promotionSort === $key && $promotionOrder === 'asc' ? 'desc' : 'asc'; $indicator = $promotionSort === $key ? ($promotionOrder === 'asc' ? ' (asc)' : ' (desc)') : ''; return '' . esc($label . $indicator) . ''; }; ?> getFlashdata('success')): ?>
No blocking issues found.
No warnings found.
| = $sortLink('student', 'Student') ?> | = $sortLink('school_id', 'School ID') ?> | = $sortLink('class', 'Class') ?> | = $sortLink('year_score', 'Year Score') ?> | = $sortLink('decision', 'Decision') ?> | = $sortLink('source', 'Source') ?> | = $sortLink('queue', 'Queue') ?> | = $sortLink('target', 'Next Year Placement') ?> | = $sortLink('status', 'Status') ?> |
|---|---|---|---|---|---|---|---|---|
| No active class assignments found for this school year. | ||||||||
| = esc($row['student_name'] ?? ('Student #' . (int) ($row['student_id'] ?? 0))) ?> | = esc($row['school_id'] ?? '') ?> | = esc($row['class_section_name'] ?? '') ?> | = esc($score($row['year_score'] ?? null)) ?> | = esc(($row['decision'] ?? '') !== '' ? $row['decision'] : '-') ?> | = esc($sourceLabel) ?> | = esc($queueStatus !== '' ? ucfirst($queueStatus) : '-') ?> | = esc($targetLabel !== '' ? $targetLabel : '-') ?> | = esc(ucfirst($rowStatus)) ?> |
| Family | Parent | Source Balance | Credits | Adjustments | Net Carry-Forward |
|---|---|---|---|---|---|
| No carry-forward balances found. | |||||
| = esc($row['family']) ?> |
= esc($row['parent'] ?? ('Parent #' . (int) ($row['family_id'] ?? 0))) ?>
= esc($row['parent_email']) ?>
|
= esc($money($row['source_balance'])) ?> | = esc($money($row['credit_amount'])) ?> | = esc($money($row['adjustment_amount'])) ?> | = esc($money($row['carry_forward_amount'])) ?> |