Clara Rosa Hospital · Corporate / SACCO Module
{{ $title }}
Generated: {{ now()->format('d M Y H:i') }} ·
By: {{ auth()->user()->name ?? 'System' }}
@if (!empty($subtitle)) · Filters: {{ $subtitle }} @endif
@if (empty($columns) || empty($rows))
No data for the selected filters.
@else
@foreach ($columns as $col)
| {{ $col }} |
@endforeach
@foreach ($rows as $row)
@foreach ($columns as $key => $label)
@php
$field = is_string($key) ? $key : strtolower(str_replace(' ', '_', $label));
$val = is_array($row) ? ($row[$field] ?? '') : ($row->$field ?? '');
$isNum = is_numeric($val) && !str_contains((string) $val, '-');
@endphp
| {{ $isNum ? number_format($val, str_contains((string) $val, '.') ? 2 : 0) : $val }} |
@endforeach
@endforeach
@if (!empty($totals))
@foreach ($columns as $key => $label)
@php $field = is_string($key) ? $key : strtolower(str_replace(' ', '_', $label)); @endphp
| {{ $totals[$field] ?? '' }} |
@endforeach
@endif
@endif