@extends('layouts.app') @section('title', 'Reportes | Veltrix v2') @section('page_title', 'Reportes') @section('page_subtitle', 'Gestion operativa en tiempo real') @section('page_icon', 'bx bxs-report') @section('content') @php $currentFilters = is_array($filters ?? null) ? $filters : []; $cashierRows = collect($cashiers ?? []); $branchRows = collect($branches ?? []); $summaryRow = is_array($summary ?? null) ? $summary : []; $salesByCashierRows = collect($salesByCashier ?? []); $topProductsRows = collect($topProducts ?? []); $frequentCustomersRows = collect($frequentCustomers ?? []); $inventorySummaryRow = is_array($inventorySummary ?? null) ? $inventorySummary : []; $inventorySnapshotRows = collect($inventorySnapshot ?? []); $inventoryMovementsRows = collect($inventoryMovements ?? []); $kardexRows = collect($kardexByRange ?? []); $cashClosingsRows = collect($cashClosings ?? []); $receivablesRow = is_array($receivables ?? null) ? $receivables : []; $payablesRow = is_array($payables ?? null) ? $payables : []; $profitByBranchRows = collect($profitByBranch ?? []); $salesByPaymentMethodRows = collect($salesByPaymentMethod ?? []); @endphp
Total credito: {{ money((float) ($receivablesRow['total_credito'] ?? 0)) }}
Total abonado: {{ money((float) ($receivablesRow['total_abonado'] ?? 0)) }}
Saldo pendiente: {{ money((float) ($receivablesRow['total_saldo'] ?? 0)) }}
Total compras: {{ money((float) ($payablesRow['total_compras'] ?? 0)) }}
Total pagado: {{ money((float) ($payablesRow['total_pagado'] ?? 0)) }}
Saldo pendiente: {{ money((float) ($payablesRow['total_saldo'] ?? 0)) }}
| Sucursal | Ventas | Costo | Utilidad |
|---|---|---|---|
| {{ (string) ($row['sucursal'] ?? 'Sin sucursal') }} | {{ money((float) ($row['ventas_total'] ?? 0)) }} | {{ money((float) ($row['costo_total'] ?? 0)) }} | {{ money($profit) }} |
| Sin datos para el filtro actual. | |||
| Metodo | Pagos | Ventas | Total |
|---|---|---|---|
| {{ (string) ($row['metodo_pago'] ?? 'n/a') }} | {{ (int) ($row['pagos_count'] ?? 0) }} | {{ (int) ($row['ventas_count'] ?? 0) }} | {{ money((float) ($row['monto_total'] ?? 0)) }} |
| Sin pagos para el filtro actual. | |||
| Cajero | Ventas | Total |
|---|---|---|
| {{ (string) ($row['nombre'] ?? '') }} | {{ (int) ($row['ventas_count'] ?? 0) }} | {{ money((float) ($row['ventas_total'] ?? 0)) }} |
| Sin datos para el filtro actual. | ||
| Producto | Cantidad | Vendido | Utilidad |
|---|---|---|---|
| {{ (string) ($row['nombre'] ?? '') }} | {{ number_format((float) ($row['cantidad'] ?? 0), 2, '.', '') }} | {{ money((float) ($row['total_vendido'] ?? 0)) }} | {{ money((float) ($row['utilidad_estimada'] ?? 0)) }} |
| Sin datos para el filtro actual. | |||
| Cliente | Compras | Total | Ultima compra |
|---|---|---|---|
| {{ (string) ($row['nombre'] ?? '') }} | {{ (int) ($row['compras'] ?? 0) }} | {{ money((float) ($row['monto_total'] ?? 0)) }} | {{ (string) ($row['ultima_compra'] ?? '') }} |
| Sin datos para el filtro actual. | |||
| Fecha | Cajero | Caja | Diferencia |
|---|---|---|---|
| {{ (string) ($row['created_at'] ?? '') }} | {{ (string) ($row['cajero'] ?? '') }} | {{ $cashDisplay !== '' ? $cashDisplay : 'N/A' }} | {{ money($difference) }} |
| Sin cierres para el filtro actual. | |||
| Producto | Stock | Minimo | Valor |
|---|---|---|---|
| {{ (string) ($row['nombre'] ?? '') }} | {{ number_format($stockActual, 2, '.', '') }} | {{ number_format($stockMinimo, 2, '.', '') }} | {{ money((float) ($row['valor_inventario'] ?? 0)) }} |
| Sin productos disponibles. | |||
| Producto | Entradas | Salidas | Ajustes | Neto |
|---|---|---|---|---|
| {{ (string) ($row['producto'] ?? '') }} | {{ number_format((float) ($row['entradas'] ?? 0), 2, '.', '') }} | {{ number_format((float) ($row['salidas'] ?? 0), 2, '.', '') }} | {{ number_format((float) ($row['ajustes'] ?? 0), 2, '.', '') }} | {{ number_format($net, 2, '.', '') }} |
| Sin kardex para el rango actual. | ||||
| Fecha | Tipo | Producto | Cantidad | Referencia |
|---|---|---|---|---|
| {{ (string) ($row['created_at'] ?? '') }} | {{ (string) ($row['tipo'] ?? '') }} | {{ (string) ($row['producto'] ?? '') }} | {{ number_format((float) ($row['cantidad'] ?? 0), 2, '.', '') }} | {{ (string) ($row['referencia'] ?? '') }} |
| Sin movimientos para el filtro actual. | ||||