diff --git a/booking.paypal.inc b/booking.paypal.inc
index 84d4bba..1850b62 100644
--- a/booking.paypal.inc
+++ b/booking.paypal.inc
@@ -228,7 +228,11 @@ function _booking_process_payment($data) {
->execute();
//send an email
- _booking_registration_email($payment->booking_partner_id, $balance_payment);
+ _booking_registration_email($payment->booking_partner_id, $balance_payment);
+ }
+ elseif (variable_get('booking_enable_combined_pricing', 0) == 1)
+ {
+ watchdog('booking', 'Combined pricing is enabled, but this person has a partner id of !id.', array('!id' => $payment->booking_partner_id));
} //end spouse check
}
else //this person still has an outstanding balance so just send a confirmation email
diff --git a/booking.reports.inc b/booking.reports.inc
index 6bf57bc..fc19275 100644
--- a/booking.reports.inc
+++ b/booking.reports.inc
@@ -21,8 +21,12 @@ function booking_report_summary() {
$male_dob_total = 0;
$female_dob_total = 0;
$person_count = 0;
+ $welfare_count = 0;
+ $fullypaid_count = 0;
$stats_attributes = array('style' => 'max-width:30%');
+
+ //TODO: add count of welfare people, and number of people fully paid
//define sorting information with the header
//as per http://www.drup-all.com/blog/table-sort-pagination-drupal-7
@@ -123,13 +127,30 @@ function booking_report_summary() {
t($person->booking_welfare_required == 'Y' ? 'Yes' : 'No'),
);
$total_paid += $person->booking_amount_paid;
-
+
+ //booking status
if ($person->booking_status == 0)
$notpaid_counter++;
elseif ($person->booking_status == 1)
$bookedin_counter++;
elseif ($person->booking_status == 2)
- $waiting_counter++;
+ $waiting_counter++;
+
+ //welfare
+ if ($person->booking_welfare_required == 'Y')
+ $welfare_count++;
+
+ //fully paid?
+ if ($person->booking_amount_paid >= $person->booking_total_pay_reqd || $person->booking_total_pay_reqd == "0.00")
+ {
+ //watchdog('booking', "Fully paid person, ID !id (!first !last)", array('!id' => $person->nid,'!first' => ucwords($person->booking_firstname), '!last' => ucwords($person->booking_lastname)));
+ $fullypaid_count++;
+ }
+ elseif ($person->booking_partner_id > 0 && _booking_amount_owing($person->nid) == 0)
+ {
+ //watchdog('booking', "Fully paid married person, ID !id (!first !last)", array('!id' => $person->nid,'!first' => ucwords($person->booking_firstname), '!last' => ucwords($person->booking_lastname)));
+ $fullypaid_count++;
+ }
}
//output everything
@@ -141,8 +162,11 @@ function booking_report_summary() {
array('!average' => _booking_avg_age($dob_total, $person_count, $event->booking_event_start), '!maleaverage' => _booking_avg_age($male_dob_total, $male_count, $event->booking_event_start),
'!femaleaverage' => _booking_avg_age($female_dob_total, $female_count, $event->booking_event_start)
));
- $output .= t("There are !bookedin registrations currently booked in, !waiting on waiting list, and !notpaid haven't paid, which comes to a total of !total people who have filled in the registration form.
",
+ $output .= t("There are !bookedin registrations currently booked in, !waiting on waiting list, and !notpaid haven't paid, which comes to a total of !total people who have filled in the registration form.
There are !welfare people with special financial consideration approved. !fullypaid people have completed their payments.
",
+ array('!welfare' => $welfare_count, '!fullypaid' => $fullypaid_count
+ ));
$output .= t("Total amount paid: $!paid