add preselection for unpaid people
This commit is contained in:
@@ -449,7 +449,9 @@ function booking_manual_email_form($form, &$form_state)
|
||||
$email_options_array['initialtravelrequired'] = 'Initial Travel Form Required Email';
|
||||
$email_options_array['remindertravelrequired'] = 'Reminder Travel Form Required Email';
|
||||
$email_options_array['travelcomplete'] = 'Travel Form Complete Email';
|
||||
|
||||
$preselection_options['---'] = "---";
|
||||
$preselection_options['notpad'] = 'People who have not yet paid';
|
||||
$preselection_options['bookedin'] = 'People who are booked-in';
|
||||
$preselection_options['waitinglist'] = 'People on waiting list';
|
||||
$preselection_options['unpaid'] = 'People booked-in with outstanding balance';
|
||||
@@ -715,6 +717,11 @@ function _booking_email_get_default_selection_callback($form, $form_state) {
|
||||
//populate $defaults based on type of selection
|
||||
foreach ($people as $person) {
|
||||
switch ($selection) {
|
||||
case 'notpaid':
|
||||
if ($person->booking_status == 0) {
|
||||
$defaults[] = $person->nid;
|
||||
}
|
||||
break;
|
||||
case 'bookedin':
|
||||
if ($person->booking_status == 1) {
|
||||
$defaults[] = $person->nid;
|
||||
|
Reference in New Issue
Block a user