@extends('layouts.app') @section('title', 'Reporte de Ventas') @section('header', 'Reporte de Ventas') @section('content') @php $moneda = $empresaGlobal->moneda ?? 'S/'; @endphp

Total Ventas

{{ $moneda }}{{ number_format($totales['total'], 2) }}

{{ $totales['cantidad'] }} tickets

Subtotal

{{ $moneda }}{{ number_format($totales['subtotal'], 2) }}

Impuestos

{{ $moneda }}{{ number_format($totales['impuesto'], 2) }}

Descuentos

{{ $moneda }}{{ number_format($totales['descuento'], 2) }}

Por Forma de Pago

@foreach($porFormaPago as $forma => $datos) @endforeach
FormaCantidadTotal
{{ ucfirst($forma) }} {{ $datos['cantidad'] }} {{ $moneda }}{{ number_format($datos['total'], 2) }}

Ventas por Día

@foreach($porDia as $fecha => $datos) @endforeach
FechaTicketsTotal
{{ \Carbon\Carbon::parse($fecha)->format('d/m/Y') }} {{ $datos['cantidad'] }} {{ $moneda }}{{ number_format($datos['total'], 2) }}

Detalle de Ventas ({{ $ventas->count() }} tickets)

@foreach($ventas as $v) @endforeach
Ticket Fecha Cliente Cajero Pago Total
{{ $v->numero_ticket }} {{ $v->fecha_venta->format('d/m/Y H:i') }} {{ $v->cliente?->nombre_completo ?? 'Genérico' }} {{ $v->user->name }} {{ ucfirst($v->forma_pago) }} {{ $moneda }}{{ number_format($v->total, 2) }}
@endsection