@extends('layouts.master') @section('page-title',$page_info['page_title']) @section('main-section')

{{$page_info['page_name']}}

Sanction 360º {{$filterShow}}

@if(count($sanctionData) > 0) @php $totalTarget = 0; $totalAchievement = 0; $totalDeficit = 0; @endphp @foreach($sanctionData as $arr) @php // Check if the target is zero to avoid division by zero error $achievementPercentage = $arr->target > 0 ? ($arr->totalLoanAmtApproved / $arr->target) * 100 : 0; $deficit = $arr->target - $arr->totalLoanAmtApproved; $totalTarget += $arr->target; $totalAchievement += $arr->totalLoanAmtApproved; $totalDeficit += $deficit; @endphp @endforeach @else @endif
Sanction Officer Target Achievement % Achievement Deficit
table-user {{ getUserNameById('users','userID',$arr->userID,'displayName') }} {{ nf($arr->target) }} {{ nf($arr->totalLoanAmtApproved) }} {{ number_format($achievementPercentage, 2) }} % {{ nf($deficit) }}
Total {{ nf($totalTarget) }} {{ nf($totalAchievement) }} @php // Check if totalTarget is zero before calculating overall achievement percentage $overallAchievementPercentage = $totalTarget > 0 ? ($totalAchievement / $totalTarget) * 100 : 0; @endphp {{ number_format($overallAchievementPercentage, 2) }} % {{ nf($totalDeficit) }}
No Records Found

Branch 360º {{$filterShow}}

@php // Initialize total variables $totalTarget = 0; $totalAchievement = 0; $totalDeficit = 0; @endphp @if(count($branchData) > 0) @foreach($branchData as $arr) @php // Calculate values for the row $achievementPercentage = $arr->target > 0 ? ($arr->totalLoanAmtApproved / $arr->target) * 100 : 0; $deficit = $arr->target - $arr->totalLoanAmtApproved; // Add to totals $totalTarget += $arr->target; $totalAchievement += $arr->totalLoanAmtApproved; $totalDeficit += $deficit; @endphp @endforeach @else @endif
Branch Target Achievement % Achievement Deficit
{{ getUserNameById('lms_cities', 'cityID', $arr->branchId, 'cityName') }} {{ nf($arr->target) }} {{ nf($arr->totalLoanAmtApproved) }} {{ number_format($achievementPercentage, 2) }} % {{ nf($deficit) }}
Total {{ nf($totalTarget) }} {{ nf($totalAchievement) }} @php $overallAchievementPercentage = $totalTarget > 0 ? ($totalAchievement / $totalTarget) * 100 : 0; @endphp {{ number_format($overallAchievementPercentage, 2) }} % {{ nf($totalDeficit) }}
No Records Found

Sanction 360º Fresh V/S Repeat Cases {{$filterShow}}

@php $totalFreshCases = 0; $totalFreshLoanAmount = 0; $totalRepeatCases = 0; $totalRepeatLoanAmount = 0; @endphp @if(count($sanctionFreshRepeatData) > 0) @foreach($sanctionFreshRepeatData as $arr) @php $grandTotalCases = $arr->freshCases + $arr->repeatCases; $grandTotalLoanAmount = $arr->freshLoanAmount + $arr->repeatLoanAmount; // Accumulate totals $totalFreshCases += $arr->freshCases; $totalFreshLoanAmount += $arr->freshLoanAmount; $totalRepeatCases += $arr->repeatCases; $totalRepeatLoanAmount += $arr->repeatLoanAmount; @endphp @endforeach @else @endif @if(count($sanctionFreshRepeatData) > 0) @endif
Sanction Officer Fresh Cases Fresh Loan Amount Repeat Cases Repeat Loan Amount Grand Total Cases Grand Total Loan Amount
table-user {{ getUserNameById('users', 'userID', $arr->userID, 'displayName') }} {{ $arr->freshCases }} {{ nf($arr->freshLoanAmount) }} {{ $arr->repeatCases }} {{ nf($arr->repeatLoanAmount) }} {{ $grandTotalCases }} {{ nf($grandTotalLoanAmount) }}
No Records Found
Total {{ $totalFreshCases }} {{ nf($totalFreshLoanAmount) }} {{ $totalRepeatCases }} {{ nf($totalRepeatLoanAmount) }} {{ $totalFreshCases + $totalRepeatCases }} {{ nf($totalFreshLoanAmount + $totalRepeatLoanAmount) }}
@endsection @section('custom-js') @endsection