From ab600c99ac514dc955363fd624dc50082c3636da Mon Sep 17 00:00:00 2001 From: Nathan Coad Date: Fri, 30 May 2014 09:53:28 +1000 Subject: [PATCH] bugfixes --- booking.constants.inc | 5 +++-- booking.register.inc | 21 +++++++++++++++++++-- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/booking.constants.inc b/booking.constants.inc index 96273ac..c5e62ab 100644 --- a/booking.constants.inc +++ b/booking.constants.inc @@ -105,8 +105,9 @@ function _booking_room_location_lookup($input = NULL) $location[] = t('Golan'); $location[] = t('Ramoth'); $location[] = t('Jerusalem'); - $location[] = t('Bezer'); - $location[] = t('Schechem'); + $location[] = t('Bezer'); + $location[] = t('Hebron'); + $location[] = t('Shechem'); $location[] = t('Kedesh'); if ($input != NULL) diff --git a/booking.register.inc b/booking.register.inc index bd0f937..a77b4e3 100644 --- a/booking.register.inc +++ b/booking.register.inc @@ -966,7 +966,7 @@ function booking_form_submit($form, &$form_state) { //fields that may or may not have been present in the initial form $node->booking_welfare_required = empty($values['booking_welfare_required']) ? 'N' : ($values['booking_welfare_required'] == 1 ? 'Y' : 'N'); $node->booking_committee_member = empty($values['booking_committee_member']) ? 'N' : ($values['booking_committee_member'] == 1 ? 'Y' : 'N'); - $node->booking_welfare_required = empty($values['booking_welfare_required']) ? 'N' : ($values['booking_welfare_required'] == 1 ? 'Y' : 'N'); + $node->booking_refund_processed = empty($values['booking_refund_processed']) ? 'N' : ($values['booking_refund_processed'] == 1 ? 'Y' : 'N'); $node->booking_refund_due = empty($values['booking_refund_due']) ? 0 : $values['booking_refund_due']; $node->booking_help_music = empty($values['booking_help_music']) ? '' : $values['booking_help_music']; $node->booking_help_meditations = empty($values['booking_help_meditations']) ? '' : $values['booking_help_meditations']; @@ -1561,7 +1561,24 @@ function booking_view($node, $view_mode) { //now populate the table $rows[] = array(t('Date/Time registered:'), t('!timestamp', array('!timestamp' => format_date($node->booking_timestamp, 'custom', 'd/m/Y H:i')))); - $rows[] = arra t('!amount_paid', array('!amount_paid' => $payment_type))); + $rows[] = array(t('Name:'), t('!first !last', array('!first' => $node->booking_firstname, '!last' => $node->booking_lastname))); + $rows[] = array(t('Gender:'), t('!gender', array('!gender' => $node->booking_gender == 'M' ? 'Male' : 'Female'))); + $rows[] = array(t('Status:'), t('!status', array('!status' => _booking_status_generate($node->booking_status)))); + $rows[] = array(t('Committee Member:'), t('!ans', array('!ans' => ($node->booking_committee_member == 'Y' ? 'Yes' : 'No')))); + $rows[] = array(t('Welfare Required:'), $node->booking_welfare_required == 'Y' ? 'Yes' : 'No'); + $rows[] = array(t('Barcode:'), t('!id', array('!id' => $node->booking_barcode))); + $rows[] = array(t('Date of birth:'), t('!dob', array('!dob' => format_date($node->booking_dob, 'custom', 'd/m/Y')))); + $rows[] = array(t('Email address:'), t('!email', array('!email' => $node->booking_email))); + + if (variable_get('booking_enable_passport', 1) == 1) + { + $rows[] = array(t('Passport Number:'), $node->booking_passport_num); + $rows[] = array(t('Passport Expiry:'), t('!timestamp', array('!timestamp' => _booking_convert_ts($node->booking_passport_expiry_date)->format('d/m/Y')))); + $rows[] = array(t('Passport Exact Issued Name:'), $node->booking_passport_issue_name); + $rows[] = array(t('Passport Issue Location:'), $node->booking_passport_issue_location); + } + + $rows[] = array(t('Payment Type Selected:'), t('!amount_paid', array('!amount_paid' => $payment_type))); $rows[] = array(t('Amount Paid:'), t('!amount_paid', array('!amount_paid' => $node->booking_amount_paid))); $rows[] = array(t('Total Amount Due:'), t('!amount_paid', array('!amount_paid' => $node->booking_total_pay_reqd))); $rows[] = array(t('Refund Due:'), t('!amount_due', array('!amount_due' => $node->booking_refund_due)));