소스 검색

Fix alcohol counts

Alan Lam 2 년 전
부모
커밋
a4514455d8
1개의 변경된 파일과 4개의 추가작업 그리고 2개의 파일을 삭제
  1. 4 2
      template_processing/age_verification_greene_king/reports_process_test.php

+ 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]++;
 	$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]++;
 	$total_data->barCounts[$alcohol_key]++;