{{-- div for Company --}} @php $company = DB::table('gnr_company') ->where('id', Auth::user()->company_id_fk) ->select('name', 'address') ->first(); $reportAchievementType = ''; if($achievementType == 'loanClosingOutstanding'){ $reportAchievementType = 'Loan'; }elseif ($achievementType == 'closingDueAmount') { $reportAchievementType = 'Due'; }else{ $reportAchievementType = 'Savings'; } @endphp {{ $company->name }}
{{ $company->address }}
Achievement Report ({{$filReportLevel}}) : {{$reportAchievementType}}
Print At: {{ \Carbon\Carbon::now()->format('d-m-Y H:i') }}
@if($withManager) @else @endif @php $openingMonthName = head($monthsName); @endphp @php $monthColspan = ($showAchievement) ? sizeOf($months) : sizeOf($months)-1; @endphp @if($showAchievement) @else @endif @if($withManager) @endif @foreach($monthsName as $key => $monthName) @if ($key > 0) @endif @endforeach @if($showAchievement) @endif @php $openingTotal = 0; $achievementGrandTotal = 0; $achievementClosingGrandTotal = 0; @endphp @foreach ($finalLevelBranchIds as $branchId) @if($withManager) @endif @php $achievementTotal = 0; $achievementClosing = 0; @endphp @foreach($months as $key => $monthEndDate) @php $achievementTotal += (float)$collectionFinalArray[$branchId][$monthEndDate]['achievement']; $achievementClosing = $achievementTotal + $collectionFinalArray[$branchId][$months[0]]['balance']; $achievementClosingGrandTotal += $achievementClosing; @endphp @if($showAchievement && $key > 0) @else @endif @endforeach @if($showAchievement) @else @endif @endforeach @if($withManager) @else @endif @foreach($months as $key => $monthEndDate) @php $monthTotalBalance = 0; $monthTotalAchievement = 0; @endphp @foreach ($finalLevelBranchIds as $branchId) @php $monthTotalBalance += (float)$collectionFinalArray[$branchId][$monthEndDate]['balance']; $monthTotalAchievement += (float)$collectionFinalArray[$branchId][$monthEndDate]['achievement']; if($key == 0) $openingTotal = (float) $monthTotalBalance; @endphp @endforeach @php $achievementGrandTotal += (float) $monthTotalAchievement; @endphp @if($showAchievement && $key > 0) @else @endif @endforeach @php $achievementClosingGrandTotal = $achievementGrandTotal + $openingTotal; @endphp @if($showAchievement) @else @endif
SL. No.BranchBranchOpening
{{$openingMonthName}}
Name of MonthsClosing
{{$endMonthName}}
Variance
{{$startMonthName}} to {{$endMonthName}}
Name Manager{{$monthName}}Total
{{$loop->iteration}} {{$collectionFinalArray[$branchId]['name']}}{{$collectionFinalArray[$branchId]['manager']}}{{ $collectionFinalArray[$branchId][$monthEndDate]['achievement'] == 0 ? '-' : number_format( round( $collectionFinalArray[$branchId][$monthEndDate]['achievement'] )) }}{{ $collectionFinalArray[$branchId][$monthEndDate]['balance'] == 0 ? '-' : number_format( round( $collectionFinalArray[$branchId][$monthEndDate]['balance'] )) }}{{ number_format( round( $achievementTotal )) }} {{ number_format( round( $achievementClosing )) }} {{ number_format( round( $collectionFinalArray[$branchId]['variance'] )) }}
Grand Total: Grand Total:{{ $monthTotalAchievement == 0 ? '-' : number_format( round( $monthTotalAchievement )) }}{{ $monthTotalBalance == 0 ? '-' : number_format( round( $monthTotalBalance )) }}{{ $achievementGrandTotal == 0 ? '-' : number_format( round( $achievementGrandTotal )) }} {{ number_format( round( $achievementClosingGrandTotal )) }}{{ $varianceTotal == 0 ? '-' : number_format( round( $varianceTotal )) }}