{{-- ===== CABECERA ===== --}}
Tipo de Documento: {{ $cab['tipo_documento'] }}
{{ $cab['empresa_larga'] }}
{{ $cab['direccion'] }}
Código de Formato:
{{ $cab['codigo_formato'] }}{{ $cab['fecha_codigo'] ? ' / ' . $cab['fecha_codigo'] : '' }}
Versión: {{ $cab['version'] }}

INFORME INTERNO

{{-- ===== BLOQUE DE INFORMACIÓN ===== --}}
INFORME N° {{ $numero_informe }} Fecha: {{ $cab['fecha'] }}
Asunto: {{ $asunto }}
Dirigido a: @php $cargos = ['Gerente','Encargado','Super Intendente','Superintendente','Jefe','Director','Coordinador','Supervisor']; $esCargo = function ($linea) use ($cargos) { foreach ($cargos as $c) if (stripos($linea, $c) !== false) return true; return false; }; $esCC = fn ($linea) => str_starts_with(trim($linea), 'CC:') || str_starts_with(trim($linea), 'cc:'); @endphp @foreach($destinatarios as $linea)

{{ $linea }}

@endforeach
Elaborado por: {{ $elaborado_nombre }} @if($elaborado_cargo){{ $elaborado_cargo }}@endif
Objetivo: {{ $objetivo }}
{{-- ===== CUERPO DEL INFORME ===== --}} @if($orden->items->count())

CHECKLIST DEL MANTENIMIENTO — L: limpieza · I: inspección · Lu: lubricación · A: ajuste

@foreach($orden->items as $it) @foreach(['lila_l_limpieza','lila_i_inspeccion','lila_l_lubricacion','lila_a_ajuste'] as $f) @endforeach @endforeach
#Descripción LILuA Estado Lectura Observaciones
{{ $it->numero_item }} {{ $it->descripcion }}{{ $it->$f ? 'X' : '' }}{{ str_replace('_',' ',$it->estado_item) }} {{ $it->lectura_condicion }} {{ $it->observaciones }}
@endif @if($orden->costos->count())

COSTOS

@foreach($orden->costos as $c) @endforeach
ConceptoTipoCant.C. unit.Total
{{ $c->concepto }} {{ str_replace('_',' ',$c->tipo) }} {{ rtrim(rtrim(number_format($c->cantidad, 3),'0'),'.') }} {{ number_format($c->costo_unitario,2) }} {{ number_format($c->costo_total,2) }}
TOTAL {{ ($appConfig['moneda_simbolo'] ?? 'S/') }} {{ number_format($orden->costo_total,2) }}
@endif @if($orden->observaciones || $orden->observaciones_cierre)

COMENTARIOS

@if($orden->observaciones)
Observaciones: {{ $orden->observaciones }}
@endif @if($orden->observaciones_cierre)
Observaciones de cierre: {{ $orden->observaciones_cierre }}
@endif @endif {{-- ===== FIRMAS ===== --}} @php $renderFirma = function ($valor) { if (!$valor) return ['img' => null, 'texto' => '']; if (str_starts_with($valor, 'IMG:')) { [$ruta, $nombre, $fecha] = array_pad(explode('|', substr($valor, 4)), 3, ''); $abs = public_path('storage/' . $ruta); return [ 'img' => file_exists($abs) ? $abs : null, 'texto' => trim($nombre . ' — ' . $fecha, ' —'), ]; } if (str_starts_with($valor, 'TXT:')) { [$nombre, $fecha] = array_pad(explode('|', substr($valor, 4)), 2, ''); return ['img' => null, 'texto' => trim($nombre . ' — ' . $fecha, ' —')]; } return ['img' => null, 'texto' => $valor]; }; $fR = $renderFirma($orden->firma_responsable); $fS = $renderFirma($orden->firma_supervisor); @endphp
@if($fR['img'])
@endif {{ $fR['texto'] }}
Responsable
@if($fS['img'])
@endif {{ $fS['texto'] }}
Supervisor