@extends('layouts.app') @section('title', 'Compras por Proveedor') @section('content')

Compras por Proveedor

Volver a Reportes Exportar Excel
Filtros
Limpiar
Resumen General

{{ count($report) }}

Proveedores Activos

${{ number_format(array_sum(array_column($report, 'total_amount')), 2) }}

Total de Compras

${{ number_format(array_sum(array_column($report, 'total_paid')), 2) }}

Total Pagado

${{ number_format(array_sum(array_column($report, 'total_due')), 2) }}

Total Pendiente

Compras por Proveedor
@php $grandTotal = array_sum(array_column($report, 'total_amount')); @endphp @forelse($report as $index => $item) @empty @endforelse @if(count($report) > 0) @endif
# 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%
@endsection