@extends('admin.reports.pdf.layout') @php $reportBadge = 'Extrato Financeiro'; $reportTitle = 'Relatório de Transações'; $totalCredit = $transactions->where('type','credit')->sum('amount'); $totalDebit = $transactions->where('type','debit')->sum('amount'); $netBalance = $totalCredit - $totalDebit; @endphp @section('content') {{-- KPIs --}}
| Data/Hora | Descrição | Reserva | Usuário | Tipo | Valor |
|---|---|---|---|---|---|
|
{{ $t->transacted_at->format('d/m/Y') }} {{ $t->transacted_at->format('H:i') }} |
{{ $t->description }}
@if($t->notes) {{ $t->notes }}@endif |
@if($t->reservation)
#{{ $t->reservation->locator }} {{ $t->reservation->guest?->full_name }} @else — @endif |
{{ $t->createdBy?->name ?? '—' }} | @if($t->type === 'credit') ▲ Entrada @else ▼ Saída @endif | {{ $t->type === 'credit' ? '+' : '-' }}R$ {{ number_format($t->amount,2,',','.') }} |
| Nenhuma transação no período. | |||||
| TOTAL DO PERÍODO | {{ $netBalance >= 0 ? '+' : '-' }}R$ {{ number_format(abs($netBalance),2,',','.') }} | ||||