{{-- Header details --}}
GATE PASS — POSM STOCK MOVEMENT
Printed: {{ now('Asia/Colombo')->format('d.m.Y H:i') }}  |  GP-{{ $job->job_no }}
{{-- Meta details table --}}
Document No (Gate Pass) GP-{{ $job->job_no }} Depletion Job No {{ $job->job_no }} Posting Date {{ now()->format('d.m.Y') }} Doc Date {{ $job->created_at->format('d.m.Y') }} Movement Type 201 — POSM Depletion Prepared By {{ $job->user->name ?? 'System' }}
{{-- Items table header bar --}}
ITEM DETAILS   ({{ count($shipments) }} Items)
{{-- Items table itself --}} @php $totalQty = 0; $itemNo = 0; @endphp @php $totalQty = 0; $itemNo = 0; @endphp @foreach($shipments as $shipment) @foreach($shipment->items as $item) @php $itemNo++; $totalQty += $item->planned_quantity; $productCode = $item->product->code ?? ('POSM-' . str_pad($item->product_id, 6, '0', STR_PAD_LEFT)); $productName = $item->product->name ?? 'Product ' . $item->product_id; $whCode = $shipment->distributionPoint->code ?? 'DC-' . ($shipment->distribution_point_id ?? '?'); $stlcc = 'BR-' . str_pad($shipment->distribution_point_id ?? 0, 3, '0', STR_PAD_LEFT); $glAcc = $item->product->gl_account ?? '41000013'; $wbs = $item->product->wbs_element ?? 'LBE.BR.SV.' . now()->format('y') . '.01.02'; @endphp @endforeach @endforeach
PSTNG DATE DOC DATE HEADER TXT ITEM NO MATERIAL / PRODUCT PLANT / WH STLCC BATCH MOVE TYPE ENTRY QTY COST CENTER GL ACC WBS ELEM
{{ now()->format('d.m.Y') }} {{ $job->created_at->format('d.m.Y') }} {{ $job->job_no }} {{ str_pad($itemNo, 3, '0', STR_PAD_LEFT) }} {{ $productCode }}
{{ $productName }}
{{ $whCode }} {{ $stlcc }} {{ $shipment->shipment_number }} 201 {{ number_format($item->planned_quantity, 0) }} 1100100024 {{ $glAcc }} {{ $wbs }}
TOTAL QUANTITY: {{ number_format($totalQty, 0) }}
{{-- Authorization section --}}
TRANSPORT & AUTHORIZATION DETAILS
Vehicle Reg. No
Driver Name
NIC / License
Dispatch Date & Time
Received Date & Time
{{-- Signature section --}}
Prepared By
Name & Signature
Approved By (Mgr)
Name & Signature
Logistics Officer
Name & Signature
Gate / Security
Name & Signature
Receiver (DC)
Name & Signature