Numerous changes. Travel form, CSV report etc
This commit is contained in:
@@ -36,7 +36,7 @@ function booking_report_summary() {
|
||||
array('data' => t('Name'), 'field' => 'booking_lastname'),
|
||||
array('data' => t('Email'), 'field' => 'booking_email'),
|
||||
array('data' => t('Payment To Date'), 'field' => 'booking_amount_paid'),
|
||||
array('data' => t('Total Payment Required'), 'field' => 'booking_total_pay_reqd'),
|
||||
array('data' => t('Total Payment Required')),
|
||||
array('data' => t('Fully paid?')),
|
||||
array('data' => t('Welfare Required?'), 'field' => 'booking_welfare_required'),
|
||||
);
|
||||
@@ -93,7 +93,7 @@ function booking_report_summary() {
|
||||
|
||||
foreach ($result as $person) {
|
||||
|
||||
$amount_owing = _booking_amount_owing($person->nid);
|
||||
$amount_owing = _booking_amount_owing($person->nid, 0, FALSE);
|
||||
|
||||
$rows[] = array(
|
||||
l(t('!id', array('!id' => $person->nid)), t('node/!id', array('!id' => $person->nid))),
|
||||
@@ -103,7 +103,7 @@ function booking_report_summary() {
|
||||
),
|
||||
t('!email', array('!email' => $person->booking_email)),
|
||||
t('!payment', array('!payment' => $person->booking_amount_paid)),
|
||||
t('!payment', array('!payment' => $person->booking_total_pay_reqd)),
|
||||
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($person->booking_welfare_required == 'Y' ? 'Yes' : 'No'),
|
||||
);
|
||||
@@ -509,7 +509,10 @@ function booking_csv_report() {
|
||||
if ($key == 'nid')
|
||||
{
|
||||
$output[] = $value;
|
||||
$output[] = _booking_amount_owing($value);
|
||||
//this is really hacky since it does another massive database query for each person
|
||||
//$person = node_load($value);
|
||||
$output[] = _booking_amount_owing($value, 0, FALSE);
|
||||
//$output[] = _booking_amount_owing($value);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user