Tweaks to refunds, study groups, travel emails

This commit is contained in:
2014-05-06 14:51:06 +10:00
parent eb3fa7e7bf
commit 5e8e1bd22d
7 changed files with 204 additions and 61 deletions

View File

@@ -209,6 +209,14 @@ function booking_admin() {
'#size' => 150,
'#maxlength' => 2000,
);
$form['misc']['booking_import_include_fields'] = array (
'#type' => 'textfield',
'#title' => t('Fields to import from an uploaded CSV file'),
'#default_value' => variable_get('booking_import_include_fields', ''),
'#description' => 'Separate each field with a semi-colon. Field names as per database schema, case sensitive. Nid and booking_status fields compulsory.',
'#size' => 150,
'#maxlength' => 2000,
);
return system_settings_form($form);
}
@@ -302,6 +310,7 @@ function booking_manual_email()
foreach($result as $data)
{
$paid = _booking_amount_owing($data->nid);
$options[$data->nid] = array (
'booking_nid' => l(t('!id', array('!id' => $data->nid)), t('node/!id', array('!id' => $data->nid))),
'booking_name' => $data->booking_firstname . " " . $data->booking_lastname,
@@ -310,15 +319,17 @@ function booking_manual_email()
'booking_status' => _booking_status_generate($data->booking_status),
'amount_paid' => $data->booking_amount_paid,
'amount_reqd' => $data->booking_total_pay_reqd,
'booking_fully_paid' => _booking_amount_owing($data->nid) == 0 ? 'Yes' : 'No',
'booking_fully_paid' => $paid == 0 ? 'Yes' : 'No',
'welfare_required' => $data->booking_welfare_required == 'Y' ? 'Yes' : 'No',
);
//$values[$data->nid] = ($paid == 0 || $data->booking_status != 1) ? FALSE : TRUE;
}
$form['table'] = array (
'#type' => 'tableselect',
'#header' => $header,
'#options' => $options,
//'#default_value' => $values,
'#empty' => t('No attendees found.'),
'#attributes' => array('id' => 'sort-table'),
);