@extends('index') @section('content')

PTC Issuance

@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' }}


Issue Items
{{-- Material Issue Section --}}

{{-- Material Quantity Tracking --}}
{{-- Product Components Section (always visible) --}}

{{-- Product Issue Section --}}

{{-- Issue Items Table --}}
Sr. Item / Product Material / Stage Quantity Action

@if($issuances->count() > 0)
Previous Issuances
@foreach($issuances as $idx => $issuance) @endforeach
Reference Stage Date Issued To
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 ?? '-' }}

@endif
@endsection