added code to grab patron circ summary
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 6 Jan 2006 20:22:08 +0000 (20:22 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 6 Jan 2006 20:22:08 +0000 (20:22 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@2639 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Application/AppUtils.pm

index d38f9a4..4e8fae8 100644 (file)
@@ -565,12 +565,19 @@ sub fetch_permission_group_tree {
 }
 
 
-sub fetch_patron_summary {
+sub fetch_patron_circ_summary {
        my( $self, $userid ) = @_;
        $logger->debug("Fetching patron summary for $userid");
-       return $self->simplereq(
+       my $summary = $self->simplereq(
                'open-ils.storage', 
                "open-ils.storage.action.circulation.patron_summary", $userid );
+
+       if( $summary ) {
+               $summary->[0] ||= 0;
+               $summary->[1] ||= 0.0;
+               return $summary;
+       }
+       return undef;
 }
 
 1;