@php $companyName = $company->company_name; /* |-------------------------------------------------------------------------- | Identitas Penjual |-------------------------------------------------------------------------- | | Silakan ubah nilai default berikut sesuai data perusahaan. | */ $sellerName = $companyName; $sellerNpwp = $company->tax_number; $sellerAddress = $company->address; $sellerCity = $company->city; $sellerPhone = $company->phone; $sellerEmail = $company->email; $member = $invoice->member; $buyerName = $invoice->buyer_name ?: ($member->member_name ?? '-'); $buyerNpwp = $invoice->buyer_npwp ?: ($member->npwp ?? '-'); $buyerNik = $invoice->buyer_nik ?: ($member->ic_no ?? '-'); $buyerAddress = $invoice->buyer_address ?: ($member->address ?? '-'); $buyerCity = $invoice->buyer_city ?: ($member->city ?? '-'); $buyerProvince = $invoice->buyer_province ?: ($member->province ?? '-'); $buyerPostalCode = $invoice->buyer_postal_code ?: ($member->postal_code ?? '-'); $buyerEmail = $invoice->buyer_email ?: ($member->email ?? '-'); $invoiceDate = $invoice->invoice_date ? $invoice->invoice_date->format('d/m/Y') : '-'; $statusLabel = match ($invoice->status) { 'issued' => 'ISSUED', 'cancelled' => 'CANCELLED', default => 'DRAFT', }; $dpp = (float) $invoice->dpp_amount; $dppNilaiLain = (float) $invoice->dpp_nilai_lain; $ppn = (float) $invoice->ppn_amount; $ppnbm = (float) $invoice->ppnbm_amount; $total = (float) $invoice->total_amount; $grandDpp = $invoice->dpp_type === 'nilai_lain' ? $dppNilaiLain : $dpp; $terbilang = function ($number) { $number = (int) round($number); if ($number === 0) { return 'Nol'; } $words = [ '', 'Satu', 'Dua', 'Tiga', 'Empat', 'Lima', 'Enam', 'Tujuh', 'Delapan', 'Sembilan', 'Sepuluh', 'Sebelas' ]; $say = function ($n) use (&$say, $words) { if ($n < 12) { return $words[$n]; } if ($n < 20) { return $say($n - 10) . ' Belas'; } if ($n < 100) { return $say((int) floor($n / 10)) . ' Puluh ' . $say($n % 10); } if ($n < 200) { return 'Seratus ' . $say($n - 100); } if ($n < 1000) { return $say((int) floor($n / 100)) . ' Ratus ' . $say($n % 100); } if ($n < 2000) { return 'Seribu ' . $say($n - 1000); } if ($n < 1000000) { return $say((int) floor($n / 1000)) . ' Ribu ' . $say($n % 1000); } if ($n < 1000000000) { return $say((int) floor($n / 1000000)) . ' Juta ' . $say($n % 1000000); } if ($n < 1000000000000) { return $say((int) floor($n / 1000000000)) . ' Miliar ' . $say($n % 1000000000); } return $say((int) floor($n / 1000000000000)) . ' Triliun ' . $say($n % 1000000000000); }; return trim(preg_replace('/\s+/', ' ', $say($number))); }; @endphp @if($invoice->status === 'cancelled')
CANCELLED
@endif
{{ $sellerName }}
NPWP: {{ $sellerNpwp }}
Alamat: {{ $sellerAddress }}
{{ $sellerCity }}
Telp: {{ $sellerPhone }}    Email: {{ $sellerEmail }}

FAKTUR PAJAK

{{ $statusLabel }}
Informasi Faktur
No. Invoice : {{ $invoice->invoice_no ?: '-' }}
No. Faktur Pajak : {{ $invoice->tax_invoice_no ?: '-' }}
Tanggal : {{ $invoiceDate }}
Kode Transaksi : {{ $invoice->transaction_code }}
Pembeli / Penerima BKP/JKP
Nama : {{ $buyerName }}
NPWP : {{ $buyerNpwp }}
NIK : {{ $buyerNik }}
Email : {{ $buyerEmail }}
Alamat : {{ $buyerAddress }}
{{ $buyerCity }}, {{ $buyerProvince }} {{ $buyerPostalCode }}
@forelse($invoice->details as $index => $detail) @empty @endforelse
No Kode Produk Nama Barang / Jasa Kena Pajak Qty Harga Satuan Jumlah
{{ $index + 1 }} {{ $detail->product_code ?: '-' }} {{ $detail->product_name }} {{ number_format((float) $detail->qty, 4, ',', '.') }} @if($detail->unit) {{ $detail->unit }} @endif Rp {{ number_format((float) $detail->unit_price, 2, ',', '.') }} Rp {{ number_format((float) $detail->line_total, 2, ',', '.') }}
Tidak ada detail transaksi.
@if($invoice->dpp_type === 'nilai_lain') @endif @if($ppnbm > 0) @endif
Total Harga Rp {{ number_format((float) $invoice->gross_amount, 2, ',', '.') }}
Total Diskon Rp {{ number_format((float) $invoice->discount_amount, 2, ',', '.') }}
DPP Rp {{ number_format($dpp, 2, ',', '.') }}
DPP Nilai Lain Rp {{ number_format($dppNilaiLain, 2, ',', '.') }}
PPN ({{ number_format((float) $invoice->ppn_rate, 2, ',', '.') }}%) Rp {{ number_format($ppn, 2, ',', '.') }}
PPnBM ({{ number_format((float) $invoice->ppnbm_rate, 2, ',', '.') }}%) Rp {{ number_format($ppnbm, 2, ',', '.') }}
TOTAL Rp {{ number_format($total, 2, ',', '.') }}
Terbilang
{{ $terbilang($total) }} Rupiah
@if($invoice->notes)
Catatan:
{!! nl2br(e($invoice->notes)) !!}
@endif
Catatan:
Dokumen ini merupakan hasil cetak dari sistem Faktur Pajak Penjualan.
{{ $sellerCity }}, {{ $invoiceDate }}
{{ $sellerName }}