From 3db75fd78d2472b04c5aad8ff87e780b619b555e Mon Sep 17 00:00:00 2001 From: Jason Stephenson Date: Sat, 21 Dec 2013 10:47:04 -0500 Subject: [PATCH] Fix _check_payment_interval in O::A::Circ::CircCommon. I was passing in the hashref from org_unit_setting and treating it as if I had the value hash member. This change modified _check_payment_interval to detect if we have the hashref. If so, we set the the inverval to $hashref->{value}. Signed-off-by: Jason Stephenson Signed-off-by: Kathy Lussier --- 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 22c259c1f4..e4508bd842 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/CircCommon.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/CircCommon.pm @@ -694,6 +694,11 @@ sub _check_payment_interval { my ($entry, $interval) = @_; my $result = ($interval ? 0 : 1); + # A check to see if we were given the settings hash or the value: + if (ref($interval) eq 'HASH') { + $interval = $interval->{value}; + } + if ($interval && $entry && $entry->{payments} && @{$entry->{payments}}) { my $interval_secs = interval_to_seconds($interval); my @pay_dates = map {$_->payment_ts()} sort {$b->payment_ts() cmp $a->payment_ts()} grep {$_->payment_type() ne 'void_payment'} @{$entry->{payments}}; -- 2.11.0