Lines 62-67
use Koha::Charges::Fees;
Link Here
|
62 |
use Koha::Config::SysPref; |
62 |
use Koha::Config::SysPref; |
63 |
use Koha::Checkouts::ReturnClaims; |
63 |
use Koha::Checkouts::ReturnClaims; |
64 |
use Koha::SearchEngine::Indexer; |
64 |
use Koha::SearchEngine::Indexer; |
|
|
65 |
use Koha::Exceptions::Checkout; |
65 |
use Carp; |
66 |
use Carp; |
66 |
use List::MoreUtils qw( uniq any ); |
67 |
use List::MoreUtils qw( uniq any ); |
67 |
use Scalar::Util qw( looks_like_number ); |
68 |
use Scalar::Util qw( looks_like_number ); |
Lines 3039-3044
sub AddRenewal {
Link Here
|
3039 |
); |
3040 |
); |
3040 |
|
3041 |
|
3041 |
$sth->execute( $datedue->strftime('%Y-%m-%d %H:%M'), $renews, $unseen_renewals, $lastreneweddate, $borrowernumber, $itemnumber ); |
3042 |
$sth->execute( $datedue->strftime('%Y-%m-%d %H:%M'), $renews, $unseen_renewals, $lastreneweddate, $borrowernumber, $itemnumber ); |
|
|
3043 |
if ( $sth->err ){ |
3044 |
Koha::Exceptions::Checkout::FailedRenewal->throw( |
3045 |
error => 'Update of issue# ' . $issue->issue_id . ' failed with error: ' . $sth->errstr |
3046 |
); |
3047 |
} |
3042 |
|
3048 |
|
3043 |
# Update the renewal count on the item, and tell zebra to reindex |
3049 |
# Update the renewal count on the item, and tell zebra to reindex |
3044 |
$renews = ( $item_object->renewals || 0 ) + 1; |
3050 |
$renews = ( $item_object->renewals || 0 ) + 1; |