Lines 59-64
use Koha::Charges::Fees;
Link Here
|
59 |
use Koha::Util::SystemPreferences; |
59 |
use Koha::Util::SystemPreferences; |
60 |
use Koha::Checkouts::ReturnClaims; |
60 |
use Koha::Checkouts::ReturnClaims; |
61 |
use Koha::SearchEngine::Indexer; |
61 |
use Koha::SearchEngine::Indexer; |
|
|
62 |
use Koha::Exceptions::Checkout; |
62 |
use Carp; |
63 |
use Carp; |
63 |
use List::MoreUtils qw( uniq any ); |
64 |
use List::MoreUtils qw( uniq any ); |
64 |
use Scalar::Util qw( looks_like_number ); |
65 |
use Scalar::Util qw( looks_like_number ); |
Lines 3084-3090
sub AddRenewal {
Link Here
|
3084 |
AND itemnumber=?" |
3085 |
AND itemnumber=?" |
3085 |
); |
3086 |
); |
3086 |
|
3087 |
|
3087 |
$sth->execute( $datedue->strftime('%Y-%m-%d %H:%M'), $renews, $unseen_renewals, $lastreneweddate, $borrowernumber, $itemnumber ); |
3088 |
my $success =$sth->execute( $datedue->strftime('%Y-%m-%d %H:%M'), $renews, $unseen_renewals, $lastreneweddate, $borrowernumber, $itemnumber ); |
|
|
3089 |
unless ( $success ){ |
3090 |
Koha::Exceptions::Checkout::FailedRenewal->throw( |
3091 |
error => 'unable to update issue ' . $issue->issue_id |
3092 |
); |
3093 |
} |
3088 |
|
3094 |
|
3089 |
# Update the renewal count on the item, and tell zebra to reindex |
3095 |
# Update the renewal count on the item, and tell zebra to reindex |
3090 |
$renews = ( $item_object->renewals || 0 ) + 1; |
3096 |
$renews = ( $item_object->renewals || 0 ) + 1; |