Added update to allow for payment pricing greater than 999.99

This commit is contained in:
2014-02-19 17:03:59 +11:00
parent c2eb5ca26e
commit 66d4c89679

View File

@@ -250,12 +250,12 @@ function booking_update_7206() {
/**
* Add field to support welfare required flag
*
*function booking_update_7207() {
* $spec = array('type' => 'int', 'length' => '11', 'default' => 0, 'not null' => FALSE);
* db_add_field( 'booking_person', 'booking_welfare_required', $spec);
*}
*/
function booking_update_7207() {
$spec = array('type' => 'int', 'length' => '11', 'default' => 0, 'not null' => FALSE);
db_add_field( 'booking_person', 'booking_welfare_required', $spec);
}
/**
* Update definition for welfare required flag
@@ -273,6 +273,19 @@ function booking_update_7209() {
db_add_field( 'booking_studygroup_mapping', 'booking_is_reserveleader', $spec);
}
/**
* Update database to allow payments up to $10000
*/
function booking_update_7210() {
$spec = array('type' => 'numeric', 'not null' => FALSE, 'default' => 0, 'precision' => '7', 'scale' => '2');
db_change_field('booking_person', 'booking_amount_paid', 'booking_amount_paid', $spec);
db_change_field('booking_person', 'booking_total_pay_reqd', 'booking_total_pay_reqd', $spec);
db_change_field('booking_price', 'booking_price', 'booking_price', $spec);
db_change_field('booking_payment', 'booking_mc_gross', 'booking_mc_gross', $spec);
db_change_field('booking_payment', 'booking_mc_fee', 'booking_mc_fee', $spec);
return "Updated maximum payment successfully.";
}
/**
* Implementation of hook_install().
*/
@@ -429,8 +442,8 @@ function booking_schema() {
//payment info
'booking_payment_id' => array('type' => 'int', 'length' => '11', 'default' => 0, 'not null' => FALSE),
//'booking_payment_method' => array('type' => 'varchar', 'length' => '100', 'not null' => TRUE),
'booking_total_pay_reqd' => array('type' => 'numeric', 'not null' => FALSE, 'default' => 0, 'precision' => '5', 'scale' => '2'),
'booking_amount_paid' => array('type' => 'numeric', 'not null' => FALSE, 'default' => 0, 'precision' => '5', 'scale' => '2'),
'booking_total_pay_reqd' => array('type' => 'numeric', 'not null' => FALSE, 'default' => 0, 'precision' => '7', 'scale' => '2'),
'booking_amount_paid' => array('type' => 'numeric', 'not null' => FALSE, 'default' => 0, 'precision' => '7', 'scale' => '2'),
'booking_deposit_timestamp' => array('type' => 'int', 'not null' => FALSE, 'disp-width' => '11'),
),
'primary key' => array('nid'),
@@ -452,7 +465,7 @@ function booking_schema() {
'fields' => array(
'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_price' => array('type' => 'numeric', 'not null' => FALSE, 'default' => 0, 'precision' => '5', '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' => '5', 'scale' => '2'),
'booking_price_descrip' => array('type' => 'varchar', 'length' => '100', 'not null' => TRUE),
'booking_buttonid' => array('type' => 'varchar', 'length' => '50', 'not null' => FALSE),
@@ -468,9 +481,9 @@ function booking_schema() {
'payid' => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE, 'disp-width' => '10'),
'booking_person_nid' => 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_mc_gross' => array('type' => 'numeric', 'not null' => FALSE, 'default' => 0, 'precision' => '5', 'scale' => '2'),
'booking_mc_gross' => array('type' => 'numeric', 'not null' => FALSE, 'default' => 0, 'precision' => '7', 'scale' => '2'),
'booking_mc_currency' => array('type' => 'varchar', 'length' => '10', 'not null' => FALSE),
'booking_mc_fee' => array('type' => 'numeric', 'not null' => FALSE, 'default' => 0, 'precision' => '5', 'scale' => '2'),
'booking_mc_fee' => array('type' => 'numeric', 'not null' => FALSE, 'default' => 0, 'precision' => '7', 'scale' => '2'),
'booking_quantity' => array('type' => 'int', 'length' => 11, 'not null' => FALSE, 'default' => 0),
'booking_invoice' => array('type' => 'varchar', 'length' => '150', 'not null' => FALSE),
'booking_payer_id' => array('type' => 'varchar', 'length' => '150', 'not null' => FALSE),