@extends('layouts.tenant') @section('title', 'Histórico de Faturas') @section('content')
Visualize e baixe suas faturas de cobrança
Total Pago
R$ {{ number_format($summary['total_paid'], 2, ',', '.') }}
Total de Faturas
{{ $summary['total_invoices'] }}
Pendentes
{{ $summary['pending_invoices'] }}
Média Mensal
R$ {{ number_format($summary['average_monthly'], 2, ',', '.') }}
| Fatura | Data | Plano | Valor | Status | Ações |
|---|---|---|---|---|---|
|
#{{ $invoice->invoice_number }}
@if($invoice->description)
{{ $invoice->description }}
@endif
|
{{ $invoice->created_at->format('d/m/Y') }}
{{ $invoice->created_at->format('H:i') }}
|
{{ $invoice->plan_name ?? 'N/A' }}
@if($invoice->billing_cycle)
{{ $invoice->billing_cycle === 'monthly' ? 'Mensal' : 'Anual' }}
@endif
|
R$ {{ number_format($invoice->amount, 2, ',', '.') }}
@if($invoice->tax_amount > 0)
+ R$ {{ number_format($invoice->tax_amount, 2, ',', '.') }} (impostos)
@endif
|
@php
$statusClasses = [
'paid' => 'bg-green-100 text-green-800',
'pending' => 'bg-yellow-100 text-yellow-800',
'failed' => 'bg-red-100 text-red-800',
'cancelled' => 'bg-gray-100 text-gray-800',
];
$statusLabels = [
'paid' => 'Pago',
'pending' => 'Pendente',
'failed' => 'Falhou',
'cancelled' => 'Cancelado',
];
@endphp
{{ $statusLabels[$invoice->status] ?? $invoice->status }}
@if($invoice->paid_at)
Pago em {{ $invoice->paid_at->format('d/m/Y') }}
@endif
|
@if(request()->hasAny(['year', 'status', 'amount_min'])) Não há faturas que correspondam aos filtros selecionados. @else Você ainda não possui faturas de cobrança. @endif
@if(request()->hasAny(['year', 'status', 'amount_min'])) Limpar Filtros @endif