[open-ils-commits] [GIT] Evergreen ILS branch master updated. 804210a37030eea40906ca88d6de31f072440732
Evergreen Git
git at git.evergreen-ils.org
Wed Apr 29 11:18:31 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, master has been updated
via 804210a37030eea40906ca88d6de31f072440732 (commit)
from 7ec3ea5ef54dd1c3651bc8f4ec2575f2308c4ae3 (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 804210a37030eea40906ca88d6de31f072440732
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