more testing
This commit is contained in:
@@ -1610,6 +1610,7 @@ function _booking_travelform_email_summary($node) {
|
|||||||
function _booking_readinggroup_email_listing($node) {
|
function _booking_readinggroup_email_listing($node) {
|
||||||
global $event;
|
global $event;
|
||||||
$rows = array();
|
$rows = array();
|
||||||
|
$header = array("First Name", "Last Name", "Phone Number");
|
||||||
|
|
||||||
//display study session data if enabled
|
//display study session data if enabled
|
||||||
if (variable_get('booking_enable_studygroups', 0) == 0) {
|
if (variable_get('booking_enable_studygroups', 0) == 0) {
|
||||||
@@ -1632,7 +1633,14 @@ function _booking_readinggroup_email_listing($node) {
|
|||||||
|
|
||||||
//check that this reading group session has been defined for this attendee and that they're a leader
|
//check that this reading group session has been defined for this attendee and that they're a leader
|
||||||
if (!empty($node->$sessionid) && $node->$roleid == 1) {
|
if (!empty($node->$sessionid) && $node->$roleid == 1) {
|
||||||
watchdog('booking_debug', "<pre>Person is a leader of reading group \n@info</pre>", array('@info' => print_r($readinggroup, true)));
|
watchdog('booking_debug', "<pre>Person is a leader of reading group @id \n@info</pre>",
|
||||||
|
array('@id' => $node->$sessionid, '@info' => print_r($readinggroup, true)));
|
||||||
|
|
||||||
|
$member_query = db_query("SELECT * FROM {booking_person_view} WHERE $sessionid = :sid ", array(':sid' => $node->$sessionid))->fetchAllAssoc('nid');
|
||||||
|
watchdog('booking_debug', "<pre>Other people in reading group @id \n@info</pre>",
|
||||||
|
array('@id' => $node->$sessionid, '@info' => print_r($member_query, true)));
|
||||||
|
|
||||||
|
//theme('table', array('header' => $state_header, 'rows' => $state_rows));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -38,12 +38,11 @@ function booking_report_summary() {
|
|||||||
$header[] = array('data' => t('Name'), 'field' => 'booking_lastname');
|
$header[] = array('data' => t('Name'), 'field' => 'booking_lastname');
|
||||||
$header[] = array('data' => t('Booking Status'), 'field' => 'booking_status');
|
$header[] = array('data' => t('Booking Status'), 'field' => 'booking_status');
|
||||||
|
|
||||||
if (variable_get('booking_enable_studygroups', 0) == 1)
|
// Add some optional columns
|
||||||
{
|
if (variable_get('booking_enable_studygroups', 0) == 1) {
|
||||||
$header[] = array('data' => t('Studygroups'));
|
$header[] = array('data' => t('Studygroups'));
|
||||||
}
|
}
|
||||||
if (variable_get('booking_enable_roomallocations', 0) == 1)
|
if (variable_get('booking_enable_roomallocations', 0) == 1) {
|
||||||
{
|
|
||||||
$header[] = array('data' => t('Room'));
|
$header[] = array('data' => t('Room'));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -141,8 +140,7 @@ function booking_report_summary() {
|
|||||||
$table_sort = $query->extend('TableSort')->orderbyHeader($header);
|
$table_sort = $query->extend('TableSort')->orderbyHeader($header);
|
||||||
$result = $table_sort->execute();
|
$result = $table_sort->execute();
|
||||||
|
|
||||||
foreach ($result as $person)
|
foreach ($result as $person) {
|
||||||
{
|
|
||||||
$this_row = array();
|
$this_row = array();
|
||||||
//$amount_owing = _booking_amount_owing($person->nid, 0, FALSE);
|
//$amount_owing = _booking_amount_owing($person->nid, 0, FALSE);
|
||||||
$amount_owing = _booking_amount_owing($person, 0, FALSE);
|
$amount_owing = _booking_amount_owing($person, 0, FALSE);
|
||||||
@@ -162,12 +160,10 @@ function booking_report_summary() {
|
|||||||
);
|
);
|
||||||
$this_row[] = _booking_status_generate($person->booking_status);
|
$this_row[] = _booking_status_generate($person->booking_status);
|
||||||
|
|
||||||
if (variable_get('booking_enable_studygroups', 0) == 1)
|
if (variable_get('booking_enable_studygroups', 0) == 1) {
|
||||||
{
|
|
||||||
$this_row[] = l(t('Groups'), t('admin/booking/!id/edit-studygroup-membership', array('!id' => $person->nid)));
|
$this_row[] = l(t('Groups'), t('admin/booking/!id/edit-studygroup-membership', array('!id' => $person->nid)));
|
||||||
}
|
}
|
||||||
if (variable_get('booking_enable_roomallocations', 0) == 1)
|
if (variable_get('booking_enable_roomallocations', 0) == 1) {
|
||||||
{
|
|
||||||
$this_row[] =l(t('Room'), t('admin/booking/!id/edit-room', array('!id' => $person->nid)));
|
$this_row[] =l(t('Room'), t('admin/booking/!id/edit-room', array('!id' => $person->nid)));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -187,39 +183,44 @@ function booking_report_summary() {
|
|||||||
$total_paid += $person->booking_amount_paid;
|
$total_paid += $person->booking_amount_paid;
|
||||||
|
|
||||||
//subtract any refund
|
//subtract any refund
|
||||||
if ($person->booking_refund_processed == 'Y' && $person->booking_refund_due > 0)
|
if ($person->booking_refund_processed == 'Y' && $person->booking_refund_due > 0) {
|
||||||
{
|
|
||||||
$total_refunds += $person->booking_refund_due;
|
$total_refunds += $person->booking_refund_due;
|
||||||
}
|
}
|
||||||
|
|
||||||
//travel form completed?
|
//travel form completed?
|
||||||
if (! empty($person->tid))
|
if (! empty($person->tid)) {
|
||||||
$travelform_count++;
|
$travelform_count++;
|
||||||
|
}
|
||||||
|
|
||||||
//booking status
|
//booking status
|
||||||
if ($person->booking_status == 0)
|
if ($person->booking_status == 0) {
|
||||||
$notpaid_counter++;
|
$notpaid_counter++;
|
||||||
elseif ($person->booking_status == 1)
|
}
|
||||||
|
elseif ($person->booking_status == 1) {
|
||||||
$bookedin_counter++;
|
$bookedin_counter++;
|
||||||
elseif ($person->booking_status == 2)
|
}
|
||||||
|
elseif ($person->booking_status == 2) {
|
||||||
$waiting_counter++;
|
$waiting_counter++;
|
||||||
elseif ($person->booking_status == 5)
|
}
|
||||||
|
elseif ($person->booking_status == 5) {
|
||||||
$hosts_counter++;
|
$hosts_counter++;
|
||||||
else
|
}
|
||||||
|
else {
|
||||||
$notcoming_counter++;
|
$notcoming_counter++;
|
||||||
|
}
|
||||||
|
|
||||||
//welfare
|
//welfare
|
||||||
if ($person->booking_welfare_required == 'Y')
|
if ($person->booking_welfare_required == 'Y') {
|
||||||
$welfare_count++;
|
$welfare_count++;
|
||||||
|
}
|
||||||
//committee?
|
//committee?
|
||||||
if ($person->booking_committee_member == 'Y')
|
if ($person->booking_committee_member == 'Y') {
|
||||||
$committee_count++;
|
$committee_count++;
|
||||||
|
}
|
||||||
//fully paid?
|
//fully paid?
|
||||||
if ($amount_owing == 0)
|
if ($amount_owing == 0) {
|
||||||
$fullypaid_count++;
|
$fullypaid_count++;
|
||||||
|
}
|
||||||
$person_count++;
|
$person_count++;
|
||||||
|
|
||||||
$state = strcmp($person->booking_country,'Australia') == 0 ? $person->booking_state : 'International';
|
$state = strcmp($person->booking_country,'Australia') == 0 ? $person->booking_state : 'International';
|
||||||
@@ -230,13 +231,13 @@ function booking_report_summary() {
|
|||||||
$dob_total += $person->booking_dob;
|
$dob_total += $person->booking_dob;
|
||||||
|
|
||||||
//store data for average ages per gender and state
|
//store data for average ages per gender and state
|
||||||
if ($person->booking_gender == 'M')
|
if ($person->booking_gender == 'M') {
|
||||||
{
|
|
||||||
$male_count++;
|
$male_count++;
|
||||||
$male_dob_total += $person->booking_dob;
|
$male_dob_total += $person->booking_dob;
|
||||||
$state_statistics[$state]->male_avg += $person->booking_dob;
|
$state_statistics[$state]->male_avg += $person->booking_dob;
|
||||||
$state_statistics[$state]->male_count++;
|
$state_statistics[$state]->male_count++;
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$female_count++;
|
$female_count++;
|
||||||
$female_dob_total += $person->booking_dob;
|
$female_dob_total += $person->booking_dob;
|
||||||
$state_statistics[$state]->female_avg += $person->booking_dob;
|
$state_statistics[$state]->female_avg += $person->booking_dob;
|
||||||
|
Reference in New Issue
Block a user