|
|
|
|
Target |
Incentive |
Achieve |
% |
|
@php
//target
$current_month_grand_total_target = 0;
$last_month_grand_total_target = 0;
//incentive
$current_month_grand_total_incentive = 0;
$last_month_grand_total_incentive = 0;
//achieve
$current_month_grand_total_achieve = 0;
$last_month_grand_total_achieve = 0;
$grand_total_target = 0;
$grand_total_incentive = 0;
$grand_total_achieve = 0;
@endphp
|
IPOBiz |
|
|
|
@foreach ($manager_teams as $manager_team)
@php
$current_month_total_target = 0;
$last_month_total_target = 0;
$current_month_total_incentive = 0;
$last_month_total_incentive = 0;
$current_month_total_achieve = 0;
$last_month_total_achieve = 0;
$total_target = 0;
$total_incentive = 0;
$total_achieve = 0;
@endphp
@foreach($manager_team->manager_team_user as $key => $team_user)
{{ $key+1 }} |
{{ $team_user->user_data->name }} |
@php
$current_month_target = manager_monthly_target($team_user->user_id, 'current', $current_month);
$last_month_target = manager_monthly_target($team_user->user_id, 'last', $last_month);
$current_month_achieve = manager_monthly_achieve($team_user->user_id, $current_month);
$last_month_achieve = manager_monthly_achieve($team_user->user_id, $last_month);
@endphp
{{ number_format($last_month_target['target_amount']) }} |
{{ number_format($last_month_target['incentive_amount']) }} |
{{ number_format($last_month_achieve) }} |
|
{{ number_format($current_month_target['target_amount']) }} |
{{ number_format($current_month_target['incentive_amount']) }} |
{{ number_format($current_month_achieve) }} |
|
@php
$sub_total_target = $current_month_target['target_amount']+$last_month_target['target_amount'];
$sub_total_incentive = $current_month_target['incentive_amount']+$last_month_target['incentive_amount'];
$sub_total_achieve = $current_month_achieve+$last_month_achieve;
@endphp
{{ number_format($sub_total_target) }} |
{{ number_format($sub_total_incentive) }} |
{{ number_format($sub_total_achieve) }} |
{{ $sub_total_target != 0 && $sub_total_achieve != 0 ? number_format($sub_total_achieve/($sub_total_target/100), 2) : 0 }} |
|
@php
//target
$current_month_total_target += $current_month_target['target_amount'];
$last_month_total_target += $last_month_target['target_amount'];
//incentive
$current_month_total_incentive += $current_month_target['incentive_amount'];
$last_month_total_incentive += $last_month_target['incentive_amount'];
//achieve
$current_month_total_achieve += $current_month_achieve;
$last_month_total_achieve += $last_month_achieve;
//total_target
$total_target += $sub_total_target;
//total_incentive
$total_incentive += $sub_total_incentive;
//total_achieve
$total_achieve += $sub_total_achieve;
@endphp
@endforeach
|
{{ $manager_team->name }} TOTAL |
{{ number_format($last_month_total_target) }} |
{{ number_format($last_month_total_incentive) }} |
{{ number_format($last_month_total_achieve) }} |
|
{{ number_format($current_month_total_target) }} |
{{ number_format($current_month_total_incentive) }} |
{{ number_format($current_month_total_achieve) }} |
|
{{ number_format($total_target) }} |
{{ number_format($total_incentive) }} |
{{ number_format($total_achieve) }} |
{{ $total_target != 0 && $total_achieve != 0 ? number_format($total_achieve/($total_target/100), 2) : 0 }} |
|
@php
//target
$current_month_grand_total_target += $current_month_total_target;
$last_month_grand_total_target += $last_month_total_target;
//incentive
$current_month_grand_total_incentive += $current_month_total_incentive;
$last_month_grand_total_incentive += $last_month_total_incentive;
//achieve
$current_month_grand_total_achieve += $current_month_total_achieve;
$last_month_grand_total_achieve += $last_month_total_achieve;
$grand_total_target +=$total_target;
$grand_total_incentive +=$total_incentive;
$grand_total_achieve += $total_achieve;
@endphp
@endforeach
|
GRAND TOTAL |
{{ number_format($last_month_grand_total_target) }} |
{{ number_format($last_month_grand_total_incentive) }} |
{{ number_format($last_month_grand_total_achieve) }} |
|
{{ number_format($current_month_grand_total_target) }} |
{{ number_format($current_month_grand_total_incentive) }} |
{{ number_format($current_month_grand_total_achieve) }} |
|
{{ number_format($grand_total_target) }} |
{{ number_format($grand_total_incentive) }} |
{{ number_format($grand_total_achieve) }} |
{{ $grand_total_target != 0 && $grand_total_achieve != 0 ? number_format($grand_total_achieve/($grand_total_target/100), 2) : 0 }} |
|