From ea5a162f7ce06f1e9aca65d829e14f5dfe3153b8 Mon Sep 17 00:00:00 2001 From: erickson Date: Wed, 9 Dec 2009 14:33:06 +0000 Subject: [PATCH] added some more inline comments for clarity git-svn-id: svn://svn.open-ils.org/ILS/trunk@15118 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/perlmods/OpenILS/Application/Actor.pm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm b/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm index 20939be6a0..191dccfed6 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm @@ -2170,18 +2170,25 @@ sub user_transaction_history { if($api =~ /have_bill_or_payment/o) { - # includes xacts that have all-voided billings and at least 1 payment + # transactions that have a non-zero sum across all billings or at least 1 payment @$mbts = grep { int($_->balance_owed * 100) != 0 || defined($_->last_payment_ts) } @$mbts; } elsif( $api =~ /have_balance/o) { + + # transactions that have a non-zero overall balance @$mbts = grep { int($_->balance_owed * 100) != 0 } @$mbts; } elsif( $api =~ /have_charge/o) { + + # transactions that have at least 1 billing, regardless of whether it was voided @$mbts = grep { defined($_->last_billing_ts) } @$mbts; } elsif( $api =~ /have_bill/o) { + + # transactions that have non-zero sum across all billings. This will exclude + # xacts where all billings have been voided @$mbts = grep { int($_->total_owed * 100) != 0 } @$mbts; } -- 2.11.0