Update too_many_overdue and excessive_fines in OpenILS::SIP::Patron
to account for the fact that the user object in this context no
longer contains an array of ausp objects, but just an array of ausp
IDs.
This fixes SIP2 failures with patron information messages when a
patron has one or more blocking penalties that are not otherwise
ignored.
Signed-off-by: Jeff Godin <jgodin@tadl.org>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
use OpenILS::SIP;
use OpenILS::Application::AppUtils;
use OpenILS::Application::Actor;
+use OpenILS::Const qw/:const/;
use OpenSRF::Utils qw/:datetime/;
use DateTime::Format::ISO8601;
my $U = 'OpenILS::Application::AppUtils';
sub too_many_overdue {
my $self = shift;
return scalar( # PATRON_EXCEEDS_OVERDUE_COUNT
- grep { $_->standing_penalty == 2 } @{$self->{user}->standing_penalties}
+ grep { $_ == OILS_PENALTY_PATRON_EXCEEDS_OVERDUE_COUNT } @{$self->{user}->standing_penalties}
);
}
sub excessive_fines {
my $self = shift;
return scalar( # PATRON_EXCEEDS_FINES
- grep { $_->standing_penalty == 1 } @{$self->{user}->standing_penalties}
+ grep { $_ == OILS_PENALTY_PATRON_EXCEEDS_FINES } @{$self->{user}->standing_penalties}
);
}