@extends('layouts.app') @section('title', 'Ventas') @push('styles') @vite(['resources/css/ventas.css']) @endpush @section('content') @php $rol = session('usuario.ROL'); @endphp
{{-- ALERTAS --}} @if (session('error'))
⚠️
{{ session('error') }}
@endif @if (session('ok'))
{{ session('ok') }}
@endif

Ventas

Registra y revisa las ventas del día. (Todos los turnos ven lo mismo)

{{-- ✅ BOTÓN BLOQUEADO SI YA HAY REPORTE O CIERRE HOY --}} @if (!empty($diaBloqueado) && $diaBloqueado) 🔒 Día cerrado @else + Nueva venta @endif
{{-- Resumen del día --}}
Total (hoy)
📌
S/ {{ number_format($totales['total'] ?? 0, 2) }}
Suma final de ventas
Efectivo
💵
S/ {{ number_format($totales['efectivo'] ?? 0, 2) }}
Cobros en efectivo
Yape/Plin
📲
S/ {{ number_format($totales['yape'] ?? 0, 2) }}
Pagos móviles
Tarjeta
💳
S/ {{ number_format($totales['tarjeta'] ?? 0, 2) }}
Cobros POS
{{-- Tabla --}}

Listado

{{ $ventas->total() }} registros
@forelse($ventas as $v) @empty @endforelse
ID Fecha Producto Cant. Pago Subtotal Desc. Total
#{{ $v->ID_VENTA }} {{ \Carbon\Carbon::parse($v->FECHA_REGISTRO)->format('d/m/Y H:i') }} {{ $v->ID_PRODUCTO }} {{ $v->CANTIDAD }} {{ str_replace('_', '/', $v->METODO_PAGO) }} S/ {{ number_format($v->MONTO_PRODUCTO, 2) }} S/ {{ number_format($v->DESCUENTO_PRODUCTO, 2) }} S/ {{ number_format($v->TOTAL_VENTA, 2) }}
No hay ventas registradas.
{{ $ventas->links() }}
@endsection