@extends('template.content') @section('title', 'Penagihan Voucher') @push('script') @endpush @section('content')

@yield('title')

Rp. {{ number_format($total_iuran, 0, ',', '.') }}

@if (auth()->user()->level == 'admin')
@elseif (auth()->user()->level == 'koordinator')
@endif
@if (auth()->user()->level == 'admin') @endif @if ($pelanggans->count() > 0) @foreach($pelanggans as $key => $pel) @php $bulan = request()->filled('bulan') ? request()->bulan : date('m'); $tahun = request()->filled('tahun') ? request()->tahun : date('Y'); $tanggal_jatuhtempo = "$tahun-$bulan-01"; $voucher = $pel->voucher_penagihan->first(); @endphp @if (auth()->user()->level == 'admin') @endif @endforeach @else @endif
Aksi Nama Wilayah Tgl Jatuhtempo Nominal Tagihan Nominal Bayar Status Bayar MetodeDiinputTgl Bayar
@php $isPaid = $voucher && $voucher->status_bayar != 'pending' && $voucher->nominal_bayar != 0; $canPay = !($voucher && $voucher->status_bayar != null && $voucher->status_bayar != 'pending' && $voucher->nominal_bayar != 0); @endphp @if (auth()->user()->level == 'admin' && $isPaid)
@csrf
@endif
@csrf
@if ($canPay && $voucher) @endif @if ($isPaid) @endif
{{ $pel->nama_pelanggan }} {{ @$pel->wilayah->nama_wilayah }} {{ \Carbon\Carbon::parse($tanggal_jatuhtempo)->translatedFormat('d F Y') }} {{ number_format($voucher->nominal_tagihan ?? 0, 0, ",", ".") }} {{ number_format($voucher->nominal_bayar ?? 0, 0, ",", ".") }} {{ $voucher ? ucfirst($voucher->status_bayar) : 'Belum Bayar' }} {{ $voucher->metode_pembayaran ?? '-' }}{{ $voucher->user->name ?? '-' }}{{ $voucher->created_at ?? '-' }}
Tidak ada data
{{ $pelanggans->appends(request()->only(['cari', 'bulan', 'tahun', 'user', 'wilayah', 'status_bayar']))->links('pagination::bootstrap-4') }}
@endsection