{{-- ── Header ── --}}
logo
{{ config('app.company_name', 'MAHKOTA AGRO') }}
{{ config('app.company_address', 'Jl. Magetan Jawa Tengah 68175') }}
{{ config('app.company_phone', 'Telp (0331) 323216 Fax (0331) 323603') }}
{{ config('app.company_region', 'Jawa Timur - Indonesia') }}

{{-- ── Doc number + Title ── --}}
{{ $order->doc_number ?? 'CM-1-MHK-01' }} Rev. {{ $order->doc_revision ?? '01' }}
FAKTUR PENJUALAN
{{-- ── Info Fields ── --}}
No. Faktur : {{ $order->trx_code }} Pembayaran : {{ $order->payment_type ?? '-' }}
Tanggal Faktur : {{ \Carbon\Carbon::parse($order->order_date)->format('Y-m-d') }} Customer : {{ $order->customers->customer_name ?? $order->customer_code }} Jangka Waktu : {{ $order->payment_term ?? '-' }} hari
No. Surat Jalan : {{ $order->delivery_number ?? '-' }} No. Telp : {{ $order->customers->phone ?? '-' }} Jatuh Tempo : {{ $order->due_date ?? '-' }}
Purchase Order : {{ $order->po_number ?? '-' }} Alamat : {{ $order->customers->address ?? '-' }}
{{-- ── Product Table ── --}} @php $tPenjualan = $getTotal->tpenjualan ?? 0; $tDiskon = $getTotal->tdiskon ?? 0; $tBayar = $getTotal->tbayar ?? 0; $subtotal = $tPenjualan - $tDiskon; $sisa = $subtotal - $tBayar; @endphp @foreach($order->details as $i => $rows) @endforeach {{-- Row 1: Keterangan | Bagian Keuangan | Total Penjualan --}} {{-- Row 2: Keterangan (rowspan 4) | QR (rowspan 3) | Diskon --}} {{-- Row 3: Subtotal --}} {{-- Row 4: Pembayaran --}} {{-- Row 5: signature name | Sisa --}} {{-- Row 6: Terbilang --}}
No Varietas Qty Harga Diskon Jumlah
{{ $i + 1 }} {{ $rows->products->product_name ?? $rows->product_code }} {{ $rows->qty }} {{ number_format($rows->harga ?? $rows->price, 0, ',', '.') }} {{ number_format($rows->diskon ?? $rows->discount ?? 0, 0, ',', '.') }} {{ number_format($rows->total ?? ($rows->qty * ($rows->harga ?? $rows->price)), 0, ',', '.') }}
Keterangan Bagian Keuangan Total Penjualan {{ number_format($tPenjualan, 0, ',', '.') }}
{{ $order->note ?? $order->keterangan ?? '' }} @if(!empty($order->signature)) @php $qrUrl = 'https://chart.googleapis.com/chart?chs=100x100&cht=qr&chl=' . urlencode($order->signature) . '&chld=L|1&choe=UTF-8'; @endphp QR @endif Diskon {{ number_format($tDiskon, 0, ',', '.') }}
Subtotal {{ number_format($subtotal, 0, ',', '.') }}
Pembayaran {{ number_format($tBayar, 0, ',', '.') }}
{{ $order->signature_name ?? '' }} Sisa {{ number_format($sisa, 0, ',', '.') }}
{{ Modules\PurchaseOrder\Helpers\TerbilangHelper::convert((int) $sisa) }} rupiah
{{-- ── Pembayaran Detail (if exists) ── --}} @if(isset($payments) && count($payments) > 0)
PEMBAYARAN DETAIL @php $tBayarDetail = 0; @endphp @foreach($payments as $rbayar) @php $tBayarDetail += $rbayar->bayar; @endphp @endforeach
Tanggal Keterangan Bayar
{{ $rbayar->tanggal }} {{ $rbayar->keterangan }} {{ number_format($rbayar->bayar, 0, ',', '.') }}
Total {{ number_format($tBayarDetail, 0, ',', '.') }}
{{ Modules\PurchaseOrder\Helpers\TerbilangHelper::convert((int) $tBayarDetail) }} rupiah
@endif {{-- Download timestamp --}}
Tanggal Download : {{ \Carbon\Carbon::now()->format('Y-m-d H:i:s') }}