[open-ils-commits] [GIT] Evergreen ILS branch rel_2_6 updated. 513d551d98c6f908818fdb2360415ea8456f5f1e
Evergreen Git
git at git.evergreen-ils.org
Wed Apr 29 11:19:18 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_6 has been updated
via 513d551d98c6f908818fdb2360415ea8456f5f1e (commit)
from 3db721193f58947f40b019b2f067caaf2ce04d7c (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 513d551d98c6f908818fdb2360415ea8456f5f1e
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