@@ -, +, @@ HoldTitle --- C4/ILSDI/Services.pm | 6 ++++++ 1 file changed, 6 insertions(+) --- a/C4/ILSDI/Services.pm +++ a/C4/ILSDI/Services.pm @@ -675,6 +675,9 @@ sub HoldTitle { my $patron = Koha::Patrons->find( $borrowernumber ); return { code => 'PatronNotFound' } unless $patron; + # If borrower is debarred return an error code + return { code => 'PatronDebarred' } if $patron->is_debarred; + # Get the biblio record, or return an error code my $biblionumber = $cgi->param('bib_id'); my $biblio = Koha::Biblios->find( $biblionumber ); @@ -760,6 +763,9 @@ sub HoldItem { my $patron = Koha::Patrons->find( $borrowernumber ); return { code => 'PatronNotFound' } unless $patron; + # If borrower is debarred return an error code + return { code => 'PatronDebarred' } if $patron->is_debarred; + # Get the biblio or return an error code my $biblionumber = $cgi->param('bib_id'); my $biblio = Koha::Biblios->find( $biblionumber ); --