{{-- HEADER --}}
{{ $store['name'] }}
@if($store['address']){{ $store['address'] }}
@endif @if($store['phone'])Telp. {{ $store['phone'] }}@endif @if($store['email']) | {{ $store['email'] }}@endif
Purchase Order
{{ $po->po_number }}
{{ $po->order_date?->translatedFormat('d F Y') ?? now()->translatedFormat('d F Y') }}
{{-- INFO SECTION --}}
Kepada Supplier
{{ $po->supplier?->name ?? '-' }}
@if($po->supplier?->address){{ $po->supplier->address }}
@endif @if($po->supplier?->phone)Telp. {{ $po->supplier->phone }}@endif
Detail Pemesanan
Jatuh Tempo{{ $po->due_date?->translatedFormat('d F Y') ?? '-' }}
Metode Bayar{{ match($po->payment_method ?? 'transfer') { 'cash' => 'Tunai', 'transfer' => 'Transfer Bank', 'qris' => 'QRIS', default => '-' } }}
{{-- ITEMS TABLE --}} @foreach($po->items as $idx => $item) @endforeach
No Deskripsi Barang SKU Qty Satuan Harga Disc Jumlah
{{ $idx + 1 }} {{ $item->product?->name ?? '-' }} {{ $item->product?->sku ?? '-' }} {{ number_format((float) $item->quantity_ordered, 0, ',', '.') }} {{ $item->product?->unit ?? 'Pcs' }} Rp {{ number_format((float) $item->unit_cost, 0, ',', '.') }} {{ (float) $item->discount > 0 ? number_format((float) $item->discount, 0) . '%' : '-' }} Rp {{ number_format((float) $item->subtotal, 0, ',', '.') }}
{{-- NOTES --}} @if($po->notes)
Catatan
{{ $po->notes }}
@endif {{-- SUMMARY --}}
@if((float) $po->amount_paid > 0) @endif
Subtotal Rp {{ number_format((float) $po->items->sum('subtotal'), 0, ',', '.') }}
Diskon ({{ number_format((float) $po->discount, 0) }}%) - Rp {{ number_format((float) $po->items->sum('subtotal') * ((float) $po->discount / 100), 0, ',', '.') }}
Pajak ({{ $po->tax_enabled ? number_format((float) $po->tax_rate, 1) . '%' : '0%' }}) Rp {{ number_format((float) $po->tax, 0, ',', '.') }}
Total Rp {{ number_format((float) $po->total_amount, 0, ',', '.') }}
Terbayar Rp {{ number_format((float) $po->amount_paid, 0, ',', '.') }}
Sisa Rp {{ number_format((float) $po->balance_due, 0, ',', '.') }}
{{-- SIGNATURES --}}
Dibuat Oleh
{{ $po->user?->name ?? '' }}
Supplier
{{ $po->supplier?->name ?? '' }}
{{-- FOOTER --}}