|
|
@@ -0,0 +1,389 @@
|
|
|
+<?php
|
|
|
+
|
|
|
+/**
|
|
|
+ * @var Template $template
|
|
|
+ * @var Test $test
|
|
|
+ * @var array $values
|
|
|
+ * @var string $location_text
|
|
|
+ * @var Customer $customer
|
|
|
+ * @var Location $location
|
|
|
+ * @var User $tester
|
|
|
+ * @var string $date_start
|
|
|
+ * @var string $time_start
|
|
|
+ * @var string $time_end
|
|
|
+ * @var string $duration_text
|
|
|
+ */
|
|
|
+
|
|
|
+$pass_image = $test->pass ? "pass.png" : "fail.png";
|
|
|
+
|
|
|
+// COVID-19
|
|
|
+$covid_19 = in_array("COVID-19", $template->getKeys());
|
|
|
+
|
|
|
+?>
|
|
|
+
|
|
|
+<h3 class="section">Test Result</h3>
|
|
|
+
|
|
|
+<div align="center" style="margin: auto; width: 75%;">
|
|
|
+ <img src="/img/<?=htmlspecialchars($pass_image)?>" alt="" />
|
|
|
+</div>
|
|
|
+
|
|
|
+<div style="float: left; width: 70%; position: relative;">
|
|
|
+ <h3 class="section"><?=htmlspecialchars($location_text)?></h3>
|
|
|
+
|
|
|
+ <div class="bl">
|
|
|
+ <div class="field"><?=htmlspecialchars($customer->region_field_name)?> / <?=htmlspecialchars($customer->area_manager_field_name)?>:</div>
|
|
|
+ <div class="value">
|
|
|
+ <div style="float: left; width: 25%;">
|
|
|
+ <?=TestPDF::getValueHtml($location->region)?> / <?=TestPDF::getValueHtml($location->area_manager)?>
|
|
|
+ </div>
|
|
|
+ <div style="float: right; width: 74%; text-align: right;">
|
|
|
+ <?=TestPDF::getValueHtml($location->region_name)?> / <?=TestPDF::getValueHtml($location->area_manager_name)?>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="bl">
|
|
|
+ <div class="field">Address:</div>
|
|
|
+ <div class="value">
|
|
|
+ <div style="float: left; width: 50%;">
|
|
|
+ <?=htmlspecialchars($location->address_1)?><br />
|
|
|
+ <?php
|
|
|
+ if($location->address_2) {
|
|
|
+ ?>
|
|
|
+ <?=htmlspecialchars($location->address_2)?><br />
|
|
|
+ <?php
|
|
|
+ }
|
|
|
+ ?>
|
|
|
+ <?=htmlspecialchars($location->city)?>
|
|
|
+ </div>
|
|
|
+ <div style="float: right; width: 49%; text-align: right;">
|
|
|
+ <?=htmlspecialchars($location->legal_entity_name)?><br />
|
|
|
+ <strong>OPM:</strong> <?=htmlspecialchars($location->operations_manager_name)?>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="bl">
|
|
|
+ <div class="field">Postcode:</div>
|
|
|
+ <div class="value"><?=htmlspecialchars($location->postal_code)?></div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="bl">
|
|
|
+ <div class="field">Shop Name - Left:</div>
|
|
|
+ <div class="value"><?=htmlspecialchars($test->shop_left)?></div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="bl">
|
|
|
+ <div class="field">Shop Name - Right:</div>
|
|
|
+ <div class="value"><?=htmlspecialchars($test->shop_right)?></div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div>
|
|
|
+ <div class="field">Door Sensor:</div>
|
|
|
+ <div class="value"><?=TestPDF::getBooleanHtml($values["door_sensor_alert"] ?? false)?></div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+
|
|
|
+</div>
|
|
|
+
|
|
|
+<div style="float: right; width: 29%">
|
|
|
+ <h3 class="section">Tester</h3>
|
|
|
+
|
|
|
+ <div class="bl">
|
|
|
+ <div class="field">Gender:</div>
|
|
|
+ <div class="value"><?=htmlspecialchars($tester->getGenderText())?></div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div>
|
|
|
+ <strong>Attire:</strong><br />
|
|
|
+ <?=htmlspecialchars($test->attire)?>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <h3 class="section">Brand</h3>
|
|
|
+ <strong><?=htmlspecialchars($location->brand)?></strong>
|
|
|
+
|
|
|
+
|
|
|
+</div>
|
|
|
+
|
|
|
+<div style="clear: both;"></div>
|
|
|
+
|
|
|
+<h3 class="section">Test Details</h3>
|
|
|
+
|
|
|
+<div style="float: left; width: 49.5%">
|
|
|
+ <div class="subheader">
|
|
|
+ <strong>Date & Time</strong>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div style="float: left; width: 24%">
|
|
|
+ <strong>Date:</strong><br />
|
|
|
+ <?=htmlspecialchars($date_start)?>
|
|
|
+ </div>
|
|
|
+ <div style="float: left; width: 24%">
|
|
|
+ <strong>Entry:</strong><br />
|
|
|
+ <?=htmlspecialchars($time_start)?>
|
|
|
+ </div>
|
|
|
+ <div style="float: left; width: 24%">
|
|
|
+ <strong>Exit:</strong><br />
|
|
|
+ <?=htmlspecialchars($time_end)?>
|
|
|
+ </div>
|
|
|
+ <div style="float: left; width: 24%">
|
|
|
+ <strong>Duration:</strong><br />
|
|
|
+ <?=htmlspecialchars($duration_text)?>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div style="clear: both;"></div><br />
|
|
|
+
|
|
|
+ <?php
|
|
|
+ if($covid_19) {
|
|
|
+ ?>
|
|
|
+ <div class="subheader">
|
|
|
+ <strong>Venue</strong>
|
|
|
+ </div>
|
|
|
+ <div class="bl">
|
|
|
+ <div class="field">Social Distancing Signage:</div>
|
|
|
+ <div class="value"><?=TestPDF::getBooleanHtml($values["social_distancing_signage"] ?? false)?></div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="bl">
|
|
|
+ <div class="field">Entrance Hand Sanitiser:</div>
|
|
|
+ <div class="value"><?=TestPDF::getBooleanHtml($values["entrance_hand_sanitiser"] ?? false)?></div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div>
|
|
|
+ <div class="field">Social Distancing Measures:</div>
|
|
|
+ <div class="value"><?=TestPDF::getBooleanHtml($values["social_distancing_measures"] ?? false)?></div>
|
|
|
+ </div>
|
|
|
+ <?php
|
|
|
+ }
|
|
|
+ ?>
|
|
|
+
|
|
|
+ <div style="clear: both;"></div><br />
|
|
|
+
|
|
|
+ <div class="subheader">
|
|
|
+ <strong>Staff</strong>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="bl">
|
|
|
+ <div class="field">Name:</div>
|
|
|
+ <div class="value"><?=TestPDF::getValueHtml($test->challenger_name)?></div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="bl">
|
|
|
+ <div class="field">Gender:</div>
|
|
|
+ <div class="value"><?=TestPDF::getValueHtml(Util::getGenderText($test->challenger_gender))?></div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <strong>Description:</strong><br />
|
|
|
+ <?=TestPDF::getValueHtml($test->challenger_description)?><br />
|
|
|
+
|
|
|
+ <br />
|
|
|
+
|
|
|
+ <div class="subheader">
|
|
|
+ <strong>Signage</strong>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="wide-field-names">
|
|
|
+ <div class="bl">
|
|
|
+ <div class="field">Think 21/25:</div>
|
|
|
+ <div class="value"><?=TestPDF::getValueHtml($values["think_21_25"] ?? "")?></div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <?php
|
|
|
+ $value = $values["citizen_card_brochure_displayed"] ?? "";
|
|
|
+ if(strlen($value)) $value = $value ? "Yes" : "No";
|
|
|
+ ?>
|
|
|
+
|
|
|
+ <div class="bl">
|
|
|
+ <div class="field">Citizen Card Brochure Displayed:</div>
|
|
|
+ <div class="value"><?=TestPDF::getValueHtml($value)?></div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <?php
|
|
|
+ $value = $values["think_21_poster"] ?? "";
|
|
|
+ if(strlen($value)) $value = $value ? "Yes" : "No";
|
|
|
+ ?>
|
|
|
+
|
|
|
+ <div class="bl">
|
|
|
+ <div class="field">Think 21/25 Posters Displayed:</div>
|
|
|
+ <div class="value"><?=TestPDF::getValueHtml($value)?></div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <strong>Think 21/25 Poster Notes:</strong><br />
|
|
|
+ <?=TestPDF::getValueHtml($values["think_21_poster_notes"] ?? "")?>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <br />
|
|
|
+
|
|
|
+ <?php
|
|
|
+ $bar_purchase = ($values["bar_purchase"] ?? "") ? "Yes" : "No";
|
|
|
+ $bar_expenditure = ($values["bar_expenditure"] ?? "") ?: 0;
|
|
|
+ $alcohol_purchased = ($values["alcohol_purchased"] ?? "") ? "Yes" : "No";
|
|
|
+ $bar_purchase_item = ($values["bar_purchase_item"] ?? "");
|
|
|
+ ?>
|
|
|
+
|
|
|
+ <div class="subheader">
|
|
|
+ <strong>Bar Details</strong>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="wide-field-names">
|
|
|
+ <div class="bl">
|
|
|
+ <div class="field">Bar Purchase:</div>
|
|
|
+ <div class="value"><?=TestPDF::getValueHtml($bar_purchase)?></div>
|
|
|
+ </div>
|
|
|
+ <div class="bl">
|
|
|
+ <div class="field">Bar Expenditure:</div>
|
|
|
+ <div class="value">£<?=number_format($bar_expenditure, 2)?></div>
|
|
|
+ </div>
|
|
|
+ <div class="bl">
|
|
|
+ <div class="field">Alcohol Purchased:</div>
|
|
|
+ <div class="value"><?=$alcohol_purchased?></div>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <div class="field">Name of Item Purchased:</div>
|
|
|
+ <div class="value"><?=TestPDF::getValueHtml($bar_purchase_item)?></div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+
|
|
|
+</div>
|
|
|
+
|
|
|
+<div style="float: right; width: 49.5%">
|
|
|
+ <div class="subheader">
|
|
|
+ <strong>ID Request</strong>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <?php
|
|
|
+
|
|
|
+ $pass_colour = $test->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;
|
|
|
+ }
|
|
|
+ ?>
|
|
|
+
|
|
|
+ <div class="bl">
|
|
|
+ <div class="field">Result:</div>
|
|
|
+ <div class="value" style="color: <?=$pass_colour?>">
|
|
|
+ <strong><?=htmlspecialchars($test->getPassText())?></strong>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div>
|
|
|
+ <div class="field">ID Stage:</div>
|
|
|
+ <div class="value" style="color: <?=$challenge_colour?>">
|
|
|
+ <strong><?=htmlspecialchars($test->challenge_stage . " - " . $test->getChallengeStageText())?></strong>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <br />
|
|
|
+
|
|
|
+ <div>
|
|
|
+ <div style="color: green;">1: Challenge on entry</div>
|
|
|
+ <div style="color: green;">2: Challenge while browsing</div>
|
|
|
+ <div style="color: orange;">3: Challenge during play</div>
|
|
|
+ <div style="color: red;">4: Challenge on exit</div>
|
|
|
+ <div style="color: red;">5: No challenge</div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <br />
|
|
|
+
|
|
|
+ <div class="bl">
|
|
|
+ <div class="field">Eye Contact:</div>
|
|
|
+ <div class="value"><?=($test->challenger_eye_contact ? "Yes" : "No")?></div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div>
|
|
|
+ <strong>Description:</strong><br />
|
|
|
+ <?=TestPDF::getValueHtml($test->challenge_description)?>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <br />
|
|
|
+
|
|
|
+ <div class="subheader">
|
|
|
+ <strong>Play Details</strong>
|
|
|
+ </div>
|
|
|
+ <div class="wide-field-names">
|
|
|
+ <div class="bl">
|
|
|
+ <div class="field">Machine Played:</div>
|
|
|
+ <div class="value"><?=TestPDF::getValueHtml($values["play_machine"] ?? "")?></div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="bl">
|
|
|
+ <div class="field">Machine Position:</div>
|
|
|
+ <div class="value"><?=TestPDF::getValueHtml($values["play_machine_position"] ?? "")?></div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <?php
|
|
|
+ $value = $values["play_machine_line_of_sight"] ?? "";
|
|
|
+ if(strlen($value)) $value = $value ? "Yes" : "No";
|
|
|
+ ?>
|
|
|
+
|
|
|
+ <div class="bl">
|
|
|
+ <div class="field">Line of Sight of Bar:</div>
|
|
|
+ <div class="value"><?=TestPDF::getValueHtml($value)?></div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <?php
|
|
|
+ $play_jackpot = $values["play_jackpot"] ?? "";
|
|
|
+ if(!empty($play_jackpot)) {
|
|
|
+ $play_jackpot = "£" . number_format($play_jackpot, 2);
|
|
|
+ }
|
|
|
+ ?>
|
|
|
+
|
|
|
+ <div class="bl">
|
|
|
+ <div class="field">Jackpot Value:</div>
|
|
|
+ <div class="value"><?=TestPDF::getValueHtml($play_jackpot)?></div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <?php
|
|
|
+ $play_machine_stake = $values["play_machine_stake"] ?? "";
|
|
|
+ if(!empty($play_machine_stake)) {
|
|
|
+ $play_machine_stake = "£" . number_format($play_machine_stake, 2);
|
|
|
+ }
|
|
|
+ ?>
|
|
|
+
|
|
|
+ <div class="bl">
|
|
|
+ <div class="field">Stake Played:</div>
|
|
|
+ <div class="value"><?=TestPDF::getValueHtml($play_machine_stake)?></div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="bl">
|
|
|
+ <div class="field">Minutes Played:</div>
|
|
|
+ <div class="value"><?=TestPDF::getValueHtml($values["play_minutes"] ?? "")?></div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <?php
|
|
|
+ $play_spent = $values["play_spent"] ?? "";
|
|
|
+ if(!empty($play_spent)) $play_spent = "£" . number_format($play_spent, 2);
|
|
|
+ ?>
|
|
|
+
|
|
|
+ <div>
|
|
|
+ <div class="field">Amount Spent:</div>
|
|
|
+ <div class="value"><?=TestPDF::getValueHtml($play_spent)?></div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+</div>
|
|
|
+
|
|
|
+<div class="clear"></div>
|
|
|
+
|
|
|
+<br />
|
|
|
+
|
|
|
+<div>
|
|
|
+ <div class="subheader">
|
|
|
+ <strong>Additional Notes</strong>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <?=TestPDF::getValueHtml($test->additional_notes)?>
|
|
|
+</div>
|