@props([ 'title', 'pdfRoute' => null, 'backRoute' => null, 'backLabel' => 'Reports', 'from' => request('from', $accountingPeriod['from'] ?? null), 'to' => request('to', $accountingPeriod['to'] ?? null), 'asOf' => null, ]) @php $query = array_filter([ 'from' => $from, 'to' => $to, 'account_id' => request('account_id'), ]); $periodLabel = $accountingPeriod['label'] ?? null; @endphp
{{ $title }}
@if($asOf) As at {{ $asOf }} @elseif($from || $to) {{ $from ?: '…' }} to {{ $to ?: '…' }} @endif @if($periodLabel && !request()->has('from') && !request()->has('to')) Session period: {{ $periodLabel }} @endif
@foreach(request()->except(['from', 'to', 'page']) as $key => $value) @if(is_scalar($value)) @endif @endforeach
@if($pdfRoute) @can('reports.export')
@csrf
@endcan @endif @if($backRoute) {{ $backLabel }} @endif
{{ $slot }}
@once @push('scripts') @endpush @endonce