@extends('layouts.app') @section('title', 'Tagihan') @section('content')
| No | No. Invoice | Pelanggan | Paket | Periode | Total | Jatuh Tempo | Status | Aksi |
|---|---|---|---|---|---|---|---|---|
| {{ $invoices->firstItem() + $index }} | {{ $invoice->invoice_number }} |
{{ $invoice->customer->name ?? '-' }}
{{ $invoice->customer->customer_code ?? '-' }}
|
{{ $invoice->subscription->package->name ?? '-' }} | @if($invoice->billing_month && $invoice->billing_year) {{ \Carbon\Carbon::create($invoice->billing_year, $invoice->billing_month)->translatedFormat('F Y') }} @else - @endif | Rp {{ number_format($invoice->total_amount, 0, ',', '.') }} | @if($invoice->due_date) {{ \Carbon\Carbon::parse($invoice->due_date)->format('d/m/Y') }} @else - @endif | @php $statusMap = [ 'unpaid' => ['bg-warning text-dark', 'Belum Dibayar'], 'paid' => ['bg-success', 'Lunas'], 'overdue' => ['bg-danger', 'Jatuh Tempo'], 'cancelled' => ['bg-secondary', 'Dibatalkan'], ]; [$badgeClass, $badgeLabel] = $statusMap[$invoice->status] ?? ['bg-secondary', ucfirst($invoice->status)]; @endphp {{ $badgeLabel }} | |
| Belum ada data tagihan. | ||||||||