[open-ils-commits] [GIT] Evergreen ILS branch rel_2_7 updated. 5caea30d5de003edeaed7133fed88752b8724e2d

Evergreen Git git at git.evergreen-ils.org
Wed Apr 29 11:19:03 EDT 2015


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, rel_2_7 has been updated
       via  5caea30d5de003edeaed7133fed88752b8724e2d (commit)
      from  e946dc45641f77491771311599cf9efa16cd6cd7 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 5caea30d5de003edeaed7133fed88752b8724e2d
Author: Jason Boyer <jboyer1 at library.in.gov>
Date:   Mon Mar 2 15:06:33 2015 -0500

    LP#1427309 Fix Crash in Collections User Balance Summary
    
    Previously a patron in collections that paid off all
    transactions would cause a crash and stop processing
    any balance summary file that they are supposed to
    appear in. Now user balance summaries can be created
    in full even if some users have a 0 balance.
    
    Signed-off-by: Jason Boyer <jboyer at library.in.gov>
    Signed-off-by: Bill Erickson <berickxx at gmail.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Collections.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Collections.pm
index 750468c..e3fb511 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Collections.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Collections.pm
@@ -862,16 +862,19 @@ sub user_balance_summary {
         );
 
         # get the sum owed an all transactions
-        my $balance = $e->json_query({
-            select => {mbts => [
-                {   column => 'balance_owed',
-                    transform => 'sum',
-                    aggregate => 1
-                }
-            ]},
-            from => 'mbts',
-            where => {id => [@$circ_ids, @$groc_ids, @$res_ids]}
-        })->[0];
+        my $balance = undef;
+        if (@{[@$circ_ids, @$groc_ids, @$res_ids]}) {
+            $balance = $e->json_query({
+                select => {mbts => [
+                    {   column => 'balance_owed',
+                        transform => 'sum',
+                        aggregate => 1
+                    }
+                ]},
+                from => 'mbts',
+                where => {id => [@$circ_ids, @$groc_ids, @$res_ids]}
+            })->[0];
+        }
 
         $balance = $balance ? $balance->{balance_owed} : '0';
 

-----------------------------------------------------------------------

Summary of changes:
 .../lib/OpenILS/Application/Collections.pm         |   23 +++++++++++--------
 1 files changed, 13 insertions(+), 10 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list