#
# Koha is free software; you can redistribute it and/or modify it under the
# terms of the GNU General Public License as published by the Free Software
-# Foundation; either version 2 of the License, or (at your option) any later
+# Foundation; either version 3 of the License, or (at your option) any later
# version.
#
# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
my $override_limit = $cgi->param('override_limit');
my $override_holds = $cgi->param('override_holds');
-my ( $item, $issue, $borrower, $error );
+my ( $item, $issue, $borrower );
+my $error = q{};
if ($barcode) {
$item = $schema->resultset("Item")->single( { barcode => $barcode } );
if ($issue) {
$borrower = $issue->borrower();
-
- if ( $borrower->debarred() lt dt_from_string()->ymd() ) {
+
+ if ( ( $borrower->debarred() || q{} ) lt dt_from_string()->ymd() ) {
my $can_renew;
( $can_renew, $error ) =
CanBookBeRenewed( $borrower->borrowernumber(),
$item->itemnumber(), $override_limit );
- if ( $error eq 'on_reserve' ) {
+ if ( $error && ($error eq 'on_reserve') ) {
if ($override_holds) {
$can_renew = 1;
$error = undef;