@extends('layouts.admin') @section('title', 'Comanda ' . $reservation->locator) @section('breadcrumb') Day Use / {{ $reservation->locator }} @endsection @push('styles') @endpush @section('content') @php $isClosed = in_array($reservation->status, ['checked_out','canceled']); @endphp {{-- ─── Header da Comanda ─── --}}
{{ strtoupper(substr($reservation->guest?->first_name ?? 'P', 0, 1)) }}
{{ $reservation->guest?->full_name ?? 'Passante' }}
{{ $reservation->locator }}
Aberta: {{ $reservation->check_in_realized?->format('H:i') ?? '—' }} @if($reservation->check_out_realized) Fechada: {{ $reservation->check_out_realized->format('H:i') }} @endif {{ $reservation->status_label }}
Imprimir @if(!$isClosed) @endif Voltar
@if(session('success'))
✓ {{ session('success') }}
@endif
{{-- ─── PAINEL ESQUERDO: Itens ─── --}}
{{-- Lançar Item --}} @if(!$isClosed)

Lançar Item

@endif {{-- Tabela de Itens --}}

Itens Lançados

@if(!$isClosed)@endif @forelse($reservation->items as $item) @if(!$isClosed) @endif @empty @endforelse
Descrição Qtd Unit. Total Hr
{{ $item->description }} {{ $item->quantity }} R$ {{ number_format($item->unit_price, 2, ',', '.') }} R$ {{ number_format($item->total_price, 2, ',', '.') }} {{ $item->created_at->format('H:i') }} @if($item->status !== 'reversed') @endif
Nenhum item lançado ainda.
{{-- ─── PAINEL DIREITO: Resumo + Pagamento ─── --}}
{{-- Resumo Financeiro --}}

Resumo Financeiro

@php $totalGeneral = $reservation->total_general; $totalPaid = $reservation->total_paid; $balance = $reservation->balance; @endphp
Consumo (itens) R$ {{ number_format($reservation->total_items, 2, ',', '.') }}
Total Geral R$ {{ number_format($totalGeneral, 2, ',', '.') }}
Total Pago R$ {{ number_format($totalPaid, 2, ',', '.') }}
Saldo @if($balance > 0.01) R$ {{ number_format($balance, 2, ',', '.') }} a receber @elseif($balance < -0.01) R$ {{ number_format(abs($balance), 2, ',', '.') }} troco @else ✓ Quitado @endif
@if($isClosed)
✅ Conta {{ $reservation->status === 'canceled' ? 'Cancelada' : 'Fechada' }} @if($reservation->check_out_realized) em {{ $reservation->check_out_realized->format('H:i') }} @endif
@endif
{{-- Pagamentos --}} @if(!$isClosed)

Registrar Pagamento

@endif {{-- Histórico de Pagamentos --}}

Pagamentos

@if(!$isClosed)@endif @forelse($reservation->payments as $pm) @if(!$isClosed) @endif @empty @endforelse
Forma Valor Hr
{{ $pm->method?->name ?? '—' }} R$ {{ number_format($pm->amount, 2, ',', '.') }} {{ $pm->paid_at->format('H:i') }} @if($pm->status !== 'reversed') @endif
Nenhum pagamento registrado.
{{-- Forms hidden para fechar/cancelar --}} {{-- Toast Container --}}
@endsection @push('scripts') @endpush