@extends('layouts.admin-new') @section('content')

Void Loans

@forelse($loans as $loan) @php $staff = $loan->collector_type == 'AppModelsUser' ? 'no staff' : $loan->collector @endphp @empty @endforelse
Reference # Borrower Payroll ID Staff Amount Tenure Loan Status Manage
{{ $loan->reference}} {{ optional($loan->user)->name }} @php($emp = optional($loan->user)->employments) @if(isset($emp) && $emp->count() > 0) {{$emp->first()->payroll_id}} @else N/A @endif {{$staff->name ?? 'No staff'}} ₦{{ number_format($loan->amount, 2)}} {{$loan->due_date->diffInMonths($loan->created_at)}} Months ({{$loan->due_date->diffForHumans()}}) @component('components.admin-loan-status', ['loan' => $loan]) @endcomponent @if($loan->is_top_up) Top up @endif View
No Void loans
@endsection @section('page-js') @endsection