"Quarterly",
"monthly" => "Monthly",
];
$date_ranges = [
"ytd" => "Year to Date",
//"unbound" => "Unbound",
"custom" => "Custom",
];
$retests_options = [
0 => "Exclude",
1 => "Retests Only"
];
$years = range(2018, date("Y"));
$date_range_custom_style = ($date_range === "custom") ? "" : "display: none";
$date_range_value = "";
if($date_start && $date_end) {
[$min_year, $min_month, $min_day] = explode("-", $date_start);
[$max_year, $max_month, $max_day] = explode("-", $date_end);
$date_range_value = "$min_day/$min_month/$min_year - $max_day/$max_month/$max_year";
}
$collator = new Collator("en_GB");
if($charts) {
$brands = array_keys($brand_data);
$regions = array_keys($region_data);
$area_managers = array_keys($area_manager_data);
$operations_managers = array_keys($operations_manager_data);
}
else {
$brands = $customer->getBrands();
$regions = $customer->getRegions();
$area_managers = $customer->getAreaManagerNames();
$operations_managers = $customer->getOperationsManagerNames();
}
$gaming_managers = $customer->getGamingManagerNames();
$senior_gaming_managers = $customer->getSeniorGamingManagerNames();
$collator->sort($brands);
$collator->sort($regions);
$collator->sort($area_managers);
$collator->sort($operations_managers);
$project_options = [];
foreach($project_table_data as $project_data) {
$project_options[$project_data["id"]] = $project_data["name"];
}
?>
=htmlspecialchars($customer->name)?> Reports
canSeeMissingData()) {
/**
* @param string $field
* @param Location[] $locations
* @return void
*/
$render_locations_missing_data = static function(string $field, array $locations): void {
?>
There are some locations that are missing "=htmlspecialchars($field)?>" information:
Report
Retests Excluded
Retests Only
Retests Included
0) {
$pass_percentage = number_format(($pass * 100) / $total, 2);
}
?>
| =htmlspecialchars($title)?> |
=$pass?> |
=$pass_percentage?> |
=$fail?> |
=$total?> |
=$void?> |
|
=htmlspecialchars(__("Passes"))?> |
=htmlspecialchars(__("Pass Rate (%)"))?> |
=htmlspecialchars(__("Fails"))?> |
=htmlspecialchars(__("Total"))?> |
=htmlspecialchars(__("Voids"))?> |
| =htmlspecialchars(__("Venue Tests"))?> |
|
=htmlspecialchars($total_data->testCount)?> |
=htmlspecialchars($total_data->voidCount)?> |
passCount)) {
$render_pass_fail_row("Gaming Tests", $total_data->passCount, $total_data->failCount, $total_data->gamingCounts["void"] ?? 0);
}
if(isset($total_data->barCounts)) {
$render_pass_fail_row("Alcohol Tests", $total_data->barCounts["pass"], $total_data->barCounts["fail"], $total_data->barCounts["void"] ?? 0);
}
if(isset($total_data->combinedCounts)) {
$render_pass_fail_row("Combined Tests", $total_data->combinedCounts["pass"], $total_data->combinedCounts["fail"], $total_data->combinedCounts["void"] ?? 0);
}
?>
$chart) {
if($project_id && $chart->isPeriodic()) {
continue;
}
if($index > 0) {
?>
beforeHtml) {
echo $chart->beforeHtml;
}
?>
print) {
$chart->printDataTable();
}
if($chart->afterHtml) {
echo $chart->afterHtml;
}
}
?>
$customer->getRegionLabel(1),
"data" => $region_data
],
(object) [
"name" => $customer->getAreaManagerLabel(1),
"data" => $area_manager_data
],
(object) [
"name" => $customer->getOperationsManagerLabel(1),
"data" => $operations_manager_data
],
(object) [
"name" => $customer->getBrandLabel(1),
"data" => $brand_data
],
]
?>
Extra Information
name . " Data";
$entity_type = $table->name;
// Calculate totals
$totals = [];
foreach($table->data as $entity_name => $rows) {
$totals[] = [
"name" => $entity_name,
"testCount" => array_sum(array_column($rows, "testCount")),
"passCount" => array_sum(array_column($rows, "passCount")),
"failCount" => array_sum(array_column($rows, "failCount")),
];
}
if(!$totals) {
continue;
}
?>
=htmlspecialchars($title)?>
=htmlspecialchars($entity_type)?>: Totals
| =htmlspecialchars($title)?> |
Tests |
Passes |
Fails |
Rate |
| =htmlspecialchars($data["name"])?> |
=number_format($data["testCount"])?> |
=number_format($data["passCount"])?> |
=number_format($data["failCount"])?> |
=$rate?>% |
|
Total
|
=number_format($total_test_count)?>
|
=number_format($total_pass_count)?>
|
=number_format($total_fail_count)?>
|
=$total_rate?>% |
data as $entity_name => $rows) {
?>
=htmlspecialchars($entity_type)?>: =htmlspecialchars($entity_name)?>
| Period |
Tests |
Passes |
Fails |
Rate |
$data) {
$rate = ($data->testCount == 0) ? "0.00" : number_format(($data->passCount * 100) / $data->testCount, 2);
$label = $key_labels[$index];
?>
| =htmlspecialchars($label)?> |
=number_format($data->testCount)?> |
=number_format($data->passCount)?> |
=number_format($data->failCount)?> |
=$rate?>% |