Capitalisation to registration insert, sorting criteria for booking summary report
This commit is contained in:
@@ -44,21 +44,22 @@ function booking_report_summary() {
|
||||
|
||||
|
||||
//bookings by ecclesia
|
||||
$ecclesia_heaeder = array('Ecclesia', 'Count');
|
||||
$ecclesia_heaeder = array('State','Ecclesia', 'Count');
|
||||
$ecclesia_rows = array();
|
||||
$query = db_select('booking_person', 'p')
|
||||
->fields('p', array('booking_ecclesia'))
|
||||
->fields('p', array('booking_ecclesia','booking_state'))
|
||||
->condition('p.booking_event_id', $event->eid, '=');
|
||||
$query->groupBy('p.booking_ecclesia');
|
||||
$query->addExpression('COUNT(p.booking_ecclesia)', 'ecclesia_count');
|
||||
$query->orderBy('booking_state')
|
||||
->orderBy('ecclesia_count','DESC');
|
||||
$stats = $query->execute();
|
||||
|
||||
foreach ($stats as $ecclesia) {
|
||||
$ecclesia_rows[] = array($ecclesia->booking_ecclesia, $ecclesia->ecclesia_count);
|
||||
$ecclesia_rows[] = array($ecclesia->booking_state,$ecclesia->booking_ecclesia, $ecclesia->ecclesia_count);
|
||||
}
|
||||
|
||||
//more detailed summary
|
||||
$output .= t("<p>The following table presents a summary of payments that have been made for !event.</p>", array('!event' => $event->booking_eventname));
|
||||
foreach ($result as $person) {
|
||||
$rows[] = array(
|
||||
l(t('!id', array('!id' => $person->nid)), t('node/!id', array('!id' => $person->nid))),
|
||||
@@ -82,6 +83,7 @@ function booking_report_summary() {
|
||||
$output .= theme('table', array('header' => $state_header, 'rows' => $state_rows, 'attributes' => $stats_attributes));
|
||||
$output .= t("<p>Bookings by ecclesia</p>");
|
||||
$output .= theme('table', array('header' => $ecclesia_heaeder, 'rows' => $ecclesia_rows, 'attributes' => $stats_attributes));
|
||||
$output .= t("<p>The following table presents a summary of payments that have been made for !event.</p>", array('!event' => $event->booking_eventname));
|
||||
$output .= theme('table', array('header' => $header, 'rows' => $rows));
|
||||
$output .= t("<p>Total of !bookedin registrations currently booked in, !waiting on waiting list, and !notpaid haven't paid.</p>",
|
||||
array('!bookedin' => $bookedin_counter, '!waiting' => $waiting_counter, '!notpaid' => $notpaid_counter));
|
||||
|
Reference in New Issue
Block a user