@include('microfin/miscellaneous/dayEndPendingAlert') @php use Carbon\Carbon; @endphp
{{-- div for Company --}} @php $company = DB::table('gnr_company')->where('id', Auth::user()->company_id_fk)->select('name','address')->first(); $filReportLevel = $filReportLevel ?: 'Branch'; $filXyzTable = 'gnr_'.strtolower($filReportLevel); $filXyz = ${'fil'.$filReportLevel}; if($filXyz == NULL || $filXyz == '' || $filXyz == 0){ $xyzName = "All"; }else{ $xyzQuery = DB::table($filXyzTable)->where('id', $filXyz)->first(); if($filReportLevel == 'Branch') $xyzCode = $xyzQuery->branchCode; else $xyzCode = $xyzQuery->code; $xyzName = $xyzQuery->name.' & ('.str_pad($xyzCode,3,0,STR_PAD_LEFT).')'; } @endphp {{$company->name}}
{{$company->address}}
MFP Program Report
{{'Date: '.Carbon::parse($dateTo)->format("dS F Y")}}

{{'Reporting '.$filReportLevel.' & Code: '.$xyzName}}
Print Date: {{Carbon::now()->format('d-m-Y')}}
{{--
--}} {{-- --}} {{-- --}} {{-- --}} @foreach($months as $month) @endforeach {{-- --}} @foreach($months as $month) @endforeach @foreach($months as $month) @endforeach @foreach($months as $month) @endforeach @foreach($months as $month) @endforeach @foreach($months as $month) @endforeach @foreach($months as $month) @endforeach @foreach($months as $month) @endforeach @foreach($months as $month) @endforeach @php $totalFyDisbursement = 0; @endphp @foreach($months as $month) @php $totalFyDisbursement += $data['disbursement']['fy'][$month]; @endphp @endforeach @php $totalFyRecovery = 0; @endphp @foreach($months as $month) @php $totalFyRecovery += $data['recovery']['fy'][$month]; @endphp @endforeach @php $totalFyRegularRecoverable = 0; @endphp @foreach($months as $month) @php $totalFyRegularRecoverable += $data['regularRecoverable']['fy'][$month]; @endphp @endforeach @php $totalFyRegularRecovery = 0; @endphp @foreach($months as $month) @php $totalFyRegularRecovery += $data['regularRecovery']['fy'][$month]; @endphp @endforeach @foreach($months as $month) @endforeach @foreach($months as $month) @endforeach {{-- @php $totalFyBadLoan = 0; @endphp --}} @foreach($months as $month) {{-- @php $totalFyBadLoan += $data['badLoan']['fy'][$month]; @endphp --}} @endforeach @foreach($months as $month) @endforeach @foreach($months as $month) @endforeach @foreach($months as $month) @endforeach @foreach($months as $month) @endforeach @foreach($months as $month) @endforeach @foreach($months as $month) @endforeach @foreach($months as $month) @endforeach @foreach($months as $month) @endforeach
SL. No.
Particulars
Target
Fiscal Year {{$prevFy}}
Fiscal Year {{$currentFy}}
Current Month Achievement
Variance
Yearly Monthly{{Carbon::parse($month)->format('M, Y')}}{{Carbon::parse($dateTo)->format('M, Y')}} Total
Current Month
Current Year
1 Number Of Branches {{$data['branch']['prevFy']??0}}{{sizeof($data['branch']['fy'][$month]??0)}}{{$data['branch']['current']}} {{$data['branch']['current']}} @if(sizeof($months) == 0) {{$data['branch']['current']-$data['branch']['prevFy']}} @else {{$data['branch']['current']-sizeof($data['branch']['fy'][$prevEnd])}} @endif
2 Member {{$data['member']['prevFy']}}{{$data['member']['fy'][$month]}}{{$data['member']['current']}} {{$data['member']['current']}} @if(sizeof($months) == 0) {{$data['member']['current']-$data['member']['prevFy']}} @else {{$data['member']['current']-$data['member']['fy'][$prevEnd]}} @endif
3 Borrower {{$data['borrower']['prevFy']}}{{$data['borrower']['fy'][$month]}}{{$data['borrower']['current']}} {{$data['borrower']['current']}} @if(sizeof($months) == 0) {{$data['borrower']['current']-$data['borrower']['prevFy']}} @else {{$data['borrower']['current']-$data['borrower']['fy'][$prevEnd]}} @endif
4 Savings Balance {{number_format($data['savingsBalance']['prevFy'])}}{{number_format($data['savingsBalance']['fy'][$month])}}{{number_format($data['savingsBalance']['current'])}} {{number_format($data['savingsBalance']['current'])}} @if(sizeof($months) == 0) {{number_format($data['savingsBalance']['current']-$data['savingsBalance']['prevFy'])}} @else {{number_format($data['savingsBalance']['current']-$data['savingsBalance']['fy'][$prevEnd])}} @endif
5 OTS+OTS(M) Savings Balance {{number_format($data['savingsOTSBalance']['prevFy'])}}{{number_format($data['savingsOTSBalance']['fy'][$month])}}{{number_format($data['savingsOTSBalance']['current'])}} {{number_format($data['savingsOTSBalance']['current'])}} @if(sizeof($months) == 0) {{number_format($data['savingsOTSBalance']['current']-$data['savingsOTSBalance']['prevFy'])}} @else {{number_format($data['savingsOTSBalance']['current']-$data['savingsOTSBalance']['fy'][$prevEnd])}} @endif
6 OTS+OTS(M) Savings Deposit {{number_format($data['depositOTSBalance']['prevFy'])}}{{number_format($data['depositOTSBalance']['fy'][$month])}}{{number_format($data['depositOTSBalance']['current'])}} {{number_format($data['depositOTSBalance']['current'])}} @if(sizeof($months) == 0) {{number_format($data['depositOTSBalance']['current']-$data['depositOTSBalance']['prevFy'])}} @else {{number_format($data['depositOTSBalance']['current']-$data['depositOTSBalance']['fy'][$prevEnd])}} @endif
7 OTS+OTS(M) Savings Refund {{number_format($data['refundOTSBalance']['prevFy'])}}{{number_format($data['refundOTSBalance']['fy'][$month])}}{{number_format($data['refundOTSBalance']['current'])}} {{number_format($data['refundOTSBalance']['current'])}} @if(sizeof($months) == 0) {{number_format($data['refundOTSBalance']['current']-$data['refundOTSBalance']['prevFy'])}} @else {{number_format($data['refundOTSBalance']['current']-$data['refundOTSBalance']['fy'][$prevEnd])}} @endif
8 Loan Outstanding {{number_format($data['outstanding']['prevFy'])}}{{number_format($data['outstanding']['fy'][$month])}}{{number_format($data['outstanding']['current'])}} {{number_format($data['outstanding']['current'])}} @if(sizeof($months) == 0) {{number_format($data['outstanding']['current']-$data['outstanding']['prevFy'])}} @else {{number_format($data['outstanding']['current']-$data['outstanding']['fy'][$prevEnd])}} @endif
9 Loan Disbursement {{number_format($data['disbursement']['prevFy'])}}{{number_format($data['disbursement']['fy'][$month])}}{{number_format($data['disbursement']['current'])}} {{number_format($totalFyDisbursement + $data['disbursement']['current'])}} @if(sizeof($months) == 0) {{number_format($data['disbursement']['current']-$data['disbursement']['prevMonth'])}} @else {{number_format($data['disbursement']['current']-$data['disbursement']['fy'][$prevEnd])}} @endif
10 Loan Recovery {{number_format($data['recovery']['prevFy'])}}{{number_format($data['recovery']['fy'][$month])}}{{number_format($data['recovery']['current'])}} {{number_format($totalFyRecovery + $data['recovery']['current'])}} @if(sizeof($months) == 0) {{number_format($data['recovery']['current']-$data['recovery']['prevMonth'])}} @else {{number_format($data['recovery']['current']-$data['recovery']['fy'][$prevEnd])}} @endif
11 Regular Recoverable {{number_format($data['regularRecoverable']['prevFy'])}}{{number_format($data['regularRecoverable']['fy'][$month])}}{{number_format($data['regularRecoverable']['current'])}} {{number_format($totalFyRegularRecoverable + $data['regularRecoverable']['current'])}} @if(sizeof($months) == 0) {{number_format($data['regularRecoverable']['current']-$data['regularRecoverable']['prevMonth'])}} @else {{number_format($data['regularRecoverable']['current']-$data['regularRecoverable']['fy'][$prevEnd])}} @endif
12 Regular Recovery {{number_format($data['regularRecovery']['prevFy'])}}{{number_format($data['regularRecovery']['fy'][$month])}}{{number_format($data['regularRecovery']['current'])}} {{number_format($totalFyRegularRecovery + $data['regularRecovery']['current'])}} @if(sizeof($months) == 0) {{number_format($data['regularRecovery']['current']-$data['regularRecovery']['prevMonth'])}} @else {{number_format($data['regularRecovery']['current']-$data['regularRecovery']['fy'][$prevEnd])}} @endif
13 Current Month Due (New) {{number_format($data['currentMonthDue']['prevFy'])}}{{number_format($data['currentMonthDue']['fy'][$month])}}{{number_format($data['currentMonthDue']['current'])}} {{number_format($data['currentMonthDue']['current'])}} @if(sizeof($months) == 0) {{number_format($data['currentMonthDue']['current']-$data['currentMonthDue']['prevFy'])}} @else {{number_format($data['currentMonthDue']['current']-$data['currentMonthDue']['fy'][$prevEnd])}} @endif
14 Total Due (End Of Month) {{number_format($data['totalDue']['prevFy'])}}{{number_format($data['totalDue']['fy'][$month])}}{{number_format($data['totalDue']['current'])}} {{number_format($data['totalDue']['current'])}} @if(sizeof($months) == 0) {{number_format($data['totalDue']['current']-$data['totalDue']['prevFy'])}} @else {{number_format($data['totalDue']['current']-$data['totalDue']['fy'][$prevEnd])}} @endif
15 Bad Loan {{number_format($data['badLoan']['prevFy'])}}{{number_format($data['badLoan']['fy'][$month])}}{{number_format($data['badLoan']['current'])}} {{number_format($data['badLoan']['current'])}} @if(sizeof($months) == 0) {{number_format($data['badLoan']['current']-$data['badLoan']['prevFy'])}} @else {{number_format($data['badLoan']['current']-$data['badLoan']['fy'][$prevEnd])}} @endif
16 Bad Loan Collection
17 Overdue Loan Outstanding {{number_format($data['overduePresentLoan']['prevFy'])}}{{number_format($data['overduePresentLoan']['fy'][$month])}}{{number_format($data['overduePresentLoan']['current'])}} {{number_format($data['overduePresentLoan']['current'])}} @if(sizeof($months) == 0) {{number_format($data['overduePresentLoan']['current']-$data['overduePresentLoan']['prevFy'])}} @else {{number_format($data['overduePresentLoan']['current']-$data['overduePresentLoan']['fy'][$prevEnd])}} @endif
18 Surplus (Current Month) {{number_format($data['surplus']['prevFy'])}}{{number_format($data['surplus']['fy'][$month])}}{{number_format($data['surplus']['current'])}} {{number_format($data['surplus']['total'])}} {{number_format($data['surplus']['current']-$data['surplus']['fy'][$prevEnd])}}
19 Cash in Hand {{number_format($data['cashInHand']['prevFy'])}}{{number_format($data['cashInHand']['fy'][$month])}}{{number_format($data['cashInHand']['current'])}} {{number_format($data['cashInHand']['current'])}} {{number_format($data['cashInHand']['current']-$data['cashInHand']['fy'][$prevEnd])}}
20 Bank Balance {{number_format($data['bankBalance']['prevFy'])}}{{number_format($data['bankBalance']['fy'][$month])}}{{number_format($data['bankBalance']['current'])}} {{number_format($data['bankBalance']['current'])}} {{number_format($data['bankBalance']['current']-$data['bankBalance']['fy'][$prevEnd])}}
21 Borrower Coverage Ratio (%) @if($data['borrower']['prevFy']/$data['member']['prevFy']*100 > 0) {{(round($data['borrower']['prevFy']/$data['member']['prevFy']*100,2)).'%'}} @else {{'0%'}} @endif @if($data['member']['fy'][$month] > 0) {{(round($data['borrower']['fy'][$month]/$data['member']['fy'][$month]*100,2)).'%'}} @else {{'0%'}} @endif @if($data['member']['current'] > 0) {{(round($data['borrower']['current']/$data['member']['current']*100,2)).'%'}} @else {{'0%'}} @endif @if($data['member']['current'] > 0) {{(round($data['borrower']['current']/$data['member']['current']*100,2)).'%'}} @else {{'0%'}} @endif @php if($data['member']['current'] > 0){ $currentBorrowerRatio = round($data['borrower']['current']/$data['member']['current']*100,2); }else{ $currentBorrowerRatio = 0; } if(sizeof($months) == 0){ if($data['member']['prevFy'] > 0){ $prevBorrowerRatio = round($data['borrower']['prevFy']/$data['member']['prevFy']*100,2); }else{ $prevBorrowerRatio = 0; } }else{ if($data['member']['fy'][$prevEnd] > 0){ $prevBorrowerRatio = round($data['borrower']['fy'][$prevEnd]/$data['member']['fy'][$prevEnd]*100,2); }else{ $prevBorrowerRatio = 0; } } @endphp {{round($currentBorrowerRatio-$prevBorrowerRatio,2).'%'}}
22 OTR (%) @if($data['regularRecovery']['prevFy']/$data['regularRecoverable']['prevFy']*100 > 0) {{(round($data['regularRecovery']['prevFy']/$data['regularRecoverable']['prevFy']*100,2)).'%'}} @else @if($data['regularRecovery']['prevFy'] == $data['regularRecoverable']['prevFy']) {{'100%'}} @else {{'0%'}} @endif @endif @if($data['regularRecoverable']['fy'][$month] > 0) {{(round($data['regularRecovery']['fy'][$month]/$data['regularRecoverable']['fy'][$month]*100,2)).'%'}} @else @if($data['regularRecovery']['fy'][$month] == $data['regularRecoverable']['fy'][$month]) {{'100%'}} @else {{'0%'}} @endif @endif @if($data['regularRecoverable']['current'] > 0) {{(round($data['regularRecovery']['current']/$data['regularRecoverable']['current']*100,2)).'%'}} @else @if($data['regularRecovery']['current'] == $data['regularRecoverable']['current']) {{'100%'}} @else {{'0%'}} @endif @endif @if($totalFyRegularRecoverable+$data['regularRecoverable']['current'] > 0) {{(round(($totalFyRegularRecovery+$data['regularRecovery']['current'])/($totalFyRegularRecoverable+$data['regularRecoverable']['current'])*100,2)).'%'}} @else {{'0%'}} @endif @php if($data['regularRecoverable']['current'] > 0){ $currentOTR = round($data['regularRecovery']['current']/$data['regularRecoverable']['current']*100,2); }else{ $currentOTR = 0; } if(sizeof($months) == 0){ if($data['regularRecoverable']['prevFy'] > 0){ $prevOTR = round($data['regularRecovery']['prevFy']/$data['regularRecoverable']['prevFy']*100,2); }else{ $prevOTR = 0; } }else{ if($data['regularRecoverable']['fy'][$prevEnd] > 0){ $prevOTR = round($data['regularRecovery']['fy'][$prevEnd]/$data['regularRecoverable']['fy'][$prevEnd]*100,2); }else{ $prevOTR = 0; } } @endphp {{round($currentOTR - $prevOTR, 2).'%'}}
23 PAR (%) @if($data['overduePresentLoan']['prevFy']/$data['outstanding']['prevFy']*100 > 0) {{(round($data['overduePresentLoan']['prevFy']/$data['outstanding']['prevFy']*100,2)).'%'}} @else {{'0%'}} @endif @if($data['outstanding']['fy'][$month] > 0) {{(round($data['overduePresentLoan']['fy'][$month]/$data['outstanding']['fy'][$month]*100,2)).'%'}} @else {{'0%'}} @endif @if($data['outstanding']['current'] > 0) {{(round($data['overduePresentLoan']['current']/$data['outstanding']['current']*100,2)).'%'}} @else {{'0%'}} @endif @if($data['outstanding']['current'] > 0) {{(round($data['overduePresentLoan']['current']/$data['outstanding']['current']*100,2)).'%'}} @else {{'0%'}} @endif @php if($data['outstanding']['current'] > 0){ $currentPAR = round($data['overduePresentLoan']['current']/$data['outstanding']['current']*100,2); }else{ $currentPAR = 0; } if(sizeof($months) == 0){ if($data['outstanding']['prevFy'] > 0){ $prevPAR = round($data['overduePresentLoan']['prevFy']/$data['outstanding']['prevFy']*100,2); }else{ $prevPAR = 0; } }else{ if($data['outstanding']['fy'][$prevEnd] > 0){ $prevPAR = round($data['overduePresentLoan']['fy'][$prevEnd]/$data['outstanding']['fy'][$prevEnd]*100,2); }else{ $prevPAR = 0; } } @endphp {{round($currentPAR - $prevPAR, 2).'%'}}
{{--
--}}
{{-- REPORT FOOTER --}}