@extends('layouts.app') @section('title', 'Invoices - ' . $customer->name) @section('content')
Total Invoice
{{ $invoices->total() }}
Lunas
{{ $customer->invoices()->where('status', 'paid')->count() }}
Belum Bayar
{{ $customer->invoices()->where('status', 'unpaid')->count() }}
Total Tunggakan
Rp {{ number_format($customer->invoices()->where('status', 'unpaid')->sum('amount'), 0, ',', '.') }}
| No. Invoice | Periode | Paket | Jumlah | Jatuh Tempo | Status | Aksi |
|---|---|---|---|---|---|---|
| {{ $invoice->invoice_number }} | {{ $invoice->period_start ? $invoice->period_start->format('d M') : '' }} - {{ $invoice->period_end ? $invoice->period_end->format('d M Y') : '' }} | {{ $invoice->package->name ?? '-' }} | Rp {{ number_format($invoice->amount, 0, ',', '.') }} | {{ $invoice->due_date ? $invoice->due_date->format('d M Y') : '-' }} | @if($invoice->status == 'paid') Lunas @elseif($invoice->status == 'unpaid') Belum Bayar @else {{ ucfirst($invoice->status) }} @endif | |
|
Belum ada invoice |
||||||