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

PTC Receiving

@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' }}
@if($issuance ?? false)
Receiving against Issuance: PTC-{{ $ptc->stock_no }} / I{{ $issuanceSeqNo ?? str_pad($issuance->stock_no, 3, '0', STR_PAD_LEFT) }} | {{ $issuance->employee_name ?? $issuance->vendor_name ?? '-' }}
@endif
@if($issuance ?? false) @else @endif

Receive Items
{{-- Material Receive Section --}}

{{-- Product Receive Section --}}

{{-- Component Product Type Receive Section --}} @if(isset($issuedComponents) && $issuedComponents->count())

@endif {{-- Receive Items Table with Tabs --}}
{{-- Receive Items Table --}}
Sr. Item / Product Material / Stage Work/Cost Quantity Action
{{-- Issued Items Tab --}}
@if($issueItem->count()) @foreach($issueItem as $item) @if($item->component_product_type_id) @elseif($item->material_id > 0) @else @endif @endforeach @endif
Sr. Type Item / Product Material / Stage / Component Quantity Average
{{$loop->index + 1}}Component {{$item->article_no}} - Size {{$item->sname}} {{$item->component_article_no}} - {{$item->component_name}} ({{$item->component_size}})Material {{$item->article_no}} - Size {{$item->sname}} {{$item->name}}Product {{$item->article_no}} - Size {{$item->sname}} {{$item->stage}}{{$item->quantity}} {{($item->uname)? $item->uname:$item->puname}} {{ $item->pqty != 0 ? bcdiv($item->quantity, $item->pqty, 1) : '0' }} Units
{{-- Received Items Tab --}}
@if($issueSum->count()) @foreach($issueSum as $item) @if($item->component_product_type_id) @elseif($item->material_id > 0) @else @endif @endforeach @endif
Sr. Type Article No Material / Stage / Component Quantity
{{$loop->index + 1}}Component {{$item->article_no}} - Size {{$item->sname}} {{$item->component_article_no}} - {{$item->component_name}} ({{$item->component_size}})Material {{$item->article_no}} - Size {{$item->sname}} {{$item->name}}Product {{$item->article_no}} - Size {{$item->sname}} {{$item->stage}}{{$item->total_quantity}} {{($item->uname)? $item->uname:$item->puname}}

@if($receivings->count() > 0)
Previous Receivings
@foreach($receivings as $receiving) @endforeach
Reference Stage Date Received From
PTC-{{ $ptc->stock_no }} / {{ $receiving->stock_no }} {{ $receiving->stage_name ?? 'N/A' }} {{ $receiving->stock_date }} {{ $receiving->employee_name ?? $receiving->vendor_name ?? '-' }}

@endif
@endsection