Added an email for missed payment processing

This commit is contained in:
2014-05-28 13:06:09 +10:00
parent 41f39b6705
commit bdd980f13e
4 changed files with 105 additions and 4 deletions

View File

@@ -280,6 +280,8 @@ function booking_manual_email()
$email_options_array['balance'] = 'Manual Balance Outstanding';
$email_options_array['complete'] = 'Manual Payment Complete';
$email_options_array['travelcomplete'] = 'Manual Travel Form Complete';
$email_options_array['withdrawal'] = 'Manual Withdrawal Processed';
$email_options_array['missedpayment'] = 'Manual Missed Payment Email';
//add in the custom email types
for ($i = 1; $i <= variable_get('booking_custom_email_count','5'); $i++)
@@ -411,13 +413,23 @@ function booking_manual_email_submit($form, &$form_state) {
{
watchdog('booking', 'Processing a manual travelform complete email to id @info', array ('@info' => $key));
_booking_travelform_confirmation_email($key);
}
}
elseif ($form_state['values']['email-type'] == 'withdrawal')
{
watchdog('booking', 'Processing a manual withdrawal email to id @info', array ('@info' => $key));
_booking_demoted_to_notcoming_email($key);
}
elseif ($form_state['values']['email-type'] == 'missedpayment')
{
watchdog('booking', 'Processing a manual missedpayment email to id @info', array ('@info' => $key));
_booking_missedpayment_email($key);
}
elseif (strpos($form_state['values']['email-type'], 'custom') !== false)
{
watchdog('booking', 'Processing a @custom type email to id @info', array ('@custom' => $form_state['values']['email-type'], '@info' => $key));
_booking_custom_email($key, $form_state['values']['email-type']);
}
//increase the counter of people we've emailed
$counter++;
}
}