Included processed date in csv report
This commit is contained in:
@@ -372,6 +372,9 @@ function booking_csv_report() {
|
|||||||
if (in_array($key, $fields_to_skip))
|
if (in_array($key, $fields_to_skip))
|
||||||
continue;
|
continue;
|
||||||
$header_array[] = $key;
|
$header_array[] = $key;
|
||||||
|
//add in a special column for a processed version of the date of birth
|
||||||
|
if (strcmp($key,"booking_dob") == 0)
|
||||||
|
$header_array[] = "booking_dob_processed";
|
||||||
}
|
}
|
||||||
|
|
||||||
$header = implode( $delimiter, $header_array );
|
$header = implode( $delimiter, $header_array );
|
||||||
@@ -396,10 +399,15 @@ function booking_csv_report() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//handle dates
|
//handle dates
|
||||||
if ($key == 'booking_dob' || $key == 'booking_passport_expiry_date') {
|
if ($key == 'booking_dob') {
|
||||||
$output[] = format_date($value, 'custom', 'd/m/Y');
|
$output[] = format_date($value, 'custom', 'd/m/Y');
|
||||||
|
$output[] = '"' . _booking_avg_age($value, 1, $event->booking_event_start) . '"';
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if ($key == 'booking_passport_expiry_date') {
|
||||||
|
$output[] = format_date($value, 'custom', 'd/m/Y');
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
//handle more exact dates
|
//handle more exact dates
|
||||||
if ($key == 'booking_timestamp') {
|
if ($key == 'booking_timestamp') {
|
||||||
|
Reference in New Issue
Block a user