<%- include('partials/sidebar', { activePage: 'billing', company }) %>
<%= t('admin.invoice.print_title', 'Cetak Invoice') %> #INV-<%= String(invoice.id).padStart(4, '0') %>
<%= t('common.back', 'Kembali') %>
<% const mns = (lang || 'id') === 'en' ? ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'] : ['Jan','Feb','Mar','Apr','Mei','Jun','Jul','Agt','Sep','Okt','Nov','Des']; const isPaid = invoice.status === 'paid'; const companyInitial = (company || 'A').charAt(0).toUpperCase(); const customerInitial = (customer.name || 'P').charAt(0).toUpperCase(); const invNo = 'INV-' + String(invoice.id).padStart(4, '0') + '-' + getCurrentTimeInfo().year; const periodStr = mns[invoice.period_month - 1] + ' ' + invoice.period_year; %>
<%= company %>
<%= settings.company_address || 'Pusat Layanan Internet Terpercaya' %>
<% if (settings.whatsapp_admin_numbers && settings.whatsapp_admin_numbers.length > 0) { %>
Telp/WA: +<%= settings.whatsapp_admin_numbers[0] %>
<% } %>
INVOICE
# <%= invNo %>
<% if (isPaid) { %> <% } else { %> BELUM BAYAR <% } %>
Ditagihkan Kepada
<%= customer.name %>
<% if (customer.customer_code) { %>
ID Pelanggan: <%= customer.customer_code %>
<% } %>
<% if (customer.phone) { %>
<%= customer.phone %>
<% } %> <% if (customer.pppoe_username) { %>
PPPoE: <%= customer.pppoe_username %>
<% } %> <% if (customer.address) { %>
<%= customer.address %>
<% } %>
Informasi Transaksi
<%= t('common.date','Tanggal') %> <%= isPaid ? 'Pembayaran' : 'Tagihan' %> <%= isPaid && invoice.paid_at ? formatDateLocal(invoice.paid_at) : getNowLocal() %>
Periode Tagihan <%= periodStr %>
Kasir / Penerima <%= invoice.paid_by_name || 'Sistem' %>
Metode Pembayaran <%= invoice.payment_gateway ? invoice.payment_gateway.toUpperCase() : 'Tunai / Transfer' %>
<% if (isPaid) { %> <% } else { %>
TAGIHAN
<% } %>
# Deskripsi Layanan <%= t('pwa.field.period','Periode') %> <%= t('common.amount_qty','Jumlah') %>
01
Layanan Internet — <%= customer.package_name || 'Paket Internet Broadband' %>
Langganan bulanan internet high-speed
<%= periodStr %> Rp <%= Number(invoice.amount || 0).toLocaleString('id-ID') %>
Catatan Pembayaran:
<%= invoice.notes || 'Terima kasih telah berlangganan layanan internet kami. Simpan struk ini sebagai bukti pembayaran yang sah.' %>
<% if (invoice.payment_order_id) { %>
Referensi Transaksi: <%= invoice.payment_order_id %>
<% } %>
Subtotal Rp <%= Number(invoice.amount_before_discount || invoice.amount || 0).toLocaleString('id-ID') %>
Diskon / Potongan<% if (Number(invoice.discount_amount||0) > 0 && invoice.discount_type==='percent') { %> (<%= invoice.discount_value %>%)<% } %> <%= Number(invoice.discount_amount||0) > 0 ? ('- Rp ' + Number(invoice.discount_amount).toLocaleString('id-ID')) : 'Rp 0' %>
Total Bayar Rp <%= Number(invoice.amount || 0).toLocaleString('id-ID') %>