From a2542c02e4ccba8cbc57016024fd335f6b855a71 Mon Sep 17 00:00:00 2001 From: Nathan Coad Date: Mon, 16 Jul 2018 17:36:22 +1000 Subject: [PATCH] try everything as a string --- booking.reports.inc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/booking.reports.inc b/booking.reports.inc index c089df0..afbe912 100644 --- a/booking.reports.inc +++ b/booking.reports.inc @@ -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', "
CSV report headers\n@info
", array('@info' => print_r($header_array, true)));