@extends('layouts.app') @section('title', 'Historial de Ventas') @section('content')
Filtros: @if($fecha_inicio) Desde: {{ $fecha_inicio }} @endif @if($fecha_fin) Hasta: {{ $fecha_fin }} @endif
@endif @forelse($ventas as $venta)Producto | Cantidad | Precio Unitario | Subtotal | Descuento | Total LĂnea |
---|---|---|---|---|---|
{{ $detalle->producto->nombre ?? 'Producto eliminado' }} | {{ $detalle->cantidad }} | ${{ number_format($detalle->precio, 2) }} | ${{ number_format($detalle->subtotal, 2) }} | @if($detalle->descuento) ${{ number_format($detalle->descuento, 2) }} @else 0 @endif | @php $totalLinea = $detalle->subtotal - ($detalle->descuento ?? 0); @endphp ${{ number_format($totalLinea, 2) }} |
Descuento general: @if(isset($desc['general'])) {{ $desc['general']['monto'] }} ({{ $desc['general']['tipo'] }}) @else 0 @endif
@endif @emptyGenerado el {{ now()->format('d/m/Y H:i') }}
@endsection