{{-- Info do valor do crédito --}}

Valor do Crédito

1 Crédito = R$ {{ number_format($creditValueBRL, 2, ',', '.') }}

{{-- Cards de Estatísticas --}}
{{-- Total de Receita --}}

Receita Total

R$ {{ number_format($totalRevenue, 2, ',', '.') }}

{{-- Créditos em Circulação --}}

Créditos em Circulação

{{ number_format($totalCreditsInCirculation, 2, ',', '.') }}

R$ {{ number_format($totalCreditsInCirculationMoney, 2, ',', '.') }}

{{-- Créditos Vendidos --}}

Créditos Vendidos

{{ number_format($totalCreditsSold, 2, ',', '.') }}

R$ {{ number_format($totalCreditsSoldMoney, 2, ',', '.') }}

{{-- Créditos Consumidos --}}

Créditos Consumidos

{{ number_format($totalConsumptions, 2, ',', '.') }}

R$ {{ number_format($totalConsumptionsMoney, 2, ',', '.') }}

{{-- Comparação Mensal --}}

Vendas do Mês Atual

R$ {{ number_format($currentMonthSales, 2, ',', '.') }}

{{ now()->format('F/Y') }}

Vendas do Mês Anterior

R$ {{ number_format($lastMonthSales, 2, ',', '.') }}

{{ now()->subMonth()->format('F/Y') }}

Crescimento

{{ $salesGrowth >= 0 ? '+' : '' }}{{ number_format($salesGrowth, 1, ',', '.') }}%

Comparado ao mês anterior

{{-- Vendas por Método de Pagamento --}}

Vendas por Método de Pagamento

@forelse($salesByMethod as $method) @php $methodLabel = match($method->payment_method) { 'pix' => 'Pix', 'credit_card' => 'Cartão de Crédito', 'manual' => 'Ajuste Manual', default => $method->payment_method, }; $methodColor = match($method->payment_method) { 'pix' => 'bg-green-500', 'credit_card' => 'bg-blue-500', 'manual' => 'bg-yellow-500', default => 'bg-gray-500', }; $percentage = $totalRevenue > 0 ? ($method->total / $totalRevenue) * 100 : 0; @endphp
{{ $methodLabel }} R$ {{ number_format($method->total, 2, ',', '.') }} ({{ $method->count }} vendas)
@empty

Nenhuma venda registrada ainda.

@endforelse
{{-- Top Clientes --}}

Top 10 Clientes

@forelse($topClients as $client) @empty @endforelse
Cliente Créditos Total Gasto
{{ $client->user->name ?? 'Usuário removido' }} @if($client->user?->client_code) #{{ $client->user->client_code }} @endif {{ number_format($client->total_credits, 2, ',', '.') }} R$ {{ number_format($client->total_spent, 2, ',', '.') }}
Nenhum cliente ainda.
{{-- Compras Pendentes --}}

Compras Pendentes

Ver todas →
@forelse($pendingPurchases as $purchase)

{{ $purchase->user->name }} @if($purchase->user->client_code) #{{ $purchase->user->client_code }} @endif

{{ number_format($purchase->amount, 2, ',', '.') }} créditos - R$ {{ number_format($purchase->price, 2, ',', '.') }}

Pendente
@empty

Nenhuma compra pendente.

@endforelse
{{-- Últimas Transações --}}

Últimas Transações

@forelse($latestTransactions as $transaction)
@if($transaction->type === 'credit')
@else
@endif

{{ $transaction->user->name ?? 'Usuário removido' }} @if($transaction->user?->client_code) #{{ $transaction->user->client_code }} @endif

{{ $transaction->description }}

{{ $transaction->type === 'credit' ? '+' : '-' }}{{ number_format($transaction->amount, 2, ',', '.') }}

{{ $transaction->created_at->format('d/m H:i') }}

@empty

Nenhuma transação registrada.

@endforelse
{{-- Gráfico de Vendas dos Últimos 30 Dias --}}

Vendas dos Últimos 30 Dias

@push('scripts') @endpush