@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'))
@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 --}}
S/ {{ number_format($totales['total'] ?? 0, 2) }}
Suma final de ventas
S/ {{ number_format($totales['efectivo'] ?? 0, 2) }}
Cobros en efectivo
S/ {{ number_format($totales['yape'] ?? 0, 2) }}
Pagos móviles
S/ {{ number_format($totales['tarjeta'] ?? 0, 2) }}
Cobros POS
{{-- Tabla --}}
Listado
{{ $ventas->total() }} registros
| ID |
Fecha |
Producto |
Cant. |
Pago |
Subtotal |
Desc. |
Total |
@forelse($ventas as $v)
| #{{ $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) }} |
@empty
| No hay ventas registradas. |
@endforelse
@endsection