Implementing balance/total choice for manual payments
This commit is contained in:
@@ -9,11 +9,16 @@
|
||||
function booking_manual_payment_admin($nid)
|
||||
{
|
||||
global $event;
|
||||
$payment_type_options = array();
|
||||
$payment_type_options = array();
|
||||
$payment_balance_options = array();
|
||||
$form = array();
|
||||
$options = array();
|
||||
|
||||
$early_price_applies = _booking_is_earlybird();
|
||||
|
||||
$payment_balance_options[0] = t('Balance Payment');
|
||||
$payment_balance_options[1] = t('Total Payment');
|
||||
|
||||
|
||||
//collect the various payment options
|
||||
$result = db_query("SELECT pid, booking_price_descrip, booking_price, booking_late_price FROM {booking_price} where booking_eventid = :eid " .
|
||||
@@ -30,7 +35,7 @@ function booking_manual_payment_admin($nid)
|
||||
}
|
||||
|
||||
//any html to put at the start of the form
|
||||
$prefix = t("<p>Manually enter payment details.<br /><strong>Note that this adds to the total amount paid already by each person.</strong></p>");
|
||||
$prefix = t("<p>Manually enter payment details.<br /><strong>Note that this adds to the total amount paid already by each person - the choice below is not yet implemented.</strong></p>");
|
||||
|
||||
$form['booking_earlybird'] = array (
|
||||
'#type' => 'hidden',
|
||||
@@ -52,6 +57,16 @@ function booking_manual_payment_admin($nid)
|
||||
'#required' => FALSE,
|
||||
'#default_value' => '0.00'
|
||||
);
|
||||
|
||||
$form['payment-balance-type'] = array(
|
||||
'#type' => 'radios',
|
||||
'#title' => t('Balance or total payment?'),
|
||||
'#description' => t('If this is a total payment, the amount selected above will be added to any existing payment. ' .
|
||||
'For balance payments, the amount paid is the total above minus any previous payments.<br />Select balance if the person had already paid their deposit and now has manually paid any outstanding balance.')
|
||||
'#options' => $payment_balance_options,
|
||||
'#default_value' => 0,
|
||||
'#required' => TRUE
|
||||
);
|
||||
|
||||
$header = array (
|
||||
'booking_nid' => array('data' => t('Booking ID')),
|
||||
|
Reference in New Issue
Block a user