From: Jason Stephenson Date: Tue, 7 Jan 2014 17:27:17 +0000 (-0500) Subject: Have bill_payment_map_for_xact create its own CStoreEditor if necessary. X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=b667e617623481568216f752848a1b8bf34b0710;p=working%2FEvergreen.git Have bill_payment_map_for_xact create its own CStoreEditor if necessary. Signed-off-by: Jason Stephenson --- 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()},