Setting event price to active now updates event id for that price

This commit is contained in:
2015-07-21 23:14:49 +10:00
parent 8d8f080338
commit 7f5237a195
2 changed files with 5 additions and 4 deletions

View File

@@ -77,7 +77,7 @@ function booking_price_admin()
} }
function booking_price_admin_submit($form, &$form_state) { function booking_price_admin_submit($form, &$form_state) {
global $event;
$checkboxes = $form_state['values']['table']; //$values['booking_price_active']; $checkboxes = $form_state['values']['table']; //$values['booking_price_active'];
//watchdog('booking', 'Formstate when setting buttons: @info', array ('@info' => var_export($form_state['values'], TRUE))); //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') db_update('booking_price')
->fields(array ( ->fields(array (
'booking_eventid' => $event->eid,
'booking_price_active' => $setting, 'booking_price_active' => $setting,
)) ))
->condition('pid', $key) ->condition('pid', $key)

View File

@@ -61,7 +61,7 @@ function booking_report_summary() {
$rows = array(); $rows = array();
//the state summary table //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_rows = array();
$state_statistics = 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); $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); $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', "<pre>State statistics:\n@info</pre>", array('@info' => print_r( $data, true))); //watchdog('booking', "<pre>State statistics:\n@info</pre>", array('@info' => print_r( $data, true)));
$state_rows[] = $data; $state_rows[] = $data;
} }
@@ -429,7 +429,7 @@ function booking_coming_page() {
global $event; global $event;
$output = ""; $output = "";
$table = ""; $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'); $booking_limit = variable_get('booking_regn_limit','350');
$rows = array(); $rows = array();