@extends('layout.app')
@section('title', 'Data Tagihan - Sistem Manajemen ISP')
@section('content')
@php
use App\Models\Tagihan;
$totalTagihan = Tagihan::count();
$tagihanLunas = Tagihan::where('status_tagihan', 'Lunas')->count();
$tagihanBelumBayar = Tagihan::where('status_tagihan', 'Belum Bayar')->count();
$tagihanJatuhTempo = Tagihan::where('status_tagihan', 'Jatuh Tempo')->count();
$totalNominal = Tagihan::sum('total_tagihan');
$lunasNominal = Tagihan::where('status_tagihan', 'Lunas')->sum('total_tagihan');
@endphp
| No | No. Invoice | Pelanggan | Tanggal Tagihan | Jatuh Tempo | Total | Status | Aksi | |
|---|---|---|---|---|---|---|---|---|
| @if(in_array($t->status_tagihan, ['Belum Bayar', 'Jatuh Tempo'])) @endif |
{{ $tagihan->firstItem() + $index }} |
{{ $t->nomor_invoice }}@if(optional($t->pelanggan)->area){{ optional(optional($t->pelanggan)->area)->kecamatan ?? '' }} @endif |
{{ optional($t->pelanggan)->nama ?? 'Pelanggan tidak tersedia' }} {{ optional($t->pelanggan)->nomor_telepon ?? '-' }} |
{{ $t->tanggal_tagihan->format('d/m/Y') }} |
{{ $t->tanggal_jatuh_tempo->format('d/m/Y') }}
@if($t->is_overdue ?? false)
error Terlambat @endif |
Rp {{ number_format($t->total_tagihan, 0, ',', '.') }}
@if($t->denda > 0)
Denda: Rp {{ number_format($t->denda, 0, ',', '.') }} @endif |
@if($t->status_tagihan == 'Lunas') check_circle Lunas @elseif($t->status_tagihan == 'Jatuh Tempo') error Jatuh Tempo @else schedule Belum Bayar @endif | |
receipt
Belum ada tagihanMulai dengan membuat tagihan pertama add Tambah Tagihan Pertama |
||||||||