@php // Resolver logo: settings.company_logo_frontend → uploads.img_path $logoPath = null; try { $companyId = optional($company)->id ?? auth()->user()->company_id ?? null; if ($companyId) { $logoSetting = \DB::table('settings') ->where('company_id', $companyId) ->where('name', 'company_logo_frontend') ->value('value'); if ($logoSetting && is_numeric($logoSetting)) { $imgPath = \DB::table('uploads')->where('id', $logoSetting)->value('img_path'); if ($imgPath) { $abs = public_path($imgPath); if (file_exists($abs)) $logoPath = $abs; } } } } catch (\Throwable $e) { /* sin logo si falla */ } $razonSocial = optional($company)->company_name ?: optional($company)->name ?: 'EMPRESA'; @endphp
@if ($logoPath)
@endif
{{ strtoupper($razonSocial) }}
Ingresos Efectuados a Empleados
{{ $dateRange['label'] ?? '' }}
@foreach ($groups as $group)
{{ $group['name'] }}
Código
Nombre del Empleado
Valor del Ingreso
@foreach ($group['rows'] as $r)
{{ $r['code'] }}
{{ $r['employee'] }}
${{ number_format((float) $r['amount'], 2, '.', ',') }}
@endforeach
TOTAL {{ $group['name'] }}:
${{ number_format((float) $group['subtotal'], 2, '.', ',') }}
@endforeach
TOTAL INGRESOS: ${{ number_format((float) $grandTotal, 2, '.', ',') }}