@extends('layouts.app') @section('title', 'Cerrar Caja') @section('content')
{{-- Panel izquierdo: arqueo previo --}}
Resumen del Turno
{{-- Info básica --}}
Cajero
{{ auth()->user()->name }}
Apertura
{{ $cashRegister->opening_time->format('H:i') }}
Inicio S/
{{ number_format($cashRegister->opening_amount,2) }}
{{-- Ventas por método --}}
Ventas por método
@php $methods = [ ['Efectivo','cash',$totalCash,'#16a34a','#f0fdf4'], ['Tarjeta','card',$totalCard,'#2563eb','#eff6ff'], ['Yape','yape',$totalYape,'#d97706','#fffbeb'], ['Plin','plin',$totalPlin,'#0891b2','#ecfeff'], ['Transferencia','transferencia',$totalTransfer,'#7c3aed','#f5f3ff'], ]; @endphp @foreach($methods as [$label,$key,$amount,$color,$bg]) @if($amount > 0 || $key === 'cash')
{{ $label }} S/ {{ number_format($amount,2) }}
@endif @endforeach
{{-- Arqueo --}}
AperturaS/ {{ number_format($cashRegister->opening_amount,2) }}
+ Efectivo vendidoS/ {{ number_format($totalCash,2) }}
− GastosS/ {{ number_format($totalExpenses,2) }}
= Esperado en cajaS/ {{ number_format($expectedAmount,2) }}
{{-- Total ventas --}}
Total Ventas del Turno
S/ {{ number_format($totalSales,2) }}
{{ $orders->count() }} operaciones
{{-- Panel derecho: formulario cierre --}}
Cerrar Turno de Caja
Turno abierto: {{ $cashRegister->opening_time->format('d/m/Y H:i') }}
{{-- Monto esperado destacado --}}
Monto Esperado
S/ {{ number_format($expectedAmount,2) }}
Según registros del sistema
@csrf
S/
Cancelar
@endsection