@include('./util/header')
@if($message)
{{$message}}
@endif
| No # |
Group # |
Group Name (click for details) |
Summary |
Closure Date |
@php
$iconASIhtml = '';
$iconAspASIhtml = '';
$iconOASIhtml = '';
$iconAspOASIhtml = '';
$iconASSEThtml = '';
$iconASSETtaskhtml = '';
$iconASSETposhtml = '';
$icon360html = '';
$iconAsp360html = '';
$i=0;
@endphp
@foreach($groups as $group)
@php
$i++;
$asiUsers = is_numeric($group->asiUsers) ? $group->asiUsers : 0;
$aspAsiUsers = is_numeric($group->aspAsiUsers) ? $group->aspAsiUsers : 0;
$oasiUsers = is_numeric($group->oasiUsers) ? $group->oasiUsers : 0;
$aspOasiUsers = is_numeric($group->aspOasiUsers) ? $group->aspOasiUsers : 0;
$assetUsers = is_numeric($group->assetUsers) ? $group->assetUsers : 0;
$assetTaskUsers = is_numeric($group->assetTaskUsers) ? $group->assetTaskUsers : 0;
$assetPosUsers = is_numeric($group->assetPosUsers) ? $group->assetPosUsers : 0;
$asi360Users = is_numeric($group->asi360Users) ? $group->asi360Users : 0;
$aspAsi360Users = is_numeric($group->aspAsi360Users) ? $group->aspAsi360Users : 0;
$asiCount = is_numeric($group->asiCount) ? $group->asiCount : 0;
$aspAsiCount = is_numeric($group->aspAsiCount) ? $group->aspAsiCount : 0;
$oasiCount = is_numeric($group->oasiCount) ? $group->oasiCount : 0;
$aspOasiCount = is_numeric($group->aspOasiCount) ? $group->aspOasiCount : 0;
$assetCount = is_numeric($group->assetCount) ? $group->assetCount : 0;
$assetTaskCount = is_numeric($group->assetTaskCount) ? $group->assetTaskCount : 0;
$assetPosCount = is_numeric($group->assetPosCount) ? $group->assetPosCount : 0;
$evaluatorCount = getEvaluatorCount($group->groupCode, 0); // Replace with actual function
if (!is_numeric($evaluatorCount) || $evaluatorCount < 0) {
$evaluatorCount = 0;
}
$aspEvalCount = getAspEvaluatorCount($group->groupCode, 0); // Replace with actual function
if (!is_numeric($aspEvalCount) || $aspEvalCount < 0) {
$aspEvalCount = 0;
}
$totalCount=0;
$totalCount = $asiCount + $oasiCount + $assetCount + $assetTaskCount + $assetPosCount + $evaluatorCount + $aspAsiCount + $aspOasiCount + $assetCount + $aspEvalCount;
$asiPercent = assessmentPercent($asiCount, $asiUsers);
$aspasiPercent = assessmentPercent($aspAsiCount, $aspAsiUsers);
$oasiPercent = assessmentPercent($oasiCount, $oasiUsers);
$aspoasiPercent = assessmentPercent($aspOasiCount, $aspOasiUsers);
$assetPercent = assessmentPercent($assetCount, $assetUsers);
$assetTaskPercent = assessmentPercent($assetTaskCount, $assetTaskUsers);
$assetPosPercent = assessmentPercent($assetPosCount, $assetPosUsers);
$eval360Percent = assessmentPercent($evaluatorCount, $asi360Users);
$evalAsp360Percent = assessmentPercent($aspEvalCount, $aspAsi360Users);
$animateStyle = "animation-name: progressbar;
animation-duration: 4s;
animation-timing-function: ease;
animation-delay: 0s;
animation-iteration-count: 1;
animation-direction: normal;
animation-play-state: running;
/* Safari and Chrome: */
-webkit-animation-name: progressbar;
-webkit-animation-duration: 4s;
-webkit-animation-timing-function: ease;
-webkit-animation-delay: 0s;
-webkit-animation-iteration-count: 1;
-webkit-animation-direction: normal;
-webkit-animation-play-state: running;";
$asiProgressHtml = "style='width:".$asiPercent."%;clear:both;float:left;".$animateStyle."' id='inventory_desc_asi_reverse'";
$aspAsiProgressHtml = "style='width:".$aspasiPercent."%;clear:both;float:left;".$animateStyle."' id='inventory_desc_a-asi_reverse'";
$oasiProgressHtml = "style='width:".$oasiPercent."%;clear:both;float:left;".$animateStyle."' id='inventory_desc_oasi_reverse'";
$aspOasiProgressHtml = "style='width:".$aspoasiPercent."%;clear:both;float:left;".$animateStyle."' id='inventory_desc_a-oasi_reverse'";
$assetProgressHtml = "style='width:".$assetPercent."%;clear:both;float:left;".$animateStyle."' id='inventory_desc_asset_reverse'";
$assetTaskProgressHtml = "style='width:".$assetTaskPercent."%;clear:both;float:left;".$animateStyle."' id='inventory_desc_asset_reverse'";
$assetPosProgressHtml = "style='width:".$assetPosPercent."%;clear:both;float:left;".$animateStyle."' id='inventory_desc_asset_reverse'";
$eval360ProgressHtml = "style='width:".$eval360Percent."%;clear:both;float:left;".$animateStyle."' id='inventory_desc_360_reverse'";
$evalAsp360ProgressHtml = "style='width:".$evalAsp360Percent."%;clear:both;float:left;".$animateStyle."' id='inventory_desc_A-360_reverse'";
$asiCount = "".$asiCount."";
$aspAsiCount = "".$aspAsiCount."";
$oasiCount = "".$oasiCount."";
$aspOasiCount = "".$aspOasiCount."";
$assetCount = "".$assetCount."";
$assetTaskCount = "".$assetTaskCount."";
$assetPosCount = "".$assetPosCount."";
$evaluatorCount = "".$evaluatorCount."";
$aspEvalCount = "".$aspEvalCount."";
$iconOpenhtml = "style='clear:both; float:left; width:210px;padding:6px;border:1px solid #eee;'>";
$iconCloseOpenhtml = "
Actual: ";
$iconClosehtml = "
";
@endphp
@php
$groupTypeID = $group->groupTypeID;
$asiAllowed = $group->asiAllowed;
$aspAsiAllowed = $group->aspAsiAllowed;
$oasiAllowed = $group->oasiAllowed;
$aspOasiAllowed = $group->aspOasiAllowed;
$assetAllowed = $group->assetAllowed;
$assetTaskAllowed = $group->assetTaskAllowed;
$assetPosAllowed = $group->assetPosAllowed;
$asi360Allowed = $group->asi360Allowed;
$aspAsi360Allowed = $group->aspAsi360Allowed;
@endphp
@if ($groupTypeID == 1 && $asiAllowed)
@php $iconASIhtml = ""; @endphp
@endif
@if ($groupTypeID == 1 && $aspAsiAllowed)
@php $iconAspASIhtml = ""; @endphp
@endif
@if ($groupTypeID == 1 && $oasiAllowed)
@php $iconOASIhtml = ""; @endphp
@endif
@if ($groupTypeID == 1 && $aspOasiAllowed)
@php $iconAspOASIhtml = ""; @endphp
@endif
@if ($groupTypeID == 1 && $assetAllowed)
@php $iconASSEThtml = ""; @endphp
@endif
@if ($groupTypeID == 1 && $assetTaskAllowed)
@php $iconASSETtaskhtml = ""; @endphp
@endif
@if ($groupTypeID == 1 && $assetPosAllowed)
@php $iconASSETposhtml = ""; @endphp
@endif
@if ($groupTypeID == 2 && $asi360Allowed)
@php $icon360html = ""; @endphp
@endif
@if ($groupTypeID == 2 && $aspAsi360Allowed)
@php $iconAsp360html = ""; @endphp
@endif
@php
$iconGroupTypeHtml = '';
if ($group->groupTypeID == 1) {
if ($group->asiAllowed || $group->aspAsiAllowed) {
if ($group->oasiAllowed || $group->aspOasiAllowed) {
if ($group->assetAllowed) {
$iconGroupTypeHtml = "{$iconASIhtml}
{$iconOASIhtml}
{$iconASSEThtml}";
} else {
$iconGroupTypeHtml = "{$iconASIhtml}
{$iconOASIhtml}";
}
} else {
if ($group->assetAllowed) {
$iconGroupTypeHtml = "{$iconASIhtml}
{$iconASSEThtml}";
} else {
$iconGroupTypeHtml = $iconASIhtml;
}
}
} else {
if ($group->oasiAllowed || $group->aspOasiAllowed) {
if ($group->assetAllowed) {
$iconGroupTypeHtml = "{$iconOASIhtml}
{$iconASSEThtml}";
} else {
$iconGroupTypeHtml = $iconOASIhtml;
}
} else {
if ($group->assetAllowed) {
$iconGroupTypeHtml = $iconASSEThtml;
}
}
}
} elseif ($group->groupTypeID == 2) {
if ($group->asi360Allowed) {
$iconGroupTypeHtml = $icon360html;
}
if ($group->aspAsi360Allowed) {
$iconGroupTypeHtml .= $iconAsp360html;
}
}
@endphp
@if ($group->groupTypeID == 2)
@php $iconGroupTypeHtml = "
"; @endphp
@endif
@php
$dateEnd = $group->dateEnd;
if (empty($dateEnd) || is_null($dateEnd)) {
$dateEnd = now()->format('Y-m-d');
} else {
$dateEnd = date('Y-m-d', strtotime($group->dateEnd));
}
$groupNameHtml = $group->groupName;
if (!$group->activeRecord) {
$groupNameHtml = "{$groupNameHtml}";
}
@endphp
@php
$activeGroupStatus = " Group Open";
if (!is_null($group->dateClosed)) {
$activeGroupStatus = " Group closed {$group->dateClosed}";
}
$groupExpected = "Expected: " . ($group->asiUsers + $group->oasiUsers + $group->assetUsers + $group->aspAsiUsers + $group->aspOasiUsers);
$groupActual = "Actual: {$totalCount}";
@endphp
@php
$d_diffDays = Carbon\Carbon::parse($group->dateEnd)->diffInDays(now());
$d_diffMonth = Carbon\Carbon::parse($group->dateEnd)->diffInMonths(now());
$d_diffHtml = '';
if ($d_diffDays > 90) {
$d_diffHtml = "{$d_diffMonth}
months";
} elseif ($d_diffDays < 5) {
$d_diffHtml = "{$d_diffDays}
days";
} elseif ($d_diffDays >= 5 && $d_diffDays <= 90) {
$d_diffHtml = "{$d_diffDays}
days";
} elseif ($d_diffDays === 1 || $d_diffDays === -1) {
$d_diffHtml = "{$d_diffDays}
day";
}
@endphp
|
{{ $i }}
|
{{ $group->groupCode }}
|
{{ $group->groupName }}
|
|
{!! $d_diffHtml !!} - {{ $group->dateEnd }}
|
@endforeach
| Order # |
Date |
Group |
Total |
Payment Status |
View |
@foreach($orders as $order)
| {{$order->orderID}} |
{{$order->dateAdded}} |
{{$order->groupCode }}- {{$order->groupName}} |
{{currencyTestV2($order->invoiceTotal)}} |
Not paid |
Invoice |
@endforeach
@include('./util/footer')