startPeriod($clock, 'previous_month'); } #[Computed] public function report(): ?ReimbursementReport { $period = $this->period(); return $period === null ? null : app(ReimbursementsReport::class)->execute($period); } public function updated(): void { $this->authorize('reports.view'); unset($this->report); } public function kilometers(?int $tenths): string { return $tenths === null ? '' : ReportFormat::kilometers($tenths); } public function what(ReimbursementEntry $expense): string { return ReportFormat::expenseText($expense); } public function render(): mixed { return $this->view()->title(__('reports.reimbursements.title')); } }; ?>

{{ __('reports.reimbursements.title') }}

{{ __('reports.reimbursements.intro') }}

@php($report = $this->report) @if ($report !== null)

{{ $this->periodLabel() }}

@if ($report->people === [])

{{ __('reports.reimbursements.none') }}

@else

{{ __('reports.reimbursements.grand_total', ['amount' => $this->money($report->costCents), 'km' => $this->kilometers($report->kilometerTenths)]) }}

@foreach ($report->people as $person)

{{ $person->name }}

@foreach ($person->lines as $line) @endforeach
{{ __('reports.reimbursements.table', ['name' => $person->name, 'period' => $this->periodLabel()]) }}
{{ __('reports.reimbursements.day') }} {{ __('reports.reimbursements.category') }} {{ __('reports.reimbursements.what') }} {{ __('reports.reimbursements.job') }} {{ __('reports.reimbursements.km') }} {{ __('reports.reimbursements.amount') }}
{{ $this->dateLabel($line->expense->spentOn) }} {{ __('expenses.categories.'.$line->expense->category) }} {{ $this->what($line->expense) }} {{ $line->jobNumber }} {{ $line->jobName }} {{ $this->kilometers($line->expense->kilometerTenths) }} {{ $this->money($line->expense->costCents) }}
{{ __('reports.reimbursements.person_total', ['name' => $person->name]) }} {{ $this->kilometers($person->kilometerTenths) }} {{ $this->money($person->costCents) }}
@endforeach @endif @endif