Minor tweaks

This commit is contained in:
2014-06-30 17:40:26 +10:00
parent 53ea1fd2fe
commit ad131989b5
7 changed files with 91 additions and 35 deletions

View File

@@ -13,6 +13,7 @@ function booking_report_summary() {
$notpaid_counter = 0;
$waiting_counter = 0;
$notcoming_counter = 0;
$hosts_counter = 0;
$male_count = 0;
$female_count = 0;
$baptised_count = 0;
@@ -103,8 +104,8 @@ function booking_report_summary() {
$table_sort = $query->extend('TableSort')->orderbyHeader($header);
$result = $table_sort->execute();
foreach ($result as $person) {
foreach ($result as $person)
{
//$amount_owing = _booking_amount_owing($person->nid, 0, FALSE);
$amount_owing = _booking_amount_owing($person, 0, FALSE);
@@ -120,22 +121,22 @@ function booking_report_summary() {
//define the row for this person
$rows[] = array(
l(t('View !id', array('!id' => $person->nid)), t('node/!id', array('!id' => $person->nid))),
l(t('!first !last', array('!first' => ucwords($person->booking_firstname), '!last' => ucwords($person->booking_lastname))),
t('node/!id/edit', array('!id' => $person->nid))
),
_booking_status_generate($person->booking_status),
l(t('Groups'), t('admin/booking/!id/edit-studygroup', array('!id' => $person->nid))),
l(t('Room'), t('admin/booking/!id/edit-room', array('!id' => $person->nid))),
$travel_link,
t('!email', array('!email' => $person->booking_email)),
t('!payment', array('!payment' => $person->booking_amount_paid)),
t('!payment', array('!payment' => $amount_owing == 0 ? $person->booking_total_pay_reqd : _booking_total_due($person))),
t('!fullypaid', array('!fullypaid' => $amount_owing == 0 ? 'Yes' : 'No')),
t('!reqd', array('!reqd' => $person->booking_refund_processed == 'Y' ? 'Yes' : 'No')),
t('!payment', array('!payment' => $person->booking_refund_due)),
t($person->booking_welfare_required == 'Y' ? 'Yes' : 'No'),
t($person->booking_committee_member == 'Y' ? 'Yes' : 'No'),
l(t('View !id', array('!id' => $person->nid)), t('node/!id', array('!id' => $person->nid))),
l(t('!first !last', array('!first' => ucwords($person->booking_firstname), '!last' => ucwords($person->booking_lastname))),
t('node/!id/edit', array('!id' => $person->nid))
),
_booking_status_generate($person->booking_status),
l(t('Groups'), t('admin/booking/!id/edit-studygroup', array('!id' => $person->nid))),
l(t('Room'), t('admin/booking/!id/edit-room', array('!id' => $person->nid))),
$travel_link,
t('!email', array('!email' => $person->booking_email)),
t('!payment', array('!payment' => $person->booking_amount_paid)),
t('!payment', array('!payment' => $amount_owing == 0 ? $person->booking_total_pay_reqd : _booking_total_due($person))),
t('!fullypaid', array('!fullypaid' => $amount_owing == 0 ? 'Yes' : 'No')),
t('!reqd', array('!reqd' => $person->booking_refund_processed == 'Y' ? 'Yes' : 'No')),
t('!payment', array('!payment' => $person->booking_refund_due)),
t($person->booking_welfare_required == 'Y' ? 'Yes' : 'No'),
t($person->booking_committee_member == 'Y' ? 'Yes' : 'No'),
);
//add up the total paid
$total_paid += $person->booking_amount_paid;
@@ -158,6 +159,8 @@ function booking_report_summary() {
$bookedin_counter++;
elseif ($person->booking_status == 2)
$waiting_counter++;
elseif ($person->booking_status == 5)
$hosts_counter++;
else
$notcoming_counter++;
@@ -210,10 +213,10 @@ function booking_report_summary() {
'!femaleaverage' => _booking_avg_age($female_dob_total, $female_count, $event->booking_event_start)
));
$output .= t("<h3>Overall</h3>");
$output .= t("<p>There are !bookedin registrations currently booked in, !waiting on waiting list, !notpaid haven't paid, " .
$output .= t("<p>There are !bookedin registrations currently booked in, !waiting on waiting list, !notpaid haven't paid, !hosts are hosts, " .
"and !notcoming are no longer coming, which comes to a total of !total people who have filled in the registration form. !travel people have filled in their travel form.</p>",
array('!bookedin' => $bookedin_counter, '!waiting' => $waiting_counter, '!notpaid' => $notpaid_counter, '!total' => $person_count, '!travel' => $travelform_count,
'!notcoming' => $notcoming_counter));
'!notcoming' => $notcoming_counter, '!hosts' => $hosts_counter));
$output .= t("<h3>Finances</h3>");
$output .= t("<p>There are !welfare people with special financial consideration approved, and !committee people on the committee. " .
"!fullypaid people have completed their payments.</p>",