getConfiguration(); $values = $test->getValues(true); $get_test_details = static function(Test $test) use ($project, $location, $user): array { $test_details = []; $test_details["Project"] = sprintf('%s', $test->project_id, $project->getNameHtml()); $test_details["Status"] = "getStatusClass() . "\">" . $test->getStatusText() . ""; if($test->isVoid()) { $test_details["Result"] = "Void"; } else { $test_details["Result"] = "getPassClass() . "\">" . $test->getPassText() . ""; } $test_details["Location"] = "id\" target=\"_blank\">" . htmlspecialchars($location->name) . ""; $test_details["Address"] = htmlspecialchars($location->getDisplayAddress(["address_1", "address_2", "city", "postal_code"])); $previous_test = $test->getPreviousTest(); $next_test = $test->getNextTest(); if($previous_test) { $test_details["Previous Test"] = sprintf('%s', $previous_test->id, $previous_test->getProject()->getNameHtml()); } if($next_test) { $test_details["Next Test"] = sprintf('%s', $next_test->id, $next_test->getProject()->getNameHtml()); } if($test->dts_end) { $test_details = array_merge($test_details, [ "Duration" => $test->getDisplayDuration(), "Start" => Util::getDisplayDateTime(strtotime($test->dts_start . " UTC")), "End" => Util::getDisplayDateTime(strtotime($test->dts_end . " UTC")), ]); } if(in_array($test->getStatus(), [Test::STATUS_CANCELLED, Test::STATUS_COMPLETED], true)) { $test_details["Verified"] = Util::getDisplayDateTime(strtotime($test->dts_verified . " UTC")); $test_details["Retest"] = $test->retest ? "Yes" : "No"; } return $test_details; }; $tester_details = [ "Name" => "Unassigned" ]; if($tester) { $tester_details = [ "Name" => "id\" target=\"_blank\">" . $tester->getDisplayName() . "", "Date of Birth" => $tester->date_of_birth, "Gender" => $tester->getGenderText(), "Phone" => $tester->phone, "Score" => $tester->score, ]; $tester_invoice_details = [ "Status" => Test::getStatusTesterInvoiceText($test->status_tester_invoice), "Generated" => $test->dts_tester_invoice_generated ? Util::getDisplayDateTimeFromUTC($test->dts_tester_invoice_generated) : "N/A", "Paid" => $test->dts_tester_invoice_paid ? Util::getDisplayDateTimeFromUTC($test->dts_tester_invoice_paid) : "N/A", ]; if($test->test_travel_cost) { $tester_invoice_details["Travel Costs"] = "£" . number_format($test->test_travel_cost, 2); } else { $tester_invoice_details["Travel Costs"] = "N/A"; } if($test->test_travel_cost_description) { $tester_invoice_details["Travel Cost Description"] = htmlspecialchars($test->test_travel_cost_description); } else { $tester_invoice_details["Travel Cost Description"] = "N/A"; } if($test->hasTesterInvoicePDF()) { $tester_invoice_details["PDF"] = "id}/invoice\" target=\"_blank\">Download Invoice"; } if($test->hasTravelCostsPhoto()) { $tester_invoice_details["Photo"] = "id}/files/travel_costs\" target=\"_blank\">View Photo"; } } function render_card_list_group($details) { ?>
$html) { ?>

Edit/Verify Test

" />
Submitted Data
applyOverridesToField($field); if($field->type === "file") { $path = $test->getDirectory() . "/" . $field->name . ".jpg"; ?>
name)) { $name = $field->name; if(isset($test->$name)) $field->value = $test->$name; else if(isset($values[$name])) $field->value = $values[$name]; } $field->template = $template; Form::renderField($field); if($field->type === "header") { $header_count++; } } ?>

"checkbox", "name" => "void", "value" => $test->void, "label" => __("Void - All Tests / Venue Closed"), ]); if($config->hasAlcohol ?? false) { Form::renderField((object) [ "type" => "checkbox", "name" => "void_primary", "value" => $test->void_primary, "label" => __("Void - Gaming Test"), ]); Form::renderField((object) [ "type" => "checkbox", "name" => "void_secondary", "value" => $test->void_secondary, "label" => __("Void - Alcohol Test"), ]); } Form::renderField((object) [ "type" => "textarea", "name" => "void_notes", "label" => __("Void Notes"), "value" => $test->void_notes, "maxLength" => 65535, "helpText" => __("You must fill in this field if any part of the test was void."), ]); ?>
Info
stripe_invoice_id) { $stripe_details = []; $stripe_helper = StripeHelper::getInstance(); $stripe_invoice = $stripe_helper->createInvoice($test, "0.00"); $stripe_details["Invoice"] = sprintf("View", htmlspecialchars($stripe_invoice->hosted_invoice_url)); $status_class = "badge-secondary"; $status_text = __("N/A"); switch($stripe_invoice->status) { case "draft": { $status_class = "badge-warning"; $status_text = __("Draft"); break; } case "open": { $status_class = "badge-danger"; $status_text = __("Open"); break; } case "paid": { $status_class = "badge-success"; $status_text = __("Paid"); break; } case "uncollectible": { $status_text = __("Uncollectible"); break; } case "void": $status_text = __("Void"); break; } $stripe_details["Status"] = sprintf("%s", $status_class, $status_text); ?>
Stripe
Tester
Tester Invoice
getTesterInvoiceStatus() === Test::STATUS_TESTER_INVOICE_PENDING) { ?>
verifier_id && $test->dts_verified) { $verifier = $test->getVerifier(); $time_verified = CarbonImmutable::parse($test->dts_verified, "UTC")->getTimestamp(); ?>
getDisplayName())?>
getVerifierNotesHtml()?>
Verification
getDisplayName())?>

hasPassFail()) { ?>
£
£
£
retest)?> />
isBillingEnabled()) { if(!$location->email) { ?>
name))?>
getStatus() === Test::STATUS_PENDING_VERIFICATION) { ?>
email_after_test; $location_checked = $customer->email_locations_after_test; $email_address_configs = [ ["email" => $customer->email, "label" => "Email Headquarters", "name" => "email_customer", "checked" => $customer_checked], ["email" => $location->email, "label" => "Email Venue", "name" => "email_location", "checked" => $location_checked], ["email" => $location->area_manager_email, "label" => "Email AM", "name" => "email_location_area_manager", "checked" => $location_checked], ["email" => $location->operations_manager_email, "label" => "Email OM", "name" => "email_location_operations_manager", "checked" => $location_checked], ["email" => $location->gaming_manager_email, "label" => "Email GM", "name" => "email_location_gaming_manager", "checked" => $location_checked], ["email" => $location->senior_gaming_manager_email, "label" => "Email SGM", "name" => "email_location_senior_gaming_manager", "checked" => $location_checked], ]; foreach($email_address_configs as $email_address_config) { $email_address = $email_address_config["email"]; if(!$email_address) { continue; } $label = $email_address_config["label"]; $name = $email_address_config["name"]; $checked = $email_address_config["checked"]; $id = str_replace("_", "-", $name); ?>
/>
getStatus() === Test::STATUS_PENDING_VERIFICATION) { ?>
getPreviousTest(); if($previous_test) { $dt = $previous_test->getDateTimeStart(); $previous_test_details = $get_test_details($previous_test); $previous_test_details_subset = [ "Date/Time" => $previous_test_details["Start"] ?? "", "Result" => $previous_test_details["Result"] ?? "", ]; ?>