Tweak refund process
This commit is contained in:
@@ -728,7 +728,7 @@ function _booking_process_refund($person)
|
|||||||
$refund_due = $person->booking_amount_paid - $refund;
|
$refund_due = $person->booking_amount_paid - $refund;
|
||||||
if ($refund_due == 0)
|
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')
|
db_update('booking_person')
|
||||||
->fields(array(
|
->fields(array(
|
||||||
'booking_refund_due' => 0,
|
'booking_refund_due' => 0,
|
||||||
@@ -746,7 +746,6 @@ function _booking_process_refund($person)
|
|||||||
))
|
))
|
||||||
->condition('nid', $person->nid)
|
->condition('nid', $person->nid)
|
||||||
->execute();
|
->execute();
|
||||||
}
|
|
||||||
|
|
||||||
//add manual payment entry for refund
|
//add manual payment entry for refund
|
||||||
$result = db_insert('booking_payment')
|
$result = db_insert('booking_payment')
|
||||||
@@ -769,6 +768,9 @@ function _booking_process_refund($person)
|
|||||||
'booking_ipn_track_id' => '',
|
'booking_ipn_track_id' => '',
|
||||||
))
|
))
|
||||||
->execute();
|
->execute();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//return the amount to refund this person
|
//return the amount to refund this person
|
||||||
return $refund;
|
return $refund;
|
||||||
|
Reference in New Issue
Block a user