Call outstanding_bills_for_circ differently tadl/lost_forgive_not_void
authorJeff Godin <jgodin@tadl.org>
Tue, 29 May 2012 16:18:58 +0000 (12:18 -0400)
committerJeff Godin <jgodin@tadl.org>
Tue, 29 May 2012 16:18:58 +0000 (12:18 -0400)
Our arguments don't include a ref to the class/self when we're calling
outstanding_bills_for_circ from within its own package.

For now, rename to a private-looking sub and change what arguments we
look for.

Signed-off-by: Jeff Godin <jgodin@tadl.org>
Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/CircCommon.pm

index 579b43d..f65f36f 100644 (file)
@@ -31,7 +31,7 @@ sub forgive_overdues {
     $logger->info("attempting to forgive overdues on circ " . $circ->id . " with note " . $note);
 
     # get outstanding bills for the circ in question
-    my $bills = outstanding_bills_for_circ($e, $circ);
+    my $bills = _outstanding_bills_for_circ($e, $circ);
  
     # Sum any outstanding overdue billings, stopping at the first non-overdue billing
 
@@ -169,8 +169,8 @@ sub create_bill {
 # If a bill is partially paid, change the amount of the bill
 # to reflect the unpaid amount, not the original amount.
 # -----------------------------------------------------------------
-sub outstanding_bills_for_circ {
-    my ($class, $e, $circ) = @_;
+sub _outstanding_bills_for_circ {
+    my ($e, $circ) = @_;
 
     # find all unvoided bills in order
     my $bill_search = [