Fixed bug in manual payment with a waiting list
This commit is contained in:
@@ -192,7 +192,7 @@ function _booking_partialbalance_payment_email($nid)
|
||||
|
||||
//calculate the remaining parameters
|
||||
$to = $node->booking_email;
|
||||
$subject = t('!event Partial Payment Required', array('!event' => $event->booking_eventname));
|
||||
$subject = t('!event Partial Payment Received', array('!event' => $event->booking_eventname));
|
||||
$params['subject'] = $subject;
|
||||
$params['headers']['Bcc'] = "it@coadcorp.com, " . variable_get('booking_notify_email', variable_get('site_mail', ini_get('sendmail_from')));
|
||||
|
||||
|
@@ -150,11 +150,25 @@ function booking_manual_payment_admin_submit($form, &$form_state) {
|
||||
//add this payment to their existing balance
|
||||
$total_paid = $person->booking_amount_paid + $price;
|
||||
|
||||
//work out what their booking status is now
|
||||
if ($person->booking_status == 1 || _booking_check_bookings_full() == FALSE)
|
||||
{
|
||||
//either they were already booked in, or there is room on the booked-in list
|
||||
$status = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
//there must be a waiting list, so put them on that
|
||||
$status = 2;
|
||||
}
|
||||
|
||||
/*
|
||||
//determine what their booking status is now
|
||||
if (_booking_check_bookings_full() == True || $person->booking_status == 2)
|
||||
$status = 2;
|
||||
else
|
||||
$status = 1;
|
||||
*/
|
||||
|
||||
watchdog('booking', 'Setting payment for regn id !nid to $!price and status to !status', array('!nid' => $key, '!price' => $price, '!status' => $status));
|
||||
|
||||
|
Reference in New Issue
Block a user