Fix logic for determining which price to use

This commit is contained in:
2016-02-21 20:38:14 +11:00
parent 48e58a29e7
commit f122219305

View File

@@ -128,7 +128,7 @@ function booking_manual_payment_admin_submit($form, &$form_state) {
//watchdog('booking', 'Manual payment form contents: @info', array('@info' => var_export($form_state['values'], TRUE))); //watchdog('booking', 'Manual payment form contents: @info', array('@info' => var_export($form_state['values'], TRUE)));
//check if there is a pre-defined payment type selected //check if there is a pre-defined payment type selected
if ($form_state['values']['payment-type'] != '' && $form_state['values']['payment-custom-amount'] == '0.00') { if ((!empty($form_state['values']['payment-type'])) && $form_state['values']['payment-custom-amount'] == '0.00') {
//look up the price relating to the price id selected //look up the price relating to the price id selected
$price_query = db_query("SELECT price.booking_price, price.booking_late_price, price.booking_price_descrip " . $price_query = db_query("SELECT price.booking_price, price.booking_late_price, price.booking_price_descrip " .
"FROM {booking_price} price " . "FROM {booking_price} price " .