@extends('layouts.admin') @section('title', 'Detail Invoice ' . $invoice->invoice_number) @section('page_title', 'Detail Invoice') @section('admin_content')

{{ $invoice->invoice_number }}

@php $badgeClass = match($invoice->status) { 'paid' => 'bg-emerald-100 text-emerald-800', 'pending_verification' => 'bg-amber-100 text-amber-800', 'sent' => 'bg-blue-100 text-blue-800', 'cancelled' => 'bg-red-100 text-red-800', default => 'bg-gray-100 text-gray-800', }; @endphp {{ $invoice->status_label }}

Tagihan dibuat pada {{ $invoice->issue_date->format('d F Y') }} untuk {{ $invoice->customer_name }}.

@if(session('success'))
{{ session('success') }}
@endif @if(session('error'))
{{ session('error') }}
@endif
Janoer Koening

Digital Wedding Invitation Platform & Custom Agency
janoerkoening.com • Jakarta, Indonesia

INVOICE

{{ $invoice->invoice_number }}
Tanggal: {{ $invoice->issue_date->format('d/m/Y') }}
Jatuh Tempo: {{ $invoice->due_date ? $invoice->due_date->format('d/m/Y') : '-' }}
Ditagihkan Kepada: {{ $invoice->customer_name }} {{ $invoice->customer_email ?: '-' }} {{ $invoice->customer_phone ?: '-' }}
Tautan Undangan & Paket: @if($invoice->invitation) {{ $invoice->invitation->title }} @if($invoice->invitation->subdomain) {{ $invoice->invitation->subdomain }}.{{ config('app.vip_domain', 'janoerkoening.com') }} → @else /u/{{ $invoice->invitation->slug }} @endif @else - Belum Ditautkan ke Undangan - @endif @if($invoice->package)
Paket: {{ $invoice->package->name }}
@endif
@foreach($invoice->items as $idx => $it) @endforeach
No Deskripsi Item Qty Harga Satuan Total
{{ $idx + 1 }} {{ $it->description }} @if($it->product) SKU: {{ $it->product->sku }} @endif {{ rtrim(rtrim(number_format($it->qty, 2, ',', '.'), '0'), ',') }} Rp {{ number_format($it->unit_price, 0, ',', '.') }} Rp {{ number_format($it->line_total, 0, ',', '.') }}
Subtotal: Rp {{ number_format($invoice->subtotal, 0, ',', '.') }}
@if($invoice->discount > 0)
Diskon: - Rp {{ number_format($invoice->discount, 0, ',', '.') }}
@endif @if($invoice->tax_amount > 0)
PPN ({{ $invoice->tax_percent }}%): Rp {{ number_format($invoice->tax_amount, 0, ',', '.') }}
@endif
Total Tagihan: Rp {{ number_format($invoice->total, 0, ',', '.') }}
@if($invoice->notes)
Catatan: {{ $invoice->notes }}
@endif
Aksi Pembayaran

Status & Konfirmasi

@if($invoice->status !== 'paid')
@csrf
@else
INVOICE LUNAS Dibayar via {{ $invoice->payment_method ?? 'Transfer' }} pada {{ $invoice->paid_at ? $invoice->paid_at->format('d M Y, H:i') : '-' }} WIB
@endif @if($invoice->payment_proof)
Bukti Transfer Pengguna: Bukti Transfer
@endif
Distribusi Invoice

Kirim ke Klien

@php $cleanPhone = preg_replace('/[^0-9]/', '', $invoice->customer_phone ?? ''); if (str_starts_with($cleanPhone, '0')) $cleanPhone = '62' . substr($cleanPhone, 1); $waText = "Halo Kak {$invoice->customer_name}, berikut invoice resmi undangan pernikahan Janoer Koening:\n\nNo: {$invoice->invoice_number}\nTotal: Rp " . number_format($invoice->total, 0, ',', '.') . "\n\nSilakan cek detail invoice & pilih metode pembayaran (manual/online) di sini:\n{$invoice->public_url}\n\nTerima kasih!"; @endphp @if($cleanPhone) Kirim via WhatsApp @endif @if($invoice->customer_email)
@csrf
@endif
Tautan Pembayaran Publik:
@endsection