Extra logging and fix deposit paypal calculation

This commit is contained in:
2015-03-19 12:59:11 +11:00
parent ef4a87b97f
commit dbae57532d
3 changed files with 16 additions and 9 deletions

View File

@@ -825,7 +825,7 @@ function _booking_deposit_amount($include_fees = TRUE)
//add the 30 cent fixed cost
$amount_owing = $deposit->booking_price + 0.3;
//and the 2.4 percent transaction fee
$amount_owing = $amount_owing / (1 - 0.024);
$amount_owing = $amount_owing / (1 - 0.026);
}
else
{

View File

@@ -1069,6 +1069,13 @@ function _booking_validate($node, &$form_state) {
//verify that a state has been entered if "Other" was selected
if (($form_state['booking_state'] == 'Other' ) && ($form_state['booking_other_state'] == ''))
form_set_error('booking_other_state', t('You must enter your State in the address section of the Contact details. Please put N/A if your country does not have states.'));
//if there are any errors then log the data the user entered so we can check it later
if (form_get_errors()) {
watchdog('booking', "<pre>Detected validation error(s):\n@errors\n\n User data:\n@info</pre>",
array('@info' => print_r( $form_state, true), '@errors' => print_r( form_get_errors(), true)));
}
}
function booking_form_submit($form, &$form_state) {

View File

@@ -354,13 +354,6 @@ $booking_registration_intro_text = variable_get('booking_registration_intro_text
'This will be sent either at initial registration if the full amount is paid, or when the balance is paid.'),
'#default_value' => variable_get('booking_email_regn_complete_text', $booking_email_regn_complete_text),
);
$form['emails']['booking_email_partialpayment_received_text'] = array(
'#title' => t('Email text to send a person thanking them for their partial payment'),
'#type' => 'textarea',
//'#format' => 'full_html',
'#description' => t(''),
'#default_value' => variable_get('booking_email_partialpayment_received_text', ''),
);
$form['emails']['booking_email_waitinglist_text'] = array(
'#title' => t('Registration on Waiting List Email'),
'#description' => t('Email text to indicate a person has registered but is on the waiting list. ' .
@@ -369,6 +362,13 @@ $booking_registration_intro_text = variable_get('booking_registration_intro_text
//'#format' => 'full_html',
'#default_value' => variable_get('booking_email_waitinglist_text', $booking_email_waitinglist_text),
);
$form['emails']['booking_email_partialpayment_received_text'] = array(
'#title' => t('Email text to send a person thanking them for their partial payment'),
'#type' => 'textarea',
//'#format' => 'full_html',
'#description' => t(''),
'#default_value' => variable_get('booking_email_partialpayment_received_text', ''),
);
$form['emails']['booking_email_paymentoutstanding_subject'] = array (
'#type' => 'textfield',
'#title' => t('Balance Outstanding Email Subject'),