@extends('layouts.app') @section('title', 'Productos Más Comprados') @section('content')
Productos Listados
Unidades Compradas
Monto Total
| # | Producto | SKU | Categoría | Cantidad Comprada | Facturas | Precio Promedio | Monto Total |
|---|---|---|---|---|---|---|---|
| {{ $index + 1 }} |
{{ $item['product']->name }}
@if($item['product']->brand)
{{ $item['product']->brand->name }} @endif |
{{ $item['product']->sku ?? 'N/A' }} | {{ $item['product']->category->name ?? 'N/A' }} | {{ number_format($item['total_quantity'], 2) }} | {{ number_format($item['invoice_count'], 0) }} | ${{ number_format($item['avg_price'], 2) }} | ${{ number_format($item['total_amount'], 2) }} |
| No se encontraron productos comprados en el período seleccionado. | |||||||
| Totales: | {{ number_format(array_sum(array_column($topProducts, 'total_quantity')), 2) }} | - | - | ${{ number_format(array_sum(array_column($topProducts, 'total_amount')), 2) }} | |||