@extends('layouts.master') @section('title') {{ trans('general.dashboard') }} @endsection @section('current-page-title') {{ trans('general.dashboard') }} @endsection @section('current-page') {{ trans('general.dashboard') }} @endsection @section('content')
@if(Sentinel::hasAccess('dashboard.registered_borrowers'))
{{ trans_choice('general.registered',1) }}
{{ trans_choice('general.borrower',2) }}
{{ \App\Models\Borrower::count() }}
@endif
@if(Sentinel::hasAccess('dashboard.total_loans_released'))
{{ trans_choice('general.total',1) }} {{ trans_choice('general.loan',2) }}
{{ trans_choice('general.released',1) }}
@if(\App\Models\Setting::where('setting_key', 'currency_position')->first()->setting_value=='left') {{ \App\Models\Setting::where('setting_key', 'currency_symbol')->first()->setting_value }} {{ number_format(\App\Models\Loan::where('status', 'disbursed')->sum('principal'),2) }} @else {{ number_format(\App\Models\Loan::where('status', 'disbursed')->sum('principal'),2) }} {{ \App\Models\Setting::where('setting_key', 'currency_symbol')->first()->setting_value}} @endif
@endif @if(Sentinel::hasAccess('dashboard.total_collections'))
{{ trans_choice('general.total',1) }}
{{ trans_choice('general.collection',2) }}
@if(\App\Models\Setting::where('setting_key', 'currency_position')->first()->setting_value=='left') {{ \App\Models\Setting::where('setting_key', 'currency_symbol')->first()->setting_value }} {{ number_format(\App\Helpers\GeneralHelper::loans_total_paid(),2) }} @else {{ number_format(\App\Helpers\GeneralHelper::loans_total_paid(),2) }} {{ \App\Models\Setting::where('setting_key', 'currency_symbol')->first()->setting_value}} @endif
@endif @if(Sentinel::hasAccess('dashboard.loans_disbursed'))
{{ trans_choice('general.total',1) }} {{ trans_choice('general.outstanding',1) }}
{{ trans_choice('general.open',1) }} {{ trans_choice('general.loan',2) }}
@if(\App\Models\Setting::where('setting_key', 'currency_position')->first()->setting_value=='left') {{ \App\Models\Setting::where('setting_key', 'currency_symbol')->first()->setting_value }} {{ number_format(\App\Helpers\GeneralHelper::loans_total_due(),2) }} @else {{ number_format(\App\Helpers\GeneralHelper::loans_total_due(),2) }} {{ \App\Models\Setting::where('setting_key', 'currency_symbol')->first()->setting_value}} @endif
@endif @if(Sentinel::hasAccess('dashboard.loans_disbursed'))
O
{{ trans_choice('general.open',1) }}
{{ trans_choice('general.loan',2) }}
{{ \App\Models\Loan::where('status','disbursed')->count() }}
@endif @if(Sentinel::hasAccess('dashboard.loans_closed'))
C
{{ trans_choice('general.closed',2) }}
{{ trans_choice('general.loan',2) }}
{{ \App\Models\Loan::where('status','closed')->count() }}
@endif @if(Sentinel::hasAccess('dashboard.loans_pending'))
P
{{ trans_choice('general.pending',2) }}
{{ trans_choice('general.loan',2) }}
{{ \App\Models\Loan::where('status','pending')->count() }}
@endif @if(Sentinel::hasAccess('dashboard.loans_approved'))
A
{{ trans_choice('general.approved',2) }}
{{ trans_choice('general.loan',2) }}
{{ \App\Models\Loan::where('status','approved')->count() }}
@endif @if(Sentinel::hasAccess('dashboard.loans_rescheduled'))
R
{{ trans_choice('general.rescheduled',2) }}
{{ trans_choice('general.loan',2) }}
{{ \App\Models\Loan::where('status','rescheduled')->count() }}
@endif @if(Sentinel::hasAccess('dashboard.loans_written_off'))
W
{{ trans_choice('general.written_off',2) }}
{{ trans_choice('general.loan',2) }}
{{ \App\Models\Loan::where('status','written_off')->count() }}
@endif @if(Sentinel::hasAccess('dashboard.loans_declined'))
D
{{ trans_choice('general.declined',2) }}
{{ trans_choice('general.loan',2) }}
{{ \App\Models\Loan::where('status','declined')->count() }}
@endif @if(Sentinel::hasAccess('dashboard.loans_withdrawn'))
W
{{ trans_choice('general.withdrawn',2) }}
{{ trans_choice('general.loan',2) }}
{{ \App\Models\Loan::where('status','withdrawn')->count() }}
@endif
@if(Sentinel::hasAccess('dashboard.loans_released_monthly_graph'))

{{trans_choice('general.loans_released_monthly',1)}}

@endif @if(Sentinel::hasAccess('dashboard.loans_collected_monthly_graph'))

{{trans_choice('general.loan_collections_monthly',1)}}

@endif @endsection