{{-- A prediction's evidence: why it was made, and every invoice behind it. Expects $prediction, $reasons (array of strings) and $baseCode. --}} @php $rows = collect($prediction->evidence ?? []); $inPattern = $rows->where('in_pattern', true); @endphp
{{ trans_choice('{1} :count invoice|[2,*] :count invoices', $inPattern->count(), ['count' => $inPattern->count()]) }}: {{ $inPattern->pluck('issued_on')->map(fn ($d) => \Illuminate\Support\Carbon::parse($d)->format('M Y'))->unique()->implode(', ') }}
@if ($reasons !== [])

{{ \Illuminate\Support\Str::ucfirst(implode('; ', $reasons)) }}.

@endif