@extends('layouts.app') @section('page-title', 'Total Rent') @section('content')
| Gym Name | City | Monthly Rent | Last Payment | Next Payment Due | Total Paid | Action |
|---|---|---|---|---|---|---|
| {{ $gym->name }} | {{ $gym->city ?? 'N/A' }} | Rs {{ number_format($gym->rent_amount, 2) }} | @if($gym->rentPayments->where('status', 'paid')->count() > 0) {{ $gym->rentPayments->where('status', 'paid')->sortByDesc('payment_date')->first()->payment_date->format('M d, Y') }} @else No payment yet @endif | @if($gym->rentPayments->where('status', 'paid')->count() > 0) {{ $gym->rentPayments->where('status', 'paid')->sortByDesc('payment_date')->first()->next_payment_due_date?->format('M d, Y') ?? 'N/A' }} @else Due Now @endif | Rs {{ number_format($gym->rentPayments->where('status', 'paid')->sum('amount'), 2) }} | Mark Paid |
| No rent gyms found. | ||||||