From b667e617623481568216f752848a1b8bf34b0710 Mon Sep 17 00:00:00 2001 From: Jason Stephenson Date: Tue, 7 Jan 2014 12:27:17 -0500 Subject: [PATCH] Have bill_payment_map_for_xact create its own CStoreEditor if necessary. Signed-off-by: Jason Stephenson --- Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/CircCommon.pm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/CircCommon.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/CircCommon.pm index 9416770b6c..261e391dec 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/CircCommon.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/CircCommon.pm @@ -361,6 +361,11 @@ sub can_close_circ { sub bill_payment_map_for_xact { my ($class, $e, $xact) = @_; + # Check for CStoreEditor and make a new one if we have to. This + # allows one-off calls to this subroutine to pass undef as the + # CStoreEditor and not have to create one of their own. + $e = OpenILS::Utils::CStoreEditor->new; unless ($e); + # find all bills in order my $bill_search = [ {xact => $xact->id()}, -- 2.11.0