[open-ils-commits] r14797 - trunk/Open-ILS/src/perlmods/OpenILS/Application (erickson)

svn at svn.open-ils.org svn at svn.open-ils.org
Thu Nov 5 17:45:18 EST 2009


Author: erickson
Date: 2009-11-05 17:45:12 -0500 (Thu, 05 Nov 2009)
New Revision: 14797

Modified:
   trunk/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm
Log:
repaired mbts array ref

Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm	2009-11-05 22:25:08 UTC (rev 14796)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm	2009-11-05 22:45:12 UTC (rev 14797)
@@ -1587,6 +1587,7 @@
 		->method_lookup('open-ils.actor.user.transactions.history.still_open')
 		->run($login_session => $user_id => $type);
 
+
 	if($api =~ /have_charge/o) {
 
 		$trans = [ grep { int($_->total_owed * 100) > 0 } @$trans ];
@@ -2086,7 +2087,7 @@
 	my $api = $self->api_name;
 	my @xact_finish  = (xact_finish => undef ) if ($api =~ /history.still_open$/);
 
-    my @mbts = $e->search_money_billable_transaction_summary(
+    my $mbts = $e->search_money_billable_transaction_summary(
         [ 
             { usr => $userid, @xact_finish },
             { order_by => { mbt => 'xact_start DESC' } }
@@ -2094,25 +2095,25 @@
     );
 
 	if(defined($type)) {
-		@mbts = grep { $_->xact_type eq $type } @mbts;
+		@$mbts = grep { $_->xact_type eq $type } @$mbts;
 	}
 
 	if($api =~ /have_balance/o) {
-		@mbts = grep { int($_->balance_owed * 100) != 0 } @mbts;
+		@$mbts = grep { int($_->balance_owed * 100) != 0 } @$mbts;
 	}
 
 	if($api =~ /have_charge/o) {
-		@mbts = grep { defined($_->last_billing_ts) } @mbts;
+		@$mbts = grep { defined($_->last_billing_ts) } @$mbts;
 	}
 
 	if($api =~ /have_bill/o) {
-		@mbts = grep { int($_->total_owed * 100) != 0 } @mbts;
+		@$mbts = grep { int($_->total_owed * 100) != 0 } @$mbts;
 	}
 
     if ($api =~ /\.ids/) {
-    	return [map {$_->id} @mbts];
+    	return [map {$_->id} @$mbts];
     } else {
-        return [@mbts];
+        return $mbts;
     }
 }
 



More information about the open-ils-commits mailing list