@extends('layouts.app') @section('title', $report::LABEL) @push('styles') @endpush @php $money = fn ($n) => $n === null || $n === '' ? '' : (((float) $n < 0 ? '(' : '') . number_format(abs((float) $n), 2) . ((float) $n < 0 ? ')' : '')); @endphp @section('content')
{{-- Catalogue --}}
{{-- Report --}}
Scope: {{ $filters->scope() }} — switch branch from the sidebar.
@if ($report::FILTER !== 'none')
@if ($report::FILTER === 'as_of')
@else
@if ($report::FILTER === 'ledger')
@endif @endif
@if ($report::FILTER !== 'as_of')
@foreach (['This month' => [today()->startOfMonth(), today()], 'Last month' => [today()->subMonthNoOverflow()->startOfMonth(), today()->subMonthNoOverflow()->endOfMonth()], 'Year to date' => [today()->startOfYear(), today()]] as $label => [$s, $e]) {{ $label }} @endforeach
@endif
@endif
{{-- Letterhead — also what a printed / PDF copy carries --}}
{{ $company?->company_name }}
@if ($company?->company_address)
{!! nl2br(e($company->company_address)) !!}
@endif

{{ $report::LABEL }}

{{ $result->subtitle }}
{{ $filters->scope() }}
@if ($company?->company_logo){{ $company->company_name }}@endif
@if ($result->stats)
@foreach ($result->stats as $s)
{{ $s['label'] }} {{ $s['value'] }} @if (!empty($s['hint'])){{ $s['hint'] }}@endif
@endforeach
@endif @if ($result->note)
{{ $result->note }}
@endif @include($result->view ?? 'reports.partials.table', ['result' => $result, 'money' => $money] + $result->data)
Generated {{ now()->format('M d, Y H:i') }} by {{ auth()->user()->username }} · Amounts in Naira; brackets denote negatives.
@endsection