@extends('layout') @section('content')
Bayar Iuran
Data Bayar Iuran {{ date("F") . ' ' . date("Y") }}

@csrf
@if (session()->get('error'))

{{ session()->get('error') }}

@endif @if (session()->get('success'))

{{ session()->get('success') }}

@endif
@php $total = 0; @endphp @foreach ($anggota as $row) @php $bayar = App\Models\BayarModel::where('anggota_id', $row->id)->where('bulan',$bulanIndo)->where('tahun',date("Y"))->first(); @endphp @if ($bayar) @else @endif @php $total += $bayar->jumlah ?? 0; @endphp @endforeach
No Nama Kecamatan/Kelurahan RT/RW Tanggal Bayar Jumlah Bayar Action
{{ $loop->iteration }} {{ $row->nama }} {{ $row->kecamatan . '/' . $row->kelurahan }} {{ $row->rt . '/' . $row->rw }}{{ date('d F Y', strtotime($bayar->tgl)) }} Rp. {{ number_format($bayar->jumlah) }}Belum Bayar Belum Bayar @if ($bayar) @else @endif
Jumlah Rp. {{ number_format($total) }}
@endsection