Monthly Installment
| # | Manager | POP | Start Month | Status | Per Month (৳) | Billed Till Now (৳) | Paid (৳) | Due (৳) | Action |
|---|---|---|---|---|---|---|---|---|---|
| Total | {{ number_format($grandPerMonth, 2) }} | {{ number_format($grandAmount, 2) }} | {{ number_format($grandPaid, 2) }} | {{ number_format($grandRemaining, 2) }} | |||||
| {{ $item->id }} | {{ $item->manager->name_with_type ?? '—' }} | {{ $item->pop->popname ?? '—' }} |
{{ $item->installment_month ? $item->installment_month->format('M Y') : '—' }}
@if ($item->end_month)
{{ $item->is_stopped ? 'Stopped after' : 'Ends' }} {{ $item->end_month->format('M Y') }} @else Recurring @endif @if ($item->description) {{ $item->description }} @endif Added by: {{ $item->createdBy->name ?? '—' }} |
@include('partials.approval-status', ['item' => $item]) @if ($item->status === 'approved') {{-- Never "Fully Paid": next month brings another instalment. --}} @if ($billable > 0 && $remaining <= 0) Up to date @endif @endif @include('partials.approval-comment', ['item' => $item]) | {{ number_format($item->amount, 2) }} |
@if ($billable > 0)
{{ number_format($billable, 2) }}
{{ $item->elapsed_periods }} × (till {{ $item->current_period_label }}) @else — @endif |
@if ($totalPaid > 0) {{ number_format($totalPaid, 2) }} @else — @endif | @if ($remaining > 0) {{ number_format($remaining, 2) }} @elseif ($billable > 0) Paid @else — @endif | {{-- Edit stays available after approval: it is how an ongoing installment gets its End Month set to stop the monthly billing. Touching an approved record needs the extra *-approved permission. --}} @php $isApproved = $item->status === 'approved'; $canEditRow = auth()->user()->can('monthly-installment-edit') && (!$isApproved || auth()->user()->can('monthly-installment-edit-approved')); $canDeleteRow = auth()->user()->can('monthly-installment-delete') && (!$isApproved || auth()->user()->can('monthly-installment-delete-approved')); @endphp @if ($canEditRow) @endif @can('monthly-installment-approve') @include('partials.approval-decision-buttons', [ 'item' => $item, 'url' => route('monthly-installment.approve', $item->id), 'label' => 'installment', ]) @endcan @if ($canDeleteRow) @endif @if ($item->status === 'approved') @can('monthly-installment-payment') @if ($remaining > 0) @endif @if ($totalPaid > 0) @endif @endcan @endif @can('monthly-installment-history') History @endcan |