Update _booking_amount_owing to use $person object instead of just a node id

This commit is contained in:
2014-05-14 18:04:29 +10:00
parent 71772edbd5
commit 0bfa363bcd
6 changed files with 38 additions and 30 deletions

View File

@@ -639,13 +639,15 @@ function booking_define_personspecific_tokens($node)
$tokens['dietary'] = ucwords(trim($node->booking_dietary));
$tokens['booking-id'] = $node->nid;
//$tokens['payment-required'] = $node->booking_total_pay_reqd - $amount_paid;
$tokens['payment-required'] = _booking_amount_owing($node->nid, $amount_paid, FALSE);
//$tokens['payment-required'] = _booking_amount_owing($node->nid, $amount_paid, FALSE);
$tokens['payment-required'] = _booking_amount_owing($node, $amount_paid, FALSE);
$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['paypal-total-amount'] = _booking_amount_owing($node->nid, $amount_paid);
$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);