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 <jason@sigio.com>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
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}};