@extends('layouts.app') @section('title', 'Reporte de Ventas') @section('content')

Reporte de Ventas

@forelse($ventas as $venta) @php $detalleCount = $venta->detalles->count(); @endphp @foreach($venta->detalles as $index => $detalle) @if ($index === 0) @endif @if ($index === 0) @endif @endforeach @empty @endforelse
Nro Venta Cliente Fecha Tipo Producto Cantidad Precio Unitario Subtotal Recibo
{{ $venta->id }} {{ $venta->cliente->nombre ?? 'Sin cliente' }} {{ \Carbon\Carbon::parse($venta->fecha_venta)->format('d/m/Y') }} {{ ucfirst($detalle->tipo_precio) }} {{ $detalle->nombre_producto ?? ($detalle->producto->nombre ?? 'Producto') }} {{ $detalle->cantidad }} Bs. {{ number_format($detalle->precio_unitario, 2) }} Bs. {{ number_format($detalle->precio_unitario * $detalle->cantidad, 2) }} PDF
No hay ventas registradas.
@endsection