{{-- @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 Branch Wise Program Report
{{'Date: '.Carbon::parse($dateTo)->format("dS F Y")}}
@if($lastUpdateTime) {{'Last Update: '.$lastUpdateTime}}
@endif @include('microfin/miscellaneous/draftReport', ['filDate' => Carbon::parse($dateTo)->endOfMonth()->format('Y-m-d')])

{{'Reporting '.$filReportLevel.' & Code: '.$xyzName}}
Print Date: {{Carbon::now()->format('d-m-Y')}}
{{--
--}} @php $totalMember = 0; $totalBorrower = 0; $totalSavingsBalance = 0; $totalOtsSavingsBalance = 0; $totalLoanOutstansing = 0; $totalLoanDisbursement = 0; $totalLoanRecovery = 0; $totalRegularRecoverable = 0; $totalRegularRecovery = 0; $totalCurrentMonthDue = 0; $totalCurrentMonthDueLoanee = 0; $totalDue = 0; $totalDueLoanee = 0; $totalBadLoan = 0; $totalBadLoanee = 0; $totalOverdueLoanOutstanding = 0; $totalBCR = 0; $totalPAR = 0; $totalOTR = 0; $count = 0; @endphp @foreach ($branchMapingDataWithType['data'] as $key => $cdata) @foreach($cdata['child'] as $key1 => $childData ) @if($branchMapingDataWithType['type']) @if(isset($cdata['data']['zone'][$childData])) @foreach($cdata['data']['zone'][$childData]['child'] as $areakey => $areaChildData ) @if(isset($cdata['data']['zone'][$childData]['data']['area'][$areaChildData]['child'])) @foreach($cdata['data']['zone'][$childData]['data']['area'][$areaChildData]['child'] as $branchkey => $branchChildData ) @if(isset($data_collect['branchData'][$branchChildData])) @php $count++; @endphp @php $totalMember += $data_collect['branchData'][$branchChildData]['member']['current']; $totalBorrower += $data_collect['branchData'][$branchChildData]['borrower']['current']; $totalSavingsBalance += $data_collect['branchData'][$branchChildData]['savingsBalance']['current']; $totalOtsSavingsBalance += $data_collect['branchData'][$branchChildData]['savingsCollection']['current']; $totalLoanOutstansing += $data_collect['branchData'][$branchChildData]['outstanding']['current']; $totalLoanDisbursement += $data_collect['branchData'][$branchChildData]['disbursement']['current']; $totalLoanRecovery += $data_collect['branchData'][$branchChildData]['recovery']['current']; $totalRegularRecoverable += $data_collect['branchData'][$branchChildData]['regularRecoverable']['current']; $totalRegularRecovery += $data_collect['branchData'][$branchChildData]['regularRecovery']['current']; $totalCurrentMonthDue += $data_collect['branchData'][$branchChildData]['currentMonthDue']['current']; $totalCurrentMonthDueLoanee += $data_collect['branchData'][$branchChildData]['currentMonthDue']['loanee']; $totalDue += $data_collect['branchData'][$branchChildData]['totalDue']['current']; $totalDueLoanee += $data_collect['branchData'][$branchChildData]['totalDue']['loanee']; $totalBadLoan += $data_collect['branchData'][$branchChildData]['badLoan']['current']; $totalBadLoanee += $data_collect['branchData'][$branchChildData]['badLoan']['loanee']; $totalOverdueLoanOutstanding += $data_collect['branchData'][$branchChildData]['overduePresentLoan']['current']; @endphp @endif @endforeach @endif @endforeach @endif @endif @endforeach @endforeach {{-- --}} {{-- --}}
Division Zone Area Branch Member Borrower Savings Balance Savings Collection Loan Outstanding Loan Disbursement Loan Recovery Regular Recoverable Regular Recovery Current Month Due (New) Current Month Due loanee (New) Total Due (End Of Month) Total Due Loanee (End Of Month) Bad Loan Bad Loanee Overdue Loan Outstanding Borrower Coverage Ratio (%) OTR (%) PAR (%)
{{ $cdata['name'] }} {{ $cdata['data']['zone'][$childData]['name'] }} {{ $cdata['data']['zone'][$childData]['data']['area'][$areaChildData]['name'] }} {{ $data_collect['branchData'][$branchChildData]['branchName']['current'] }} {{ $data_collect['branchData'][$branchChildData]['member']['current'] }} {{ $data_collect['branchData'][$branchChildData]['borrower']['current'] }} {{number_format($data_collect['branchData'][$branchChildData]['savingsBalance']['current'])}} {{number_format($data_collect['branchData'][$branchChildData]['savingsCollection']['current'])}} {{number_format(abs($data_collect['branchData'][$branchChildData]['outstanding']['current']))}} {{number_format($data_collect['branchData'][$branchChildData]['disbursement']['current'])}} {{number_format($data_collect['branchData'][$branchChildData]['recovery']['current'])}} {{number_format($data_collect['branchData'][$branchChildData]['regularRecoverable']['current'])}} {{number_format( $data_collect['branchData'][$branchChildData]['regularRecovery']['current'])}} {{number_format($data_collect['branchData'][$branchChildData]['currentMonthDue']['current'])}} {{number_format($data_collect['branchData'][$branchChildData]['currentMonthDue']['loanee'])}} {{number_format($data_collect['branchData'][$branchChildData]['totalDue']['current'])}} {{number_format($data_collect['branchData'][$branchChildData]['totalDue']['loanee'])}} {{number_format($data_collect['branchData'][$branchChildData]['badLoan']['current'])}} {{number_format($data_collect['branchData'][$branchChildData]['badLoan']['loanee'])}} {{number_format($data_collect['branchData'][$branchChildData]['overduePresentLoan']['current'])}} @if($data_collect['branchData'][$branchChildData]['member']['current'] > 0) {{(round($data_collect['branchData'][$branchChildData]['borrower']['current']/$data_collect['branchData'][$branchChildData]['member']['current']*100,2)).'%'}} @else {{'0%'}} @endif @if($data_collect['branchData'][$branchChildData]['regularRecoverable']['current'] > 0) {{(round($data_collect['branchData'][$branchChildData]['regularRecovery']['current']/$data_collect['branchData'][$branchChildData]['regularRecoverable']['current']*100,2)).'%'}} @else @if($data_collect['branchData'][$branchChildData]['regularRecovery']['current'] == $data_collect['branchData'][$branchChildData]['regularRecoverable']['current']) {{'100%'}} @else {{'0%'}} @endif @endif @if($data_collect['branchData'][$branchChildData]['outstanding']['current'] > 0) @if(round($data_collect['branchData'][$branchChildData]['overduePresentLoan']['current']/$data_collect['branchData'][$branchChildData]['outstanding']['current']*100,2) > 100) {{'100%'}} @else {{(round($data_collect['branchData'][$branchChildData]['overduePresentLoan']['current']/$data_collect['branchData'][$branchChildData]['outstanding']['current']*100,2)).'%'}} @endif @else {{'0%'}} @endif
Total {{ $totalMember }} {{ $totalBorrower }} {{ number_format($totalSavingsBalance) }} {{ number_format($totalOtsSavingsBalance) }} {{ number_format(abs($totalLoanOutstansing)) }} {{ number_format($totalLoanDisbursement) }} {{ number_format($totalLoanRecovery) }} {{ number_format($totalRegularRecoverable) }} {{ number_format($totalRegularRecovery) }} {{ number_format($totalCurrentMonthDue) }} {{ number_format($totalCurrentMonthDueLoanee) }} {{ number_format($totalDue) }} {{ number_format($totalDueLoanee) }} {{ number_format($totalBadLoan) }} {{ number_format($totalBadLoanee) }} {{ number_format($totalOverdueLoanOutstanding) }} {{ $totalMember > 0 ? round(($totalBorrower / $totalMember) * 100, 2) . '%' : '0%' }} @if($totalRegularRecoverable > 0) {{(round(($totalRegularRecovery)/($totalRegularRecoverable)*100,2)).'%'}} @else {{'0%'}} @endif @if($totalLoanOutstansing > 0) @if(round($totalOverdueLoanOutstanding/$totalLoanOutstansing*100,2) > 100) {{'100%'}} @else {{(round($totalOverdueLoanOutstanding/$totalLoanOutstansing*100,2)).'%'}} @endif @else {{'0%'}} @endif
{{--
--}}
{{-- REPORT FOOTER --}}