Core Rent
| # | Manager | POP | Title | Start Date | End Date | Status | Rent / Period (৳) | Billed Till Now (৳) | Total Paid (৳) | Due (৳) | Action |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Total | {{ number_format($grandRentPerPeriod, 2) }} | {{ number_format($grandRent, 2) }} | {{ number_format($grandPaid, 2) }} | {{ number_format($grandRemaining, 2) }} | |||||||
| {{ $item->id }} | {{ $item->reseller->name_with_type ?? '—' }} | {{ $item->pop->popname ?? '—' }} |
{{ $item->title }}
@if ($item->location)
{{ $item->location }} @endif Added by: {{ $item->submittedBy->name ?? ($item->createdBy->name ?? '—') }} |
{{ $item->start_date ? $item->start_date->format('d M Y') : '—' }} | {{ $item->end_date ? $item->end_date->format('d M Y') : '—' }} | @include('partials.approval-status', ['item' => $item]) @include('partials.approval-comment', ['item' => $item]) |
{{ number_format($item->rent_amount, 2) }}
{{ $item->payment_type }} |
@if ($billable > 0)
{{ number_format($billable, 2) }}
@if ($item->payment_type !== 'one-time')
{{-- A monthly rent's first / last month is charged by days, so it shows a month count. --}}
{{ $item->elapsed_periods }}{{ $item->payment_type === 'monthly' ? ' month(s)' : ' ×' }} (till {{ $item->current_period_label }}) @endif @else — @endif |
@if ($totalPaid > 0) {{ number_format($totalPaid, 2) }} @else — @endif | @if ($remaining > 0) {{ number_format($remaining, 2) }} @elseif ($billable > 0) Paid @else {{-- Nothing billed yet (rejected, or start date not reached) — "Paid" would be misleading. --}} — @endif | {{-- Edit stays available after approval: it is how a running rent gets its End Date set to stop the recurring charge. Touching an approved record needs the extra *-approved permission. --}} @php $isApproved = $item->status === 'approved'; $canEditRow = auth()->user()->can('core-rent-edit') && (!$isApproved || auth()->user()->can('core-rent-edit-approved')); $canDeleteRow = auth()->user()->can('core-rent-delete') && (!$isApproved || auth()->user()->can('core-rent-delete-approved')); @endphp @if ($canEditRow) Edit @endif @if ($canDeleteRow) @endif @can('core-rent-approve') @include('partials.approval-decision-buttons', [ 'item' => $item, 'url' => route('core-rent.approve', $item->id), 'label' => 'Core Rent', ]) @endcan @if ($item->status === 'approved') @can('core-rent-payment') @if ($totalPaid > 0) @endif @endcan @endif @can('core-rent-history') History @endcan |