Tweak refund process
This commit is contained in:
@@ -728,7 +728,7 @@ function _booking_process_refund($person)
|
||||
$refund_due = $person->booking_amount_paid - $refund;
|
||||
if ($refund_due == 0)
|
||||
{
|
||||
//mark the refund as processed since no action is required
|
||||
//mark the refund as processed since no action is required and don't add an entry into the manual payments table
|
||||
db_update('booking_person')
|
||||
->fields(array(
|
||||
'booking_refund_due' => 0,
|
||||
@@ -746,7 +746,6 @@ function _booking_process_refund($person)
|
||||
))
|
||||
->condition('nid', $person->nid)
|
||||
->execute();
|
||||
}
|
||||
|
||||
//add manual payment entry for refund
|
||||
$result = db_insert('booking_payment')
|
||||
@@ -769,6 +768,9 @@ function _booking_process_refund($person)
|
||||
'booking_ipn_track_id' => '',
|
||||
))
|
||||
->execute();
|
||||
}
|
||||
|
||||
|
||||
|
||||
//return the amount to refund this person
|
||||
return $refund;
|
||||
|
Reference in New Issue
Block a user