Comments for amount owing function

This commit is contained in:
2014-03-01 00:43:26 +11:00
parent 97dc20354a
commit 6c9217f97b

View File

@@ -551,7 +551,14 @@ function _booking_amount_paid($nid, $person = NULL)
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)
{
//$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);
}
//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)
{
//watchdog('booking', "This person doesn't owe any money: @info", array('@info' => var_export($person, TRUE)));