try everything as a string

This commit is contained in:
Nathan Coad
2018-07-16 17:36:22 +10:00
parent 5c00b5a345
commit a2542c02e4

View File

@@ -732,7 +732,7 @@ function booking_csv_report() {
$date_fields = array('booking_dob');
$datetime_fields = array('booking_outflight_origin_ts', 'booking_outflight_destination_ts', 'booking_rtrnflight_origin_ts',
'booking_rtrnflight_destination_ts', 'booking_timestamp', 'booking_flight_datetime_inbound', 'booking_flight_datetime_outbound');
$number_only_fields = array('booking_postcode', 'booking_mobile', 'booking_phone', 'booking_guardian_phone', 'booking_guardian_phone_alt');
$number_only_fields = array('booking_postcode', 'booking_mobile', 'booking_phone', 'booking_guardian_phone', 'booking_guardian_phone_alt', 'booking_price');
//look up the titles of the study groups and add to array for updating in the header
$studygroups_query = db_query("SELECT * FROM {booking_studygroup_list} WHERE booking_eventid = :eid",
@@ -772,7 +772,7 @@ function booking_csv_report() {
$header_array[$heading] = 'string';
continue;
}
/*
// Apply data formatting as per https://github.com/mk-j/PHP_XLSXWriter
if (in_array($key, $datetime_fields)) {
// 11/09/2015 22:05
@@ -788,6 +788,9 @@ function booking_csv_report() {
else {
$header_array[$key] = 'string';
}
*/
$header_array[$key] = 'string';
//add in a special column for a processed version of the date of birth
if (strcmp($key,"booking_dob") == 0) {
@@ -798,6 +801,7 @@ function booking_csv_report() {
$header_array["booking_amount_owing_gross"] = 'dollar';
$header_array["booking_amount_owing_net"] = 'dollar';
}
}
watchdog('booking_debug', "<pre>CSV report headers\n@info</pre>", array('@info' => print_r($header_array, true)));