Procházet zdrojové kódy

Fix alcohol counts

Alan Lam před 2 roky
rodič
revize
a4514455d8

+ 4 - 2
template_processing/age_verification_greene_king/reports_process_test.php

@@ -152,8 +152,10 @@ else if($test->challenge_stage === 5 || $test->void_primary) {
 	$data[$key]->barAgeVerificationCounts[$av_key]++;
 	$data[$key]->barAgeVerificationCounts[$av_key]++;
 	$total_data->barAgeVerificationCounts[$av_key]++;
 	$total_data->barAgeVerificationCounts[$av_key]++;
 
 
-	$alcohol_pass = (bool) ($test_values->alcohol_purchased ?? false);
-	$alcohol_key = ($alcohol_pass === false) ? "pass" : "fail";
+	$alcohol_purchased = (bool) ($test_values->alcohol_purchased ?? false);
+
+	$alcohol_pass = ($alcohol_purchased === false);
+	$alcohol_key = $alcohol_pass ? "pass" : "fail";
 
 
 	$data[$key]->barCounts[$alcohol_key]++;
 	$data[$key]->barCounts[$alcohol_key]++;
 	$total_data->barCounts[$alcohol_key]++;
 	$total_data->barCounts[$alcohol_key]++;