@extends('layouts.app') @section('title', 'Compras por Proveedor') @section('content')
Proveedores Activos
Total de Compras
Total Pagado
Total Pendiente
| # | Proveedor | Facturas | Total Compras | Total Pagado | Total Pendiente | Promedio por Factura | % del Total |
|---|---|---|---|---|---|---|---|
| {{ $index + 1 }} |
{{ $item['supplier']->business_name }}
@if($item['supplier']->contact_name)
{{ $item['supplier']->contact_name }} @endif @if($item['supplier']->phone) {{ $item['supplier']->phone }} @endif |
{{ number_format($item['invoice_count'], 0) }} | ${{ number_format($item['total_amount'], 2) }} | ${{ number_format($item['total_paid'], 2) }} | ${{ number_format($item['total_due'], 2) }} | ${{ number_format($item['average_amount'], 2) }} | {{ $grandTotal > 0 ? number_format(($item['total_amount'] / $grandTotal * 100), 2) : 0 }}% |
| No se encontraron compras en el perĂodo seleccionado. | |||||||
| Totales: | {{ number_format(array_sum(array_column($report, 'invoice_count')), 0) }} | ${{ number_format($grandTotal, 2) }} | ${{ number_format(array_sum(array_column($report, 'total_paid')), 2) }} | ${{ number_format(array_sum(array_column($report, 'total_due')), 2) }} | - | 100% | |