@extends('layouts.dental') @section('title', 'Caixa') @section('content')
{{-- Cards resumo --}}
Entradas
R$ {{ number_format($totalIncome,2,',','.') }}
Saídas
R$ {{ number_format($totalExpense,2,',','.') }}
Saldo
R$ {{ number_format($balance,2,',','.') }}
{{-- Tabela --}}
@forelse($transactions as $t) @empty @endforelse
Descrição Categoria Pagamento Valor Status
{{ $t->description }}
@if($t->patient)
{{ $t->patient->name }}
@endif
{{ ucfirst(str_replace('_',' ',$t->category)) }} {{ $t->payment_method ? ucfirst(str_replace('_',' ',$t->payment_method)) : '-' }} {{ $t->type==='income' ? '+' : '-' }} R$ {{ number_format($t->amount,2,',','.') }} {{ ucfirst($t->status) }}
@csrf @method('DELETE')
💰
Nenhum lançamento para esta data
@if($transactions->hasPages())
{{ $transactions->links() }}
@endif
{{-- Modal novo lançamento --}} @endsection