@extends('layouts.app') @section('content') @php $currentUser = auth()->user(); $canUploadPaymentProof = $currentUser && $currentUser->hasRole('user') && (int) $currentUser->resident_id === (int) $resident->id; $bankName = \App\Models\SiteSetting::getValue('payment_bank_name', config('services.payment.bank_name', 'BCA')); $bankAccount = \App\Models\SiteSetting::getValue('payment_bank_account', config('services.payment.bank_account', '0000000000')); $bankHolder = \App\Models\SiteSetting::getValue('payment_bank_holder', config('services.payment.bank_holder', 'Cluster Permata')); @endphp
Detail Iuran Warga

{{ $resident->name }}

{{ $resident->address }} @if($resident->phone) {{ $resident->phone }} @endif

@auth @if(auth()->user()->hasRole('administrator', 'admin', 'bendahara'))
@csrf
@csrf
@endif @endauth
@php $totalAmount = $resident->dues->sum('amount'); $totalFine = $resident->dues->sum('ronda_fine'); $totalJimpitan = $resident->dues->sum('jimpitan_amount'); $totalPaid = $resident->dues->sum('paid_amount'); $totalRemaining = $resident->dues->sum(fn($d) => $d->remaining()); @endphp
@foreach([ ['Total Iuran', $totalAmount, 'fa-money-bill-wave', 'bg-teal-50 text-teal-700'], ['Denda Ronda', $totalFine, 'fa-shield-halved', 'bg-amber-50 text-amber-700'], ['Jimpitan', $totalJimpitan, 'fa-hand-holding-heart', 'bg-emerald-50 text-emerald-700'], ['Dibayar', $totalPaid, 'fa-circle-check', 'bg-blue-50 text-blue-700'], ['Sisa', $totalRemaining, 'fa-wallet', $totalRemaining > 0 ? 'bg-rose-50 text-rose-700' : 'bg-emerald-50 text-emerald-700'], ] as $s)

{{ $s[0] }}

Rp {{ number_format($s[1], 0, ',', '.') }}

@endforeach
@if($canUploadPaymentProof && $totalRemaining > 0)

Pembayaran via Transfer Bank {{ $bankName }}

Transfer sesuai nominal tagihan, lalu unggah bukti transfer pada periode iuran yang ingin dibayar.

Bank {{ $bankName }}

{{ $bankAccount }}

a.n. {{ $bankHolder }}

@endif

Riwayat Iuran

Rincian periode iuran, denda ronda, jimpitan, pembayaran, sisa tagihan, status, dan bukti pembayaran.

@forelse($resident->dues as $d) @php($remaining = $d->remaining()) @empty @endforelse
Periode Iuran Denda Jimpitan Dibayar Sisa Status Bukti / Bayar
{{ $d->period }} Rp {{ number_format($d->amount, 0, ',', '.') }} Rp {{ number_format($d->ronda_fine, 0, ',', '.') }} Rp {{ number_format($d->jimpitan_amount, 0, ',', '.') }} Rp {{ number_format($d->paid_amount, 0, ',', '.') }} Rp {{ number_format($remaining, 0, ',', '.') }} @if($d->status === 'paid' || $d->status === 'lunas') @elseif($d->status === 'partial' || $d->status === 'sebagian') @else @endif {{ $d->status }} @if($d->payment_verification_status && $d->payment_verification_status !== 'none')

Verifikasi: {{ str_replace('_', ' ', $d->payment_verification_status) }}

@endif
@if($d->payment_proof_path) Lihat Bukti @if($d->payment_proof_uploaded_at)

Dikirim {{ $d->payment_proof_uploaded_at->format('d/m/Y H:i') }}

@endif @else Belum ada bukti. @endif @if($d->paid_amount > 0) Download Kwitansi PDF @endif @if($canUploadPaymentProof && $remaining > 0)
@csrf
@endif

Belum ada data iuran

Riwayat iuran warga ini belum tersedia.

@if(isset($transactions))
Buka Riwayat Transaksi Warga

Transaksi pemasukan yang tercatat untuk warga ini, termasuk metode pembayaran, nomor kwitansi, dan bukti pembayaran.

Detail Riwayat Iuran dan Transaksi

Transaksi pemasukan yang tercatat untuk warga ini, termasuk metode pembayaran, nomor kwitansi, dan bukti pembayaran.

@forelse($transactions as $t) @php($proofPath = is_array($t->meta) ? ($t->meta['payment_proof_path'] ?? null) : null) @empty @endforelse
Tanggal Kategori Metode Kwitansi Download Bukti Keterangan Jumlah
{{ optional($t->transaction_date)->format('d/m/Y') }} {{ $t->category }} {{ strtoupper($t->payment_method ?: '-') }} {{ $t->receipt_number ?: '-' }} @if($t->receipt_number)PDF@else - @endif @if($proofPath) Lihat bukti @else - @endif {{ $t->description }} Rp {{ number_format($t->amount, 0, ',', '.') }}
Belum ada transaksi.
@endif
Kembali ke Laporan Keuangan dan Iuran Warga
@endsection