@include('admin.layouts.header') @include('admin.layouts.sidebar')

Settlement

@if(Session::has('success')) @endif @if(Session::has('error')) @endif

Settlement

@if($filterAppId) Clear @endif
@if($makerCheckerLogs->count() > 0) @foreach($makerCheckerLogs as $index => $log) @php $isChecker = auth()->check() && auth()->user()->canApproveSettlementWaiver($log->waiver_percentage); $isPending = $log->status === 'pending'; $appRecord = $applications[$log->application_id] ?? null; $isSettled = ($appRecord && ($appRecord->secondary_status ?? '') === 'settled'); $isPaid = $settlementPaidMap[$log->id] ?? false; $customerEmail = $appRecord ? ($appRecord->email ?? '') : ''; @endphp @endforeach
App ID POS Settlement Amount Waiver % Requested To Status Maker Checker Action At Remark Action
{{ $log->application_id }} ₹{{ number_format($log->pos, 2) }} ₹{{ number_format($log->settlement_amount, 2) }} {{ $log->waiver_percentage }}% Approvers with POS waiver limit ≥ {{ round($log->waiver_percentage, 2) }}% @if($log->status === 'approved') Approved @elseif($log->status === 'rejected') Rejected @else Pending @endif {{ $log->maker ? $log->maker->name : '-' }} {{ $log->checker ? $log->checker->name : '-' }} {{ $log->action_at ? \Carbon\Carbon::parse($log->action_at)->format('d-m-Y H:i') : '-' }} @if($isChecker && $isPending) @else {{ $log->remark ?? '-' }} @endif @if($isChecker && $isPending) @elseif($log->status === 'approved') @if($isSettled) Loan Settled
@elseif($isPaid) Amount Received
@else @if($appRecord->secondary_status == 'settlement-aborted') Settlement Aborted @else @endif @endif @else - @endif
{{ $makerCheckerLogs->links() }}
@else

@if($filterAppId) No approval requests found for Application ID {{ $filterAppId }}. @else No approval requests found. @endif

@endif
@include("admin.layouts.footer")