PNA Logo PNA Technologies Sdn.Bhd. (626024-p)
Lot 4637, PT 3035, KAWASAN PERUSAHAAN KG GAJAH SIMPANG EMPAT, 36800 KAMPUNG GAJAH, PERAK DARUL RIDZUAN.

PURCHASE ORDER

{{ $purchase_order->supplier->name }}
{{ $purchase_order->supplier->address ?? '- ' }}
Tel: {{ $purchase_order->supplier->phone_no }}
Fax: {{ $purchase_order->supplier->fax }}
Attn: {{ $purchase_order->supplier->contact_person_name }}
@php // Estimate how many characters fit per line in 270px width, e.g. ~45 chars $address = $purchase_order->supplier->address ?? ''; $charPerLine = 45; $lineHeight = 10; // line height in px $baseMargin = 110; // Estimate the number of lines $addressLines = ceil(strlen($address) / $charPerLine); // Extra lines above 3 $extraLines = max(0, $addressLines - 2); // Adjust margin top $dynamicMarginTop = $baseMargin + $extraLines * 10; // Adjust 10 per extra line @endphp supplier->address == null) style="margin-left:600px;margin-top:-100px;" @else style="margin-left:600px; margin-top:-{{ $dynamicMarginTop }}px;" @endif>
Ref No: {{ $purchase_order->ref_no ?? '' }}
Payment Term: {{ $purchase_order->payment_term ?? '' }}
Date: {{ $purchase_order->date ?? '' }}
Delivery Date: {{ $purchase_order->required_date ?? '' }}
@php $blockHeight = 100; // estimated block height in px $pageHeight = 794; // A4 landscape height in px @ 96dpi $usedHeight = 0; @endphp @foreach ($paged_details as $index => $detail_chunk)
Page {{ $index + 1 }} / {{ count($paged_details) }}
@foreach ($detail_chunk as $purchase_order_detail) @php $usedHeight += $blockHeight; @endphp @endforeach
Sr No Part No. Part Name Supplier Product Code UOM Price ({{ $purchase_order->currencies->symbol ?? 'RM' }}) Qty Total
{{ $loop->iteration }} {{ $purchase_order_detail->product->part_no ?? '' }} {{ $purchase_order_detail->product->part_name ?? '' }} {{ $purchase_order_detail->product->supplier_product_code ?? '-' }} {{ $purchase_order_detail->product->units->name ?? '' }} {{ $purchase_order_detail->price }} {{ $purchase_order_detail->qty }} {{ $purchase_order_detail->total }}
@endforeach
Grand Total amount (inword): {{ $purchase_order->total_amount_inword }} Grand Total amount: {{ number_format($purchase_order->net_total, 2) }}
E & O.E
@php if ($usedHeight + $blockHeight > $pageHeight - 5) { echo '
'; $usedHeight = 0; } $usedHeight += $blockHeight; @endphp