remove old passport and flight info from cahaya
This commit is contained in:
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
.DS_Store
|
@@ -1351,14 +1351,14 @@ function _booking_details_email_summary($node) {
|
|||||||
$rows[] = t('Name: !first !last', array('!first' => $node->booking_firstname, '!last' => $node->booking_lastname));
|
$rows[] = t('Name: !first !last', array('!first' => $node->booking_firstname, '!last' => $node->booking_lastname));
|
||||||
$rows[] = t('Gender: !gender', array('!gender' => $node->booking_gender == 'M' ? 'Male' : 'Female'));
|
$rows[] = t('Gender: !gender', array('!gender' => $node->booking_gender == 'M' ? 'Male' : 'Female'));
|
||||||
$rows[] = t('Date of birth: !dob', array('!dob' => _booking_convert_ts($node->booking_dob)->format('d/m/Y')));
|
$rows[] = t('Date of birth: !dob', array('!dob' => _booking_convert_ts($node->booking_dob)->format('d/m/Y')));
|
||||||
|
/*
|
||||||
if (variable_get('booking_enable_passport', 1) == 1) {
|
if (variable_get('booking_enable_passport', 1) == 1) {
|
||||||
$rows[] = t('Passport Number: !value', array('!value' => $node->booking_passport_num));
|
$rows[] = t('Passport Number: !value', array('!value' => $node->booking_passport_num));
|
||||||
$rows[] = t('Passport Expiry: !timestamp', array('!timestamp' => _booking_convert_ts($node->booking_passport_expiry_date)->format('d/m/Y')));
|
$rows[] = t('Passport Expiry: !timestamp', array('!timestamp' => _booking_convert_ts($node->booking_passport_expiry_date)->format('d/m/Y')));
|
||||||
$rows[] = t('Passport Exact Issued Name: !value', array('!value' => $node->booking_passport_issue_name));
|
$rows[] = t('Passport Exact Issued Name: !value', array('!value' => $node->booking_passport_issue_name));
|
||||||
$rows[] = t('Passport Issue Location: !value', array('!value' => $node->booking_passport_issue_location));
|
$rows[] = t('Passport Issue Location: !value', array('!value' => $node->booking_passport_issue_location));
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
$rows[] = t('Email address: !email', array('!email' => $node->booking_email));
|
$rows[] = t('Email address: !email', array('!email' => $node->booking_email));
|
||||||
$rows[] = t('Home Phone Number: !home', array('!home' => $node->booking_phone));
|
$rows[] = t('Home Phone Number: !home', array('!home' => $node->booking_phone));
|
||||||
$rows[] = t('Mobile Phone Number: !mob', array('!mob' => $node->booking_mobile));
|
$rows[] = t('Mobile Phone Number: !mob', array('!mob' => $node->booking_mobile));
|
||||||
|
@@ -538,6 +538,25 @@ function booking_update_7233() {
|
|||||||
_booking_node_create_mysqlview();
|
_booking_node_create_mysqlview();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove deprecated passport/flight details
|
||||||
|
*/
|
||||||
|
function booking_update_7234() {
|
||||||
|
$fields = array(
|
||||||
|
'booking_passport_expiry_date', 'booking_passport_num', 'booking_passport_issue_location',
|
||||||
|
'booking_passport_issue_name', 'booking_destination_country', 'booking_travel_insurance',
|
||||||
|
'booking_outflight_bookingnum', 'booking_outflight_flightnum', 'booking_outflight_origin',
|
||||||
|
'booking_outflight_origin_ts', 'booking_outflight_connecting_flightnum', 'booking_outflight_destination',
|
||||||
|
'booking_outflight_destination_ts', 'booking_rtrnflight_bookingnum', 'booking_rtrnflight_flightnum',
|
||||||
|
'booking_rtrnflight_origin', 'booking_rtrnflight_origin_ts', 'booking_rtrnflight_connecting_flightnum',
|
||||||
|
'booking_rtrnflight_destination', 'booking_rtrnflight_destination_ts'
|
||||||
|
);
|
||||||
|
foreach ($fields as $field) {
|
||||||
|
db_drop_field('booking_person', $field);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implementation of hook_install().
|
* Implementation of hook_install().
|
||||||
*/
|
*/
|
||||||
@@ -684,6 +703,7 @@ function booking_schema() {
|
|||||||
'nid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'disp-width' => '10'),
|
'nid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'disp-width' => '10'),
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
/*
|
||||||
//passport info
|
//passport info
|
||||||
'booking_passport_expiry_date' => array('type' => 'int', 'not null' => FALSE, 'disp-width' => '11'),
|
'booking_passport_expiry_date' => array('type' => 'int', 'not null' => FALSE, 'disp-width' => '11'),
|
||||||
'booking_passport_num' => array('type' => 'varchar', 'length' => '50', 'not null' => FALSE),
|
'booking_passport_num' => array('type' => 'varchar', 'length' => '50', 'not null' => FALSE),
|
||||||
@@ -707,6 +727,7 @@ function booking_schema() {
|
|||||||
'booking_rtrnflight_connecting_flightnum' => array('type' => 'varchar', 'length' => '200', 'not null' => FALSE),
|
'booking_rtrnflight_connecting_flightnum' => array('type' => 'varchar', 'length' => '200', 'not null' => FALSE),
|
||||||
'booking_rtrnflight_destination' => array('type' => 'varchar', 'length' => '200', 'not null' => FALSE),
|
'booking_rtrnflight_destination' => array('type' => 'varchar', 'length' => '200', 'not null' => FALSE),
|
||||||
'booking_rtrnflight_destination_ts' => array('type' => 'varchar', 'length' => '200', 'not null' => FALSE),
|
'booking_rtrnflight_destination_ts' => array('type' => 'varchar', 'length' => '200', 'not null' => FALSE),
|
||||||
|
*/
|
||||||
/*
|
/*
|
||||||
),
|
),
|
||||||
'foreign keys' => array(
|
'foreign keys' => array(
|
||||||
@@ -722,33 +743,31 @@ function booking_schema() {
|
|||||||
'primary key' => array('nid'),
|
'primary key' => array('nid'),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$schema['booking_event'] = array(
|
$schema['booking_event'] = array(
|
||||||
'fields' => array(
|
'fields' => array(
|
||||||
'eid' => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE, 'disp-width' => '10'),
|
'eid' => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE, 'disp-width' => '10'),
|
||||||
'booking_eventname' => array('type' => 'varchar', 'length' => '200', 'not null' => TRUE),
|
'booking_eventname' => array('type' => 'varchar', 'length' => '200', 'not null' => TRUE),
|
||||||
'booking_event_active' => array('type' => 'varchar', 'length' => '1', 'default' => 0, 'not null' => TRUE),
|
'booking_event_active' => array('type' => 'varchar', 'length' => '1', 'default' => 0, 'not null' => TRUE),
|
||||||
'booking_register_open' => array('type' => 'int', 'not null' => FALSE, 'disp-width' => '11'),
|
'booking_register_open' => array('type' => 'int', 'not null' => FALSE, 'disp-width' => '11'),
|
||||||
'booking_register_close' => array('type' => 'int', 'not null' => FALSE, 'disp-width' => '11'),
|
'booking_register_close' => array('type' => 'int', 'not null' => FALSE, 'disp-width' => '11'),
|
||||||
'booking_earlybird_close' => array('type' => 'int', 'not null' => FALSE, 'disp-width' => '11'),
|
'booking_earlybird_close' => array('type' => 'int', 'not null' => FALSE, 'disp-width' => '11'),
|
||||||
'booking_event_start' => array('type' => 'int', 'not null' => FALSE, 'disp-width' => '11'),
|
'booking_event_start' => array('type' => 'int', 'not null' => FALSE, 'disp-width' => '11'),
|
||||||
'booking_event_end' => array('type' => 'int', 'not null' => FALSE, 'disp-width' => '11'),
|
'booking_event_end' => array('type' => 'int', 'not null' => FALSE, 'disp-width' => '11'),
|
||||||
),
|
),
|
||||||
'primary key' => array('eid'),
|
'primary key' => array('eid'),
|
||||||
);
|
);
|
||||||
$schema['booking_price'] = array(
|
$schema['booking_price'] = array(
|
||||||
'fields' => array(
|
'fields' => array(
|
||||||
'pid' => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE, 'disp-width' => '10'),
|
'pid' => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE, 'disp-width' => '10'),
|
||||||
'booking_eventid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'disp-width' => '10'),
|
'booking_eventid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'disp-width' => '10'),
|
||||||
'booking_price' => array('type' => 'numeric', 'not null' => FALSE, 'default' => 0, 'precision' => '7', 'scale' => '2'),
|
'booking_price' => array('type' => 'numeric', 'not null' => FALSE, 'default' => 0, 'precision' => '7', 'scale' => '2'),
|
||||||
'booking_late_price' => array('type' => 'numeric', 'not null' => FALSE, 'default' => 0, 'precision' => '7', 'scale' => '2'),
|
'booking_late_price' => array('type' => 'numeric', 'not null' => FALSE, 'default' => 0, 'precision' => '7', 'scale' => '2'),
|
||||||
'booking_price_descrip' => array('type' => 'varchar', 'length' => '100', 'not null' => TRUE),
|
'booking_price_descrip' => array('type' => 'varchar', 'length' => '100', 'not null' => TRUE),
|
||||||
'booking_buttonid' => array('type' => 'varchar', 'length' => '50', 'not null' => FALSE),
|
'booking_buttonid' => array('type' => 'varchar', 'length' => '50', 'not null' => FALSE),
|
||||||
'booking_late_buttonid' => array('type' => 'varchar', 'length' => '50', 'not null' => FALSE),
|
'booking_late_buttonid' => array('type' => 'varchar', 'length' => '50', 'not null' => FALSE),
|
||||||
'booking_price_active' => array('type' => 'varchar', 'length' => '1', 'default' => 0, 'not null' => TRUE),
|
'booking_price_active' => array('type' => 'varchar', 'length' => '1', 'default' => 0, 'not null' => TRUE),
|
||||||
'booking_earlybird_rate' => array('type' => 'varchar', 'length' => '1', 'default' => 0, 'not null' => TRUE),
|
'booking_earlybird_rate' => array('type' => 'varchar', 'length' => '1', 'default' => 0, 'not null' => TRUE),
|
||||||
'booking_depositonly' => array('type' => 'varchar', 'length' => '1', 'default' => 0, 'not null' => TRUE),
|
'booking_depositonly' => array('type' => 'varchar', 'length' => '1', 'default' => 0, 'not null' => TRUE),
|
||||||
),
|
),
|
||||||
'primary key' => array('pid'),
|
'primary key' => array('pid'),
|
||||||
);
|
);
|
||||||
|
@@ -593,7 +593,7 @@ function booking_form($node, &$form_state, $inserting = FALSE)
|
|||||||
'#default_value' => empty($data->booking_medicare) ? '' : $data->booking_medicare
|
'#default_value' => empty($data->booking_medicare) ? '' : $data->booking_medicare
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
if (variable_get('booking_enable_passport', 0) == 1) {
|
if (variable_get('booking_enable_passport', 0) == 1) {
|
||||||
$form['passport-details'] = array(
|
$form['passport-details'] = array(
|
||||||
'#type' => 'fieldset',
|
'#type' => 'fieldset',
|
||||||
@@ -760,7 +760,7 @@ function booking_form($node, &$form_state, $inserting = FALSE)
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
} //end passport only fields
|
} //end passport only fields
|
||||||
|
*/
|
||||||
if (variable_get('booking_enable_helpareas', 1) == 1) {
|
if (variable_get('booking_enable_helpareas', 1) == 1) {
|
||||||
$form['help-areas'] = array(
|
$form['help-areas'] = array(
|
||||||
'#type' => 'fieldset',
|
'#type' => 'fieldset',
|
||||||
|
@@ -286,6 +286,7 @@ function booking_insert($node) {
|
|||||||
'booking_dob' => $node->booking_dob,
|
'booking_dob' => $node->booking_dob,
|
||||||
'booking_barcode' => $node->booking_barcode,
|
'booking_barcode' => $node->booking_barcode,
|
||||||
'booking_luckynum' => $node->booking_luckynum,
|
'booking_luckynum' => $node->booking_luckynum,
|
||||||
|
/*
|
||||||
'booking_passport_num' => $node->booking_passport_num,
|
'booking_passport_num' => $node->booking_passport_num,
|
||||||
'booking_passport_issue_location' => $node->booking_passport_issue_location,
|
'booking_passport_issue_location' => $node->booking_passport_issue_location,
|
||||||
'booking_passport_issue_name' => $node->booking_passport_issue_name,
|
'booking_passport_issue_name' => $node->booking_passport_issue_name,
|
||||||
@@ -307,6 +308,7 @@ function booking_insert($node) {
|
|||||||
'booking_rtrnflight_connecting_flightnum' => $node->booking_rtrnflight_connecting_flightnum,
|
'booking_rtrnflight_connecting_flightnum' => $node->booking_rtrnflight_connecting_flightnum,
|
||||||
'booking_rtrnflight_destination' => $node->booking_rtrnflight_destination,
|
'booking_rtrnflight_destination' => $node->booking_rtrnflight_destination,
|
||||||
'booking_rtrnflight_destination_ts' => $node->booking_rtrnflight_destination_ts,
|
'booking_rtrnflight_destination_ts' => $node->booking_rtrnflight_destination_ts,
|
||||||
|
*/
|
||||||
'booking_gender' => $node->booking_gender,
|
'booking_gender' => $node->booking_gender,
|
||||||
'booking_street' => $node->booking_street,
|
'booking_street' => $node->booking_street,
|
||||||
'booking_suburb' => $node->booking_suburb,
|
'booking_suburb' => $node->booking_suburb,
|
||||||
@@ -393,6 +395,7 @@ function booking_update($node) {
|
|||||||
'booking_dob' => _date_to_ts($node->booking_dob),
|
'booking_dob' => _date_to_ts($node->booking_dob),
|
||||||
'booking_barcode' => $node->booking_barcode,
|
'booking_barcode' => $node->booking_barcode,
|
||||||
'booking_luckynum' => $node->booking_luckynum == '' ? 0 : $node->booking_luckynum,
|
'booking_luckynum' => $node->booking_luckynum == '' ? 0 : $node->booking_luckynum,
|
||||||
|
/*
|
||||||
'booking_passport_num' => $node->booking_passport_num,
|
'booking_passport_num' => $node->booking_passport_num,
|
||||||
'booking_passport_issue_location' => $node->booking_passport_issue_location,
|
'booking_passport_issue_location' => $node->booking_passport_issue_location,
|
||||||
'booking_passport_issue_name' => $node->booking_passport_issue_name,
|
'booking_passport_issue_name' => $node->booking_passport_issue_name,
|
||||||
@@ -414,6 +417,7 @@ function booking_update($node) {
|
|||||||
'booking_rtrnflight_connecting_flightnum' => $node->booking_rtrnflight_connecting_flightnum,
|
'booking_rtrnflight_connecting_flightnum' => $node->booking_rtrnflight_connecting_flightnum,
|
||||||
'booking_rtrnflight_destination' => $node->booking_rtrnflight_destination,
|
'booking_rtrnflight_destination' => $node->booking_rtrnflight_destination,
|
||||||
'booking_rtrnflight_destination_ts' => _datetime_to_ts($node->booking_rtrnflight_destination_ts),
|
'booking_rtrnflight_destination_ts' => _datetime_to_ts($node->booking_rtrnflight_destination_ts),
|
||||||
|
*/
|
||||||
'booking_gender' => $node->booking_gender,
|
'booking_gender' => $node->booking_gender,
|
||||||
'booking_street' => $node->booking_street,
|
'booking_street' => $node->booking_street,
|
||||||
'booking_suburb' => $node->booking_suburb,
|
'booking_suburb' => $node->booking_suburb,
|
||||||
@@ -777,7 +781,7 @@ function booking_view($node, $view_mode) {
|
|||||||
$rows[] = array(t('Barcode:'), t('!id', array('!id' => $node->booking_barcode)));
|
$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('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)));
|
$rows[] = array(t('Email address:'), t('!email', array('!email' => $node->booking_email)));
|
||||||
|
/*
|
||||||
if (variable_get('booking_enable_passport', 1) == 1)
|
if (variable_get('booking_enable_passport', 1) == 1)
|
||||||
{
|
{
|
||||||
$rows[] = array(t('Passport Number:'), $node->booking_passport_num);
|
$rows[] = array(t('Passport Number:'), $node->booking_passport_num);
|
||||||
@@ -819,7 +823,7 @@ function booking_view($node, $view_mode) {
|
|||||||
'#weight' => 3,
|
'#weight' => 3,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
$rows[] = array(t('Payment Type Selected:'), t('!amount_paid', array('!amount_paid' => $payment_type)));
|
$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('Amount Paid:'), t('!amount_paid', array('!amount_paid' => $node->booking_amount_paid)));
|
||||||
$rows[] = array(t('Payment Complete Flag:'), t('!ans', array('!ans' => $node->booking_payment_complete == 'Y' ? 'Yes' : 'No')));
|
$rows[] = array(t('Payment Complete Flag:'), t('!ans', array('!ans' => $node->booking_payment_complete == 'Y' ? 'Yes' : 'No')));
|
||||||
|
Reference in New Issue
Block a user