{{-- Sweet Works ERP | app/Modules/Manufacturing/Resources/Views/boms/edit.blade.php | v1.6 | 31/08/2026 --}} {{-- v1.6 — Split components into two sections (Semi-Finished / Raw Material) + help popover. --}} {{-- v1.5 — Add Type column in components table; components array includes material_type for auto-badge. --}} {{-- v1.4 — Fix: @push('scripts') → @section('scripts') (layout uses @yield, not @stack). --}} {{-- v1.3 — BOM code readonly plaintext (auto-generated, not editable). --}} {{-- v1.2 — Fix: $p->product_name; JS usa $components (RM) separado de $products (FG) del header. --}} {{-- v1.1 — i18n: replace hardcoded "— Seleccionar —" with __('manufacturing.common.select'). --}} {{-- v1.0 — Formulario edición BOM con líneas dinámicas pre-cargadas. --}} @extends('layouts.vertical') @section('content') @php $popoverContent = '

' . e(__('manufacturing.boms.components_help_line1')) . '

' . '

' . e(__('manufacturing.boms.components_help_line2')) . '

' . '

' . e(__('manufacturing.boms.components_help_line3')) . '

' . '
' . e(__('manufacturing.boms.components_help_example')) . ''; @endphp

{{ __('manufacturing.boms.edit') }}: {{ $bom->code }}

@csrf @method('PUT') {{-- BOM Header --}}
{{ __('manufacturing.boms.edit') }}
@if($errors->any())
    @foreach($errors->all() as $e)
  • {{ $e }}
  • @endforeach
@endif

{{ $bom->code }}

@error('name')
{{ $message }}
@enderror
@error('product_id')
{{ $message }}
@enderror
{{-- Components heading + help popover --}}
{{ __('manufacturing.boms.lines') }}
{{-- Section A: Semi-Finished --}}
{{ __('manufacturing.boms.semi_finished_components') }}
{{ __('manufacturing.boms.line_component') }} {{ __('manufacturing.boms.line_type') }} {{ __('manufacturing.boms.line_qty') }} {{ __('manufacturing.boms.line_uom') }} {{ __('manufacturing.boms.line_scrap') }} {{ __('manufacturing.boms.line_yield') }} {{ __('manufacturing.boms.line_critical') }}
{{-- Section B: Raw Materials --}}
{{ __('manufacturing.boms.raw_material_components') }}
{{ __('manufacturing.boms.line_component') }} {{ __('manufacturing.boms.line_type') }} {{ __('manufacturing.boms.line_qty') }} {{ __('manufacturing.boms.line_uom') }} {{ __('manufacturing.boms.line_scrap') }} {{ __('manufacturing.boms.line_yield') }} {{ __('manufacturing.boms.line_critical') }}
{{ __('manufacturing.common.cancel') }}
@endsection @section('scripts') @endsection