money_open_user_summary may not exist if the user has no transactions to summarize...
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 18 Aug 2010 18:08:17 +0000 (18:08 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 18 Aug 2010 18:08:17 +0000 (18:08 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@17253 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/SIP/Patron.pm

index 81524a0..137f539 100644 (file)
@@ -230,7 +230,7 @@ sub fee_amount {
     my $summary = $e->retrieve_money_open_user_summary($user_id);
     $e->rollback; # xact_rollback + disconnect
 
-       my $total = $summary->balance_owed;
+    my $total = ($summary) ? $summary->balance_owed : 0;
        syslog('LOG_INFO', "User ".$self->{id} .":$user_id has a fee amount of \$$total");
        return $total;
 }