@php $fontFamily = "'Inter', 'Helvetica', 'Arial', sans-serif"; @endphp

{{ $store['name'] }}

@if ($store['address'])
{{ $store['address'] }}
@endif
{{ $store['phone'] ? 'Telp: ' . $store['phone'] . ' • ' : '' }}{{ $store['email'] }}
INVOICE
{{ $transaction->invoice }}
{{ \Carbon\Carbon::parse($transaction->created_at)->format('d M Y H:i') }}
Pelanggan
{{ $transaction->customer->name ?? 'Umum' }}
@if ($transaction->customer?->no_telp)
{{ $transaction->customer->no_telp }}
@endif @if ($transaction->customer)
{{ $transaction->customer->village_name ?? '' }} @if ($transaction->customer->regency_name) , {{ $transaction->customer->regency_name }} @endif @if ($transaction->customer->province_name) , {{ $transaction->customer->province_name }} @endif
@endif
Kasir
{{ $transaction->cashier->name ?? '-' }}
Status: {{ $transaction->payment_status }}
Metode: {{ $transaction->payment_method }}
@if ($transaction->receivable && $transaction->receivable->due_date)
Jatuh tempo: {{ $transaction->receivable->due_date }}
@endif
@foreach ($transaction->details as $index => $detail) @endforeach
Nama Produk Qty Harga Subtotal
{{ $detail->product->title ?? 'Produk' }} @if ($detail->discount_total > 0 && ($detail->pricing_group_label || $detail->pricing_rule_name))
Promo: {{ $detail->pricing_group_label ?: $detail->pricing_rule_name }}
@endif
{{ $detail->qty }} @if ($detail->discount_total > 0 && $detail->base_unit_price > $detail->unit_price)
{{ number_format($detail->base_unit_price, 0, ',', '.') }}
@endif {{ number_format($detail->unit_price ?: ($detail->price / max(1, $detail->qty)), 0, ',', '.') }}
{{ number_format($detail->price, 0, ',', '.') }}
@php $promoDiscount = $transaction->details->sum('discount_total'); $discount = $transaction->discount ?? 0; $voucherDiscount = $transaction->customer_voucher_discount ?? 0; $loyaltyDiscount = $transaction->loyalty_discount_total ?? 0; $shipping = $transaction->shipping_cost ?? 0; $grandTotal = $transaction->grand_total ?? 0; $subtotal = $grandTotal + $discount - $shipping + $promoDiscount + $voucherDiscount + $loyaltyDiscount; @endphp
@if ($voucherDiscount > 0) @endif @if ($loyaltyDiscount > 0) @endif @if (($transaction->tax_total ?? 0) > 0) @endif
Subtotal {{ number_format($subtotal, 0, ',', '.') }}
Promo Otomatis - {{ number_format($promoDiscount, 0, ',', '.') }}
Diskon Manual - {{ number_format($discount, 0, ',', '.') }}
Voucher Customer - {{ number_format($voucherDiscount, 0, ',', '.') }}
Redeem Poin - {{ number_format($loyaltyDiscount, 0, ',', '.') }}
Ongkir + {{ number_format($shipping, 0, ',', '.') }}
PPN {{ number_format($transaction->tax_rate ?? 11, 0) }}% + {{ number_format($transaction->tax_total, 0, ',', '.') }}
Total {{ number_format($grandTotal, 0, ',', '.') }}