getYearCycleConstraint(TIMEZONE);
$display_year_cycle = $customer->getDisplayYearCycle();
$alcohol_purchased = $values["alcohol_purchased"] ?? "";
$pass_image = $test->pass ? "pass.png" : "fail.png";
$alcohol_pass_image = empty($alcohol_purchased) ? "pass.png" : "fail.png";
// Bar Receipt
$receipt_path_pattern = $test->getDirectory() . "/bar_receipt.*";
$receipt_config = null;
foreach(glob($receipt_path_pattern) as $receipt_path) {
$receipt_config = PdfHelper::getImageConfig($receipt_path);
$mpdf->imageVars["bar_receipt"] = $receipt_config["contents"];
}
// Test counts
$test_count = count($location->getCompletedTests());
$current_test_count = count($location->getCompletedTests(["dts_start" => $year_cycle_constraint]));
$render_field_value = static function($field, $value): void {
?>
=htmlspecialchars($field)?>:
=htmlspecialchars($value)?>
pass) {
?>
Test Result
Gaming Machine Test Result
=htmlspecialchars($location_text)?>
getDisplayAddress());
?>
Tests (All-Time)
=$test_count?>
Tests (Cur. Year Period)
=$current_test_count?>
(=$display_year_cycle?>)
Tester
Gender:
=htmlspecialchars($tester->getGenderText())?>
Attire:
=htmlspecialchars($test->attire)?>
House Information
brand);
$render_field_value("OM", $location->operations_manager_name);
$render_field_value("BDM", $location->region_name);
$render_field_value("SGEM", $location->senior_gaming_manager_name);
$render_field_value("GEM", $location->gaming_manager_name);
$render_field_value("Density", $location->machine_count);
?>
Gaming Machine Test Details
Date:
=htmlspecialchars($date_start)?>
Entry:
=htmlspecialchars($time_start)?>
Exit:
=htmlspecialchars($time_end)?>
Duration:
=htmlspecialchars($duration_text)?>
pass ? "green" : "red";
switch($test->challenge_stage) {
case 1:
case 2:
$challenge_colour = "green";
break;
case 3:
$challenge_colour = "orange";
break;
case 4:
case 5:
default:
$challenge_colour = "red";
break;
}
?>
Result:
=htmlspecialchars($test->getPassText())?>
ID Stage:
=htmlspecialchars($test->challenge_stage . " - " . $test->getChallengeStageText())?>
Eye Contact:
=($test->challenger_eye_contact ? "Yes" : "No")?>
Description:
=TestPDF::getValueHtml($test->challenge_description)?>
Name:
=TestPDF::getValueHtml($test->challenger_name)?>
Description:
=TestPDF::getValueHtml($test->challenger_description)?>
Alcohol Test Details
Arrival:
=TestPDF::getValueHtml($bar_time)?>
Asked For ID:
=TestPDF::getBooleanHtml($bar_age_verification)?>
Alcohol Purchased:
=TestPDF::getBooleanHtml($alcohol_purchased)?>
Drink Purchased:
=TestPDF::getValueHtml($bar_purchase_item)?>
Bar Spend:
£=number_format($bar_expenditure, 2)?>
Name:
=TestPDF::getValueHtml($bar_staff_name)?>
Description:
=TestPDF::getValueHtml($bar_staff_description)?>
Machine Played:
=TestPDF::getValueHtml($values["play_machine"] ?? "")?>
Machine Position:
=TestPDF::getValueHtml($values["play_machine_position"] ?? "")?>
Jackpot Value:
=TestPDF::getValueHtml($play_jackpot)?>
Stake Played:
=TestPDF::getValueHtml($play_machine_stake)?>
Minutes Played:
=TestPDF::getValueHtml($values["play_minutes"] ?? "")?>
Amount Spent:
=TestPDF::getValueHtml($play_spent)?>
1: Challenge on entry
2: Challenge while browsing
3: Challenge during play
4: Challenge after play
5: No challenge

" height="=$receipt_config["height"]?>" alt="" />
Other Test Details
Present:
=TestPDF::getBooleanHtml($values["security_staff_present"] ?? false)?>
Asked For ID:
=TestPDF::getBooleanHtml($values["security_staff_challenge"] ?? false)?>
Line of Sight of Bar:
=TestPDF::getBooleanHtml($values["play_machine_line_of_sight"] ?? false)?>
=TestPDF::getValueHtml($test->additional_notes)?>