@php $data = is_string($machine->data) ? json_decode($machine->data, true) : $machine->data ?? []; // Normalize Data Blocks $generalInfo = $data['generalInfo'] ?? []; $techDetail = $data['techDetail'] ?? []; $machineSpecs = $data['machineSpecs'] ?? []; $accessories = $data['loomAccessories'] ?? []; $beams = $data['beamsAndRollers'] ?? []; $camDetails = $data['camDetails'] ?? []; $dobbyDetails = $data['dobbyDetails'] ?? []; $jacquard = $data['jacquardDetails'] ?? []; $priceInfo = $data['priceInfo'] ?? []; $other = $data['other_info'] ?? []; $qty = $priceInfo['quantity'] ?? ($generalInfo['quantity'] ?? ($generalInfo['quantity_of_machines'] ?? '')); $typeStr = strtolower($machine->type_of_machine ?? ''); $isWeaving = str_contains($typeStr, 'weaving') || str_contains($typeStr, 'loom'); $isKnitting = str_contains($typeStr, 'knitting'); // Determine Main Header Title $docTitle = 'Other Machines'; if ($isWeaving) { $docTitle = 'Weaving Machine'; } elseif ($isKnitting) { $docTitle = 'Warp Knitting Machine'; } @endphp {{-- LOGO --}}
ITG Logo
@php // Volvemos al cálculo dinámico que asegura que no queden huecos abajo $imgRowspan = 7; if ($isWeaving) { $imgRowspan += 4; // 1 encabezado + 3 datos } elseif ($isKnitting) { $imgRowspan += 3; // 1 encabezado + 2 datos } else { $imgRowspan += 1; // 1 fila vacía } @endphp {{-- ============================================== --}} {{-- UNIFIED TOP ROW (Image + General Info) --}} {{-- ============================================== --}} {{-- AQUÍ ESTÁ LA MAGIA: LA FILA FANTASMA --}} {{-- No se va a ver en el PDF, pero obliga al generador a bloquear los anchos exactos al 60% y 40% (15+25) --}} {{-- LEFT HALF: IMAGE --}} {{-- RIGHT HALF: INFO - Fila 1 (Encabezado) --}} {{-- Envolvemos el texto largo para que salte de renglón si es necesario y NO empuje la imagen --}} {{-- SPECIFIC INFO APPENDED DYNAMICALLY BASED ON TYPE --}} @if ($isWeaving) @elseif($isKnitting) @else @endif
{{ $docTitle }}
@if ($machine->mainImage) @else
No Image Available
@endif
General Info
Brand: {{ $machine->brand }}
Model: {{ $machine->model }}
Width: {{ $generalInfo['width'] ?? '' }}
RPM: {{ $generalInfo['rpm'] ?? '' }}
Year: {{ $machine->year }}
Quantity of machines:
{{ $qty }}
Specific Info
Voltage (V): {{ $techDetail['voltage'] ?? ($machineSpecs['voltage'] ?? '') }}
Frequency (Hz): {{ $techDetail['frequency'] ?? ($machineSpecs['frequency'] ?? '') }}
Type of fabric
produced:
{{ __($machineSpecs['fabric_type'] ?? '') }}
Specific Info
N. bars: {{ $techDetail['n_bars'] ?? ($machineSpecs['n_bars'] ?? '') }}
N. Fineness: {{ $techDetail['n_fineness'] ?? ($machineSpecs['n_fineness'] ?? '') }}
Type of machine: {{ __($machineSpecs['type_of_machine'] ?? ($machineSpecs['type_of_machine'] ?? '')) }}
@if ($isWeaving) {{-- WEAVING: Machine Status & Type of Motion --}} @php $motion = strtolower($machineSpecs['movement_type'] ?? ''); @endphp {{-- WEAVING: Machine Status & Type of Motion --}} {{-- Encabezado Izquierdo --}} {{-- Encabezado Derecho (Ocupa 5 filas de alto) --}} {{-- Fila 1 Derecha --}} {{-- Valores Izquierdo (Ocupan las 4 filas restantes de alto) --}} {{-- Fila 2 Derecha --}} {{-- Fila 3 Derecha --}} {{-- Fila 4 Derecha --}} {{-- Fila 5 Derecha --}}
Machine statusType of
motion
Dobby {{ $motion == 'dobby' ? 'X' : '' }}
In working condition /
Stopped (how many months)
{{ __($machineSpecs['status'] ?? '') }} @if (($machineSpecs['status'] ?? '') === 'stopped')


Since: {{ $machineSpecs['stopped_since'] ?? '' }}

@endif @if (($machineSpecs['status'] ?? '') === 'other')

{{ $machineSpecs['other_status_description'] ?? '' }}

@endif
Cams {{ $motion == 'cams' ? 'X' : '' }}
Crank {{ $motion == 'crank' ? 'X' : '' }}
Jacquard {{ $motion == 'jacquard' ? 'X' : '' }}
E-sheet {{ $motion == 'e-sheet' || $motion == 'e_sheet' ? 'X' : '' }}
{{-- WEAVING: CAM Specifications (Conditional) --}} @if ($motion === 'cams' && !empty($camDetails))
CAM Specifications
Cam Model: {{ $camDetails['cam_model'] ?? '' }}
Total levers on loom: {{ $camDetails['total_levers'] ?? '' }} Levers installed/in use: {{ $camDetails['levers_in_use'] ?? '' }}
@endif {{-- WEAVING: Dobby Specifications (Conditional) --}} @if ($motion === 'dobby' && !empty($dobbyDetails))
Dobby Specifications
Dobby Model: {{ $dobbyDetails['dobby_model'] ?? '' }}
Total levers on loom: {{ $dobbyDetails['total_levers'] ?? '' }} Levers installed/in use: {{ $dobbyDetails['levers_in_use'] ?? '' }}
@endif {{-- WEAVING: Accessories / Loom --}} {{-- Encabezados Principales --}} {{-- Fila 1 - Accesorios --}} {{-- Celda Derecha "Other Info" (Ocupa las 5 filas hacia abajo) --}} {{-- Fila 2 - Accesorios --}} {{-- Fila 3 - Accesorios --}} {{-- Fila 4 - Accesorios --}} {{-- Fila 5 - Accesorios --}}
Accessories / Loom Other info
Quantity Colors {{ $accessories['n_colors'] ?? '' }} Cloth roller @if (!empty($beams['cloth_roller_quantity'])) {{ $beams['cloth_roller_quantity'] }} @endif Big Batcher {{ $beams['batching_motion'] ?? false ? 'X' : '' }} {{ $other['additional_information'] ?? '' }}
Quantity Weft feeders {{ $accessories['n_weft_feeders'] ?? '' }} Beams: Lower {{ $beams['n_lower_beams'] ?? '' }} Upper {{ $beams['n_upper_beams'] ?? '' }}
Quantity Frames {{ $accessories['n_frames'] ?? '' }} Flange dia: Lower {{ $beams['n_lower_flange_diameter'] ?? '' }} Upper {{ $beams['n_upper_flange_diameter'] ?? '' }}
Quantity Heald {{ $accessories['n_healds'] ?? '' }}
Quantity Droppers {{ $accessories['n_droppers'] ?? '' }}
{{-- WEAVING: Jacquard Block --}} @if (!empty($jacquard)) @php $isGantry = $jacquard['is_gantry_included'] ?? false; $isHarness = $jacquard['is_harness_included'] ?? false; @endphp
JACQUARD
Brand model: {{ $jacquard['brand'] ?? '' }} {{ $jacquard['model'] ?? '' }} Controller model: {{ $jacquard['controller_brand_model'] ?? '' }}
Hook capacity:
{{ $jacquard['total_hooks'] ?? '' }}
Gantry included: Yes {{ $isGantry ? 'X' : '' }} No {{ !$isGantry ? 'X' : '' }}
Harness included? Yes {{ $isHarness ? 'X' : '' }} No {{ !$isHarness ? 'X' : '' }}
N. hooks installed: {{ $jacquard['n_installed_hooks'] ?? '' }}
Year of model: {{ $jacquard['year'] ?? '' }}
Please add extra info and all extra parts...
(healds, gears, etc...)
{{ $other['additional_information'] ?? '' }}
@endif @elseif($isKnitting) {{-- ============================================== --}} {{-- KNITTING SPECIFIC BLOCK --}} {{-- ============================================== --}} {{-- Columna Izquierda: Fila 1 --}} {{-- Columna Derecha: Se expande hacia abajo ocupando 6 filas en total --}} {{-- Columna Izquierda: Fila 2 --}} {{-- Columna Izquierda: Fila 3 --}} {{-- Columna Izquierda: Fila 4 --}} {{-- Columna Izquierda: Fila 5 --}} {{-- Columna Izquierda: Fila 6 --}}
Weaving Type Please add any extra info and all extra parts and material (Needles, electronics, etc...)
(healds, droppers, frames, gears, etc...)
{{ $other['additional_information'] ?? '' }}
{{ __($techDetail['weaving_type'] ?? ($machineSpecs['weaving_type'] ?? '')) }}
Fabric Winder
{{ __($techDetail['fabric_winder'] ?? ($machineSpecs['fabric_winder'] ?? '')) }}
Machine Movement
{{ __($techDetail['machine_movement'] ?? ($machineSpecs['machine_movement'] ?? '')) }}
@else {{-- ============================================== --}} {{-- OTHER MACHINES SPECIFIC BLOCK --}} {{-- ============================================== --}}
Please add any extra info and all extra spare parts and material
(healds, droppers, frames, gears, needles, electronics, etc...) {{-- El contenedor principal para la información extra --}}
{{ $other['additional_information'] ?? '' }}
@endif