Alan Lam 2 лет назад
Родитель
Сommit
a954daf468

+ 8 - 4
template_processing/age_verification_greene_king/project_account_csv.php

@@ -17,8 +17,8 @@ $field_names = [
 	"Date",
 	"Test ID",
 	"Test Cost",
-	"Play Cost",
 	"Bar Cost",
+	"Test + Bar Cost",
 ];
 
 fputcsv($handle, $field_names);
@@ -29,15 +29,19 @@ foreach($tests as $test) {
 
 	$values = $test->getValues(true);
 
+	$test_cost = $test->getCustomerFee();
+	$bar_cost = bcadd($values["bar_expenditure"] ?? "0.00", 0, 2);
+	$test_and_bar_cost = bcadd($test_cost, $bar_cost, 2);
+
 	$output = [];
 	$output[] = $location->internal_id;
 	$output[] = $location->name;
 	$output[] = $template->name;
 	$output[] = $test->getDateTimeStart()->format("d/m/Y");
 	$output[] = $test->id;
-	$output[] = $test->getCustomerFee();
-	$output[] = bcadd($values["play_spent"] ?? "0.00", 0, 2);
-	$output[] = bcadd($values["bar_expenditure"] ?? "0.00", 0, 2);
+	$output[] = $test_cost;
+	$output[] = $bar_cost;
+	$output[] = $test_and_bar_cost;
 
 	fputcsv($handle, $output);
 }