@@ -, +, @@ This attempt should succeed This attempt should now fail --- C4/SIP/ILS.pm | 4 ++++ C4/SIP/ILS/Patron.pm | 6 ++++++ 2 files changed, 10 insertions(+), 0 deletions(-) --- a/C4/SIP/ILS.pm +++ a/C4/SIP/ILS.pm @@ -254,6 +254,10 @@ sub add_hold { return $trans; } + if ( $patron->holds_blocked_by_excessive_fees() ) { + $trans->screen_msg("Excessive fees blocking placement of hold."); + } + if ($item->fee and $fee_ack ne 'Y') { $trans->screen_msg = "Fee required to place hold."; return $trans; --- a/C4/SIP/ILS/Patron.pm +++ a/C4/SIP/ILS/Patron.pm @@ -321,10 +321,16 @@ sub excessive_fees { my $self = shift; return ($self->fee_amount and $self->fee_amount > $self->fee_limit); } + sub excessive_fines { my $self = shift; return $self->excessive_fees; # excessive_fines is the same thing as excessive_fees for Koha } + +sub holds_blocked_by_excessive_fees { + return ( $self->fee_amount + && $self->fee_amount > C4::Context->preference("maxoutstanding") ); +} sub library_name { my $self = shift; --