@extends('index') @section('content') PTC Issuance Back @csrf PTC No: PTC-{{ $ptc->stock_no }} Product: {{ $product ? $product->name . ' - ' . $product->size_name : 'N/A' }} Order: {{ $ptc->job_no ?? 'Default PTC' }} Current Stage: {{ $ptc->current_stage_name ?? 'N/A' }} Issuance Date * Issue For Stage * @foreach($stages as $stage) current_stage_id == $stage->head_id ? 'selected' : '' }}>{{ $stage->name }} @endforeach Issue To (Employee / Contractor) * Select Employee / Contractor @if($employees->count()) @foreach($employees as $item) {{ $item->employee_no }} - {{ $item->name }} @endforeach @endif @if($vendors->count()) @foreach($vendors as $item) {{ $item->vendor_no }} - {{ $item->fname }} @endforeach @endif Issue Items {{-- Material Issue Section --}} Materials Select Material @foreach($materials as $material) {{ $material->name }} | {{ $material->unit }} @endforeach Available Stock Quantity Add Add {{-- Material Quantity Tracking --}} Required  |  Issued  |  To Issue (Complete Order) Required  |  Issued  |  To Issue (Selected Article) Required  |  Issued  |  To Issue (Selected Article Size) {{-- Product Components Section (always visible) --}} Product Components (Other products used in manufacturing) Select Product Component @if(isset($productComponents) && count($productComponents) > 0) @foreach($productComponents as $component) {{ $component['article_no'] }} - {{ $component['product_name'] }} ({{ $component['size_name'] }}) - Req: {{ $component['quantity'] }} @endforeach @endif Available Stock Quantity Add Add {{-- Product Issue Section --}} Product Stage Select Stage @foreach($stages as $stage) {{ $stage->name }} @endforeach Available Stock Quantity Add Add {{-- Issue Items Table --}} Sr. Item / Product Material / Stage Quantity Action @if($issuances->count() > 0) Previous Issuances Reference Stage Date Issued To @foreach($issuances as $idx => $issuance) PTC-{{ $ptc->stock_no }} / I{{ str_pad($idx + 1, 3, '0', STR_PAD_LEFT) }} {{ $issuance->stage_name ?? 'N/A' }} {{ \carbon\Carbon::parse($issuance->stock_date)->format('d-m-Y') }} {{ $issuance->employee_name ?? $issuance->vendor_name ?? '-' }} @endforeach @endif Notes {{ old('description') }} Create Issuance @endsection