@extends('adminlte::page') @section('title', 'Pembayaran Kelas Saya') @section('content_header')

Pembayaran Kelas Saya

Pantau dan kelola pembayaran siswa di kelas Anda.

@stop @section('content')
{{-- STATISTIK RINGKAS KELAS --}}

{{ $siswas->count() }}

Total Siswa

@php $totalLunas = $siswas->filter(function($s) { return $s->tagihans->sum('sisa_tagihan') <= 0; })->count(); @endphp

{{ $totalLunas }}

Siswa Lunas

@php $totalNunggak = $siswas->count() - $totalLunas; @endphp

{{ $totalNunggak }}

Belum Lunas

{{-- TABEL DAFTAR SISWA --}}
Daftar Tagihan Siswa
@foreach($siswas as $siswa) @php $totalHutang = $siswa->tagihans->sum('sisa_tagihan'); @endphp @endforeach
Nama Siswa NIS Total Tunggakan Status Aksi
{{ substr($siswa->nama_lengkap, 0, 1) }}
{{ $siswa->nama_lengkap }}
{{ $siswa->nis }} @if($totalHutang > 0) Rp {{ number_format($totalHutang, 0, ',', '.') }} @else Lunas @endif @if($totalHutang > 0) Belum Lunas @else Aman @endif Bayar
@stop @section('css') @stop @section('js') @stop