Comments for amount owing function
This commit is contained in:
@@ -551,7 +551,14 @@ function _booking_amount_paid($nid, $person = NULL)
|
|||||||
return $amount_paid;
|
return $amount_paid;
|
||||||
}
|
}
|
||||||
|
|
||||||
//calculate the amount outstanding for a person/married couple
|
/**
|
||||||
|
* Function to calculate the amount outstanding for a person/married couple
|
||||||
|
*
|
||||||
|
* @param $nid - the node id relating to the registration node
|
||||||
|
* @param $amount_paid - if we have previously calculated the amount paid, this can be passed as a value
|
||||||
|
* @param $include_paypal_fees - boolean to indicate whether we want the net amount or the amount owing including paypal fees
|
||||||
|
* @return amount owing as a decimal value
|
||||||
|
*/
|
||||||
function _booking_amount_owing($nid, $amount_paid = 0, $include_paypal_fees = TRUE)
|
function _booking_amount_owing($nid, $amount_paid = 0, $include_paypal_fees = TRUE)
|
||||||
{
|
{
|
||||||
//$amount_paid = 0;
|
//$amount_paid = 0;
|
||||||
@@ -585,7 +592,9 @@ function _booking_amount_owing($nid, $amount_paid = 0, $include_paypal_fees = TR
|
|||||||
{
|
{
|
||||||
$amount_paid = _booking_amount_paid($nid, $person);
|
$amount_paid = _booking_amount_paid($nid, $person);
|
||||||
}
|
}
|
||||||
|
|
||||||
//check if there is anything outstanding
|
//check if there is anything outstanding
|
||||||
|
//use the original total amount required rather than the late-rate, to cater for people that paid before the late rate
|
||||||
if ($amount_paid >= $person->booking_total_pay_reqd)
|
if ($amount_paid >= $person->booking_total_pay_reqd)
|
||||||
{
|
{
|
||||||
//watchdog('booking', "This person doesn't owe any money: @info", array('@info' => var_export($person, TRUE)));
|
//watchdog('booking', "This person doesn't owe any money: @info", array('@info' => var_export($person, TRUE)));
|
||||||
|
Reference in New Issue
Block a user