Fixes for values not set at initial registration form

This commit is contained in:
2015-03-09 15:32:05 +11:00
parent aad31946c6
commit a38d42b489
3 changed files with 57 additions and 46 deletions

View File

@@ -676,7 +676,7 @@ function booking_define_personspecific_tokens($node)
//get a count of the total number of people booked in to this event
//but don't include people who haven't paid or have withdrawn their booking
$result = db_query("SELECT count(*) as num_ppl FROM {booking_person} where booking_event_id = :eventid and (booking_status = 1 or booking_status = 2)",
array(':eventid' => $event->eid))
array(':eventid' => $event->eid))
->fetchObject();
//calcalate a new temp id to be configured for this user if required
@@ -712,20 +712,24 @@ function booking_define_personspecific_tokens($node)
$tokens['waitinglist-position'] = $result->num_ppl - variable_get('booking_regn_limit',350) + 1;
$tokens['payment-transaction-desc'] = $node->nid . ' ' . $node->booking_lastname;
$tokens['balance-payment-link'] = url('balance/' . $tempid, array('absolute' => TRUE));
$tokens['confirm-payment-link'] = url('confirm/' . $tempid, array('absolute' => TRUE));
$tokens['travel-link'] = url('travel/' . $tempid, array('absolute' => TRUE));
$tokens['confirm-payment-link'] = url('confirm/' . $tempid, array('absolute' => TRUE));
$tokens['paypal-total-amount'] = _booking_amount_owing($node, $amount_paid);
//$tokens['paypal-total-amount'] = _booking_amount_owing($node->nid, $amount_paid);
$tokens['paypal-deposit-amount'] = _booking_deposit_amount();
$tokens['regn-summary'] = _booking_details_email_summary($node);
$tokens['travel-summary'] = _booking_travelform_email_summary($node);
$tokens['studygroup-summary'] = _booking_studygroup_email_summary($node);
$tokens['leaderhelper-pair'] = _booking_leader_helper_email_summary($node);
$tokens['regn-summary'] = _booking_details_email_summary($node);
if (variable_get('booking_enable_travelform', 0) == 1) {
$tokens['travel-link'] = url('travel/' . $tempid, array('absolute' => TRUE));
$tokens['travel-summary'] = _booking_travelform_email_summary($node);
}
if (variable_get('booking_enable_studygroups', 0) == 1) {
$tokens['studygroup-summary'] = _booking_studygroup_email_summary($node);
$tokens['leaderhelper-pair'] = _booking_leader_helper_email_summary($node);
}
if (variable_get('booking_enable_roomallocations', 0) == 1)
{
$tokens['room-allocation'] = _booking_room_email_summary($node);
$tokens['bed-type'] = _booking_room_bedtype_lookup($node->booking_room_bedtype);
$tokens['bed-type'] = _booking_room_bedtype_lookup(empty($node->booking_room_bedtype) ? '0' : $node->booking_room_bedtype);
}
return $tokens;