{{-- Sweet Works ERP | app/Modules/Manufacturing/Resources/Views/routings/show.blade.php | v1.2 | 30/08/2026 --}} {{-- v1.2 — i18n sweep: replace all hardcoded text with __() calls. --}} {{-- v1.1 — Corrección: $op->workCenter → $op->resource con su planta. --}} {{-- v1.0 — Detalle Hoja de Ruta. --}} @extends('layouts.vertical') @section('content')

{{ $routing->code }} — {{ $routing->name }}

@can('manufacturing.routing.edit') {{ __('manufacturing.common.edit') }}
@csrf
@endcan {{ __('manufacturing.common.back') }}
@if(session('success'))
{{ session('success') }}
@endif
{{ __('manufacturing.routings.header') }} @if($routing->is_active) {{ __('manufacturing.common.active') }} @else {{ __('manufacturing.common.inactive') }} @endif
{{ __('manufacturing.work_centers.code') }}
{{ $routing->code }}
{{ __('manufacturing.work_centers.name') }}
{{ $routing->name }}
{{ __('manufacturing.routings.product') }}
{{ $routing->product->product_code ?? '—' }}
{{ $routing->product->product_name ?? '' }}
@if($routing->description)

{{ $routing->description }}

@endif
{{ __('manufacturing.routings.operations') }} {{ __('manufacturing.routings.ops_count', ['count' => $routing->operations->count()]) }}
@php $totalCycle = 0; $totalSetup = 0; $totalWait = 0; @endphp @forelse($routing->operations->sortBy('operation_number') as $op) @php $totalCycle += $op->cycle_time_minutes; $totalSetup += $op->setup_time_minutes; $totalWait += $op->wait_time_minutes; @endphp @empty @endforelse @if($routing->operations->count()) @endif
{{ __('manufacturing.routings.op_number') }} {{ __('manufacturing.routings.op_name') }} {{ __('manufacturing.routings.resource_col') }} {{ __('manufacturing.routings.plant') }} {{ __('manufacturing.routings.cycle_col') }} {{ __('manufacturing.routings.setup_col') }} {{ __('manufacturing.routings.wait_col') }} {{ __('manufacturing.routings.total_col') }}
{{ $op->operation_number }} {{ $op->name }} @if($op->resource) {{ $op->resource->code }} @else — @endif @if($op->resource?->workCenter) {{ $op->resource->workCenter->code }} @else — @endif {{ number_format($op->cycle_time_minutes, 2) }} {{ number_format($op->setup_time_minutes, 0) }} {{ number_format($op->wait_time_minutes, 0) }} {{ number_format($op->cycle_time_minutes + $op->setup_time_minutes + $op->wait_time_minutes, 2) }}
{{ __('manufacturing.routings.no_ops_show') }}
{{ __('manufacturing.routings.totals') }} {{ number_format($totalCycle, 2) }} {{ number_format($totalSetup, 0) }} {{ number_format($totalWait, 0) }} {{ number_format($totalCycle + $totalSetup + $totalWait, 2) }}
@endsection