tidy up some code locations
This commit is contained in:
@@ -626,34 +626,46 @@ function booking_define_personspecific_tokens($node)
|
||||
//if paypal is enabled
|
||||
if ($payment_processor_type == 0) {
|
||||
$tokens['paypal-deposit-amount'] = _booking_deposit_amount($node, TRUE);
|
||||
$tokens['paypal-total-amount'] = _booking_amount_owing($node, $amount_paid);
|
||||
$tokens['paypal-total-amount'] = _booking_amount_owing($node, $amount_paid);
|
||||
$tokens['stripe-deposit-amount'] = "";
|
||||
$tokens['stripe-total-amount'] = "";
|
||||
$tokens['stripe-total-intl'] = "";
|
||||
}
|
||||
//if stripe is enabled
|
||||
elseif ($payment_processor_type == 1) {
|
||||
//@todo remove the paypal tokens from here
|
||||
$tokens['paypal-deposit-amount'] = _booking_deposit_amount($node, TRUE);
|
||||
$tokens['paypal-total-amount'] = _booking_amount_owing($node, $amount_paid);
|
||||
$tokens['paypal-deposit-amount'] = "";
|
||||
$tokens['paypal-total-amount'] = "";
|
||||
$tokens['stripe-deposit-amount'] = _booking_deposit_amount($node, TRUE);
|
||||
$tokens['stripe-total-amount'] = _booking_amount_owing($node, $amount_paid, TRUE, FALSE);
|
||||
$tokens['stripe-total-intl'] = _booking_amount_owing($node, $amount_paid, TRUE, TRUE);
|
||||
}
|
||||
|
||||
//if travelform is enabled
|
||||
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);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$tokens['travel-link'] = "";
|
||||
$tokens['travel-summary'] = "";
|
||||
}
|
||||
//if studygroups are enabled
|
||||
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)
|
||||
{
|
||||
else {
|
||||
$tokens['studygroup-summary'] = "";
|
||||
$tokens['leaderhelper-pair'] = "";
|
||||
}
|
||||
//if room allocations are enabled
|
||||
if (variable_get('booking_enable_roomallocations', 0) == 1) {
|
||||
$tokens['room-allocation'] = _booking_room_email_summary($node);
|
||||
$tokens['bed-type'] = _booking_room_bedtype_lookup(empty($node->booking_room_bedtype) ? '0' : $node->booking_room_bedtype);
|
||||
}
|
||||
else {
|
||||
$tokens['room-allocation'] = "";
|
||||
$tokens['bed-type'] = "";
|
||||
}
|
||||
//watchdog('booking_debug', "<pre>Person specific tokens:\n@info</pre>", array('@info' => print_r( $tokens, true)));
|
||||
return $tokens;
|
||||
}
|
||||
|
Reference in New Issue
Block a user