diff --git a/booking.prices.inc b/booking.prices.inc index 0327bd2..f4f7ffd 100644 --- a/booking.prices.inc +++ b/booking.prices.inc @@ -77,7 +77,7 @@ function booking_price_admin() } function booking_price_admin_submit($form, &$form_state) { - + global $event; $checkboxes = $form_state['values']['table']; //$values['booking_price_active']; //watchdog('booking', 'Formstate when setting buttons: @info', array ('@info' => var_export($form_state['values'], TRUE))); @@ -94,6 +94,7 @@ function booking_price_admin_submit($form, &$form_state) { db_update('booking_price') ->fields(array ( + 'booking_eventid' => $event->eid, 'booking_price_active' => $setting, )) ->condition('pid', $key) diff --git a/booking.reports.inc b/booking.reports.inc index 5daf1cf..1f0ad4c 100644 --- a/booking.reports.inc +++ b/booking.reports.inc @@ -61,7 +61,7 @@ function booking_report_summary() { $rows = array(); //the state summary table - $state_header = array('State', 'Count', 'Males', 'Male Average Age', 'Females', 'Female Average Age', 'Overall Average Age', 'Baptised'); + $state_header = array('State', 'Count', 'Males', 'Females', 'Baptised', 'Male Average Age', 'Female Average Age', 'Overall Average Age'); $state_rows = array(); $state_statistics = array(); @@ -259,7 +259,7 @@ function booking_report_summary() { $female_average_age = _booking_avg_age($value->female_avg, $value->female_count, $event->booking_event_start); $state_average_age = _booking_avg_age($value->female_avg + $value->male_avg, $value->female_count + $value->male_count, $event->booking_event_start); - $data = array($key, $value->total_count, $value->male_count, $male_average_age, $value->female_count, $female_average_age, $state_average_age, $value->baptised_count); + $data = array($key, $value->total_count, $value->male_count, $value->female_count, $value->baptised_count, $male_average_age, $female_average_age, $state_average_age); //watchdog('booking', "
State statistics:\n@info", array('@info' => print_r( $data, true))); $state_rows[] = $data; } @@ -429,7 +429,7 @@ function booking_coming_page() { global $event; $output = ""; $table = ""; - $attributes = array('style' => 'width:50%; margin-left:25%; margin-right:25%;'); + $attributes = array('style' => 'width:50%;/* margin-left:25%; margin-right:25%;*/'); $booking_limit = variable_get('booking_regn_limit','350'); $rows = array();