@extends('layouts.app') @section('title','Sessão de caixa') @section('content') @php $methodLabels=['cash'=>'Dinheiro','pix'=>'Pix','debit_card'=>'Débito','credit_card'=>'Crédito','bank_transfer'=>'Transferência','other'=>'Outro']; $typeLabels=['receipt'=>'Recebimento','supply'=>'Suprimento','withdrawal'=>'Sangria','expense'=>'Despesa']; @endphp

{{ $session->register->name }}

{{ $session->status==='closed'?'Fechado':'Aberto' }}
Operador {{ $session->openedBy->name }} · abertura {{ $session->opened_at->format('d/m/Y H:i') }}
Voltar ao caixa
Saldo inicial

R$ {{ number_format((float)$session->opening_balance,2,',','.') }}

Dinheiro esperado

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

Dinheiro contado

{{ $session->closing_reported_balance !== null ? 'R$ '.number_format((float)$session->closing_reported_balance,2,',','.') : '—' }}

Diferença

{{ $session->difference !== null ? 'R$ '.number_format((float)$session->difference,2,',','.') : '—' }}

Movimentações

{{ $session->transactions->count() }} registro(s)
@forelse($session->transactions as $tx)@empty@endforelse
Data/horaOperadorTipoFormaDescriçãoEntradaSaída
{{ $tx->occurred_at->format('d/m/Y H:i') }}{{ $tx->user?->name ?: 'Sistema' }}{{ $typeLabels[$tx->type] ?? $tx->type }}{{ $methodLabels[$tx->method] ?? $tx->method }}{{ $tx->description }}{{ $tx->direction==='in' ? 'R$ '.number_format((float)$tx->amount,2,',','.') : '—' }}{{ $tx->direction==='out' ? 'R$ '.number_format((float)$tx->amount,2,',','.') : '—' }}
Nenhuma movimentação.
@if($session->notes)
Observações: {{ $session->notes }}
@endif
@endsection