@include('modules.reports.partials.pdf-company-details')
MATTER DETAIL REPORT
Matter: {{ $matter->matter_number }} — {{ $matter->matter_title }}
Status: {{ $matter->status?->status_name ?? 'N/A' }}
Type: {{ $matter->type?->type_name ?? 'N/A' }}
Opened: {{ $matter->opened_date ? \Carbon\Carbon::parse($matter->opened_date)->format('M j, Y') : 'N/A' }}
Closed: {{ $matter->closed_date ? \Carbon\Carbon::parse($matter->closed_date)->format('M j, Y') : '-' }}
Generated: {{ now()->format('M j, Y H:i') }}
Summary
| Invoices Total | {{ number_format((float)($totals['invoices_total'] ?? 0), 2) }} |
| Receipts Total | {{ number_format((float)($totals['receipts_total'] ?? 0), 2) }} |
| Balance | {{ number_format((float)($totals['balance'] ?? 0), 2) }} |
| Cases | {{ count($matterCases ?? []) }} |
Clients
@forelse(($matter->clients ?? collect()) as $c)
| {{ $c->full_name ?? $c->fullName ?? $c->name ?? 'Client' }} |
@empty
| No clients linked. |
@endforelse
Lawyers
@forelse(($matterLawyers ?? collect()) as $l)
@php
$nm = trim(($l->first_name ?? '') . ' ' . ($l->last_name ?? ''));
if ($nm === '') $nm = (string) ($l->lawyer_id ?? 'Lawyer');
@endphp
| {{ $nm }} |
{{ !empty($l->is_lead_lawyer) ? 'Lead' : '' }} |
@empty
| No lawyers linked. |
@endforelse
Cases
| Case # |
Case Name |
Client |
Type |
Status |
@forelse(($matterCases ?? collect()) as $case)
| {{ $case->case_id ?? ('CASE-' . $case->id) }} |
{{ $case->case_name ?? 'N/A' }} |
{{ optional($case->client)->full_name ?? 'N/A' }} |
{{ optional($case->caseType)->type_name ?? ($case->type_id ?? 'N/A') }} |
{{ optional($case->caseStatus)->status_name ?? ($case->status_code ?? 'N/A') }} |
@empty
| No cases linked to this matter. |
@endforelse
Invoices
| Invoice # |
Date |
Status |
Total |
Currency |
@forelse(($invoices ?? collect()) as $inv)
| {{ $inv->invoice_number }} |
{{ $inv->invoice_date ? $inv->invoice_date->format('Y-m-d') : 'N/A' }} |
{{ $inv->status ?? 'N/A' }} |
{{ number_format((float)($inv->total ?? 0), 2) }} |
{{ $inv->currency->currency_code ?? $inv->currency_id ?? 'N/A' }} |
@empty
| No invoices found for this matter. |
@endforelse
Receipts
| Receipt # |
Date |
Status |
Amount |
Currency |
@forelse(($receipts ?? collect()) as $rec)
| {{ $rec->receipt_number }} |
{{ $rec->receipt_date ? $rec->receipt_date->format('Y-m-d') : 'N/A' }} |
{{ $rec->status ?? 'N/A' }} |
{{ number_format((float)($rec->total_amount ?? 0), 2) }} |
{{ $rec->currency_id ?? 'N/A' }} |
@empty
| No receipts found for this matter. |
@endforelse