Lines 23-29
use CGI qw ( -utf8 );
Link Here
|
23 |
use C4::Context; |
23 |
use C4::Context; |
24 |
use C4::Auth qw( get_template_and_user ); |
24 |
use C4::Auth qw( get_template_and_user ); |
25 |
use C4::Output qw( output_html_with_http_headers ); |
25 |
use C4::Output qw( output_html_with_http_headers ); |
26 |
use C4::Circulation qw( barcodedecode CanBookBeRenewed GetSoonestRenewDate GetLatestAutoRenewDate AddRenewal ); |
26 |
use C4::Circulation qw( barcodedecode CanBookBeRenewed GetLatestAutoRenewDate AddRenewal ); |
27 |
use Koha::DateUtils qw( dt_from_string output_pref ); |
27 |
use Koha::DateUtils qw( dt_from_string output_pref ); |
28 |
use Koha::Database; |
28 |
use Koha::Database; |
29 |
use Koha::BiblioFrameworks; |
29 |
use Koha::BiblioFrameworks; |
Lines 67-73
if ($barcode) {
Link Here
|
67 |
|
67 |
|
68 |
if ( ( $borrower->debarred() || q{} ) lt dt_from_string()->ymd() ) { |
68 |
if ( ( $borrower->debarred() || q{} ) lt dt_from_string()->ymd() ) { |
69 |
my $can_renew; |
69 |
my $can_renew; |
70 |
( $can_renew, $error ) = |
70 |
my $info; |
|
|
71 |
( $can_renew, $error, $info ) = |
71 |
CanBookBeRenewed( $borrower->borrowernumber(), |
72 |
CanBookBeRenewed( $borrower->borrowernumber(), |
72 |
$item->itemnumber(), $override_limit ); |
73 |
$item->itemnumber(), $override_limit ); |
73 |
|
74 |
|
Lines 82-91
if ($barcode) {
Link Here
|
82 |
} |
83 |
} |
83 |
|
84 |
|
84 |
if ( $error && ($error eq 'too_soon' or $error eq 'auto_too_soon') ) { |
85 |
if ( $error && ($error eq 'too_soon' or $error eq 'auto_too_soon') ) { |
85 |
$soonest_renew_date = C4::Circulation::GetSoonestRenewDate( |
86 |
$soonest_renew_date = $info; |
86 |
$borrower->borrowernumber(), |
|
|
87 |
$item->itemnumber(), |
88 |
); |
89 |
} |
87 |
} |
90 |
if ( $error && ( $error eq 'auto_too_late' ) ) { |
88 |
if ( $error && ( $error eq 'auto_too_late' ) ) { |
91 |
$latest_auto_renew_date = C4::Circulation::GetLatestAutoRenewDate( |
89 |
$latest_auto_renew_date = C4::Circulation::GetLatestAutoRenewDate( |