"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"]; } ?>

name)?> Reports


$display) { $checked = ($value === $date_range) ? "checked" : ""; ?>
data-date-range-radio-input />
" placeholder="Enter location IDs" /> Separate each location ID with a space.
Leave blank to generate a report for all locations.
reports->categories ?? []; if($total_data && $categories) { ?>

/>
getBrandLabel(2), $brands); $render_location_entity_filter("operations_managers[]", "operation_managers", $customer->getOperationsManagerLabel(2), $operations_managers); $render_location_entity_filter("regions[]", "regions", $customer->getRegionLabel(2), $regions); $render_location_entity_filter("area_managers[]", "area_managers", $customer->getAreaManagerLabel(2), $area_managers); $render_location_entity_filter("senior_gaming_managers[]", "senior_gaming_managers", $customer->getSeniorGamingManagerLabel(2), $senior_gaming_managers); $render_location_entity_filter("gaming_managers[]", "gaming_managers", $customer->getGamingManagerLabel(2), $gaming_managers); ?>
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 "" information:

Report

Retests Excluded Retests Only Retests Included

0) { $pass_percentage = number_format(($pass * 100) / $total, 2); } ?> % testCount + $total_data->voidCount; ?>

passCount)) { $pass_count = $total_data->passCount; $fail_count = $total_data->failCount; $void_count = $total_data->gamingCounts["void"] ?? 0; $render_pass_fail_row(__("Gaming Tests"), $pass_count, $fail_count, $void_count); } if(isset($total_data->barCounts)) { $pass_count = $total_data->barCounts["pass"]; $fail_count = $total_data->barCounts["fail"]; $void_count = $total_data->barCounts["void"] ?? 0; $render_pass_fail_row(__("Alcohol Tests"), $pass_count, $fail_count, $void_count); } if(isset($total_data->combinedCounts) || isset($total_data->blendedCounts) || isset($total_data->mergedCounts)) { ?> combinedCounts)) { $render_pass_fail_row(__("Gaming and Alcohol"), $total_data->combinedCounts["pass"], $total_data->combinedCounts["fail"], $total_data->combinedCounts["void"] ?? 0); } if(isset($total_data->blendedCounts)) { $render_pass_fail_row(__("Gaming and Assumed Alcohol"), $total_data->blendedCounts["pass"], $total_data->blendedCounts["fail"], $total_data->blendedCounts["void"] ?? 0); } if(isset($total_data->mergedCounts)) { $render_pass_fail_row(__("Gaming or Alcohol Pass"), $total_data->mergedCounts["pass"], $total_data->mergedCounts["fail"], $total_data->mergedCounts["void"] ?? 0); } } ?>
testCount)?> voidCount)?>

passCount)) { $pass_count = $total_data->passCount; $fail_count = $total_data->failCount; $void_count = $total_data->gamingCounts["void"] ?? 0; ?> barCounts)) { $gaming_stage_5 = $total_data->stage5Count ?? 0; $gaming_void_count = $total_data->gamingCounts["void"] ?? 0; $pass_count = $total_data->barCounts["pass"]; $fail_count = $total_data->barCounts["fail"]; $void_count = $total_data->barCounts["void"] ?? 0; $explainer = __("There were %d alcohol tests which come from %d gaming tests that ended up in Stage 5 plus %d gaming tests that were void. Of these alcohol tests there were %d passes and %d fails and %d voids.", ($pass_count + $fail_count + $void_count), $gaming_stage_5, $gaming_void_count, $pass_count, $fail_count, $void_count); ?> combinedCounts) || isset($total_data->blendedCounts) || isset($total_data->mergedCounts)) { ?> combinedCounts)) { ?> blendedCounts)) { ?> mergedCounts)) { $gaming_stage_3 = $total_data->stage3Count ?? 0; $gaming_stage_4 = $total_data->stage4Count ?? 0; ?>
testCount + $total_data->voidCount, $total_data->voidCount, $total_data->testCount))?>
passCount))?>
mergedCounts["pass"], $total_data->mergedCounts["fail"], $gaming_stage_3, $gaming_stage_4, $total_data->barCounts["fail"]))?>

$description) { ?>

Chart List

$chart) { if($project_id && $chart->isPeriodic()) { continue; } ?> getTitle())?>
$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 ], (object) [ "name" => $customer->getGamingManagerLabel(1), "data" => $gaming_manager_data ], (object) [ "name" => $customer->getSeniorGamingManagerLabel(1), "data" => $senior_gaming_manager_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; } ?>

: Totals

Tests Passes Fails Rate
%
Total %
data as $entity_name => $rows) { ?>

:

$data) { $rate = ($data->testCount == 0) ? "0.00" : number_format(($data->passCount * 100) / $data->testCount, 2); $label = $key_labels[$index]; ?>
Period Tests Passes Fails Rate
testCount)?> passCount)?> failCount)?> %