From d5bec857934fe7d92db2cb2a5009f605cf2eb3e0 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 20 Dec 2016 14:45:33 +0100 Subject: [PATCH] Bug 17678: Use Koha::Checkouts instead of Koha::Issues --- C4/Circulation.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 4325801..6e6f4c1 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -43,6 +43,7 @@ use Koha::Account; use Koha::AuthorisedValues; use Koha::DateUtils; use Koha::Calendar; +use Koha::Checkouts; use Koha::IssuingRules; use Koha::Items; use Koha::Patrons; @@ -1066,7 +1067,7 @@ sub CanBookBeIssued { require C4::Serials; my $is_a_subscription = C4::Serials::CountSubscriptionFromBiblionumber($biblionumber); unless ($is_a_subscription) { - my $issues = Koha::Issues->search( + my $checkouts = Koha::Checkouts->search( { borrowernumber => $borrower->{borrowernumber}, biblionumber => $biblionumber, @@ -1077,7 +1078,7 @@ sub CanBookBeIssued { ); # if we get here, we don't already have a loan on this item, # so if there are any loans on this bib, ask for confirmation - if ( $issues->count ) { + if ( $checkouts->count ) { $needsconfirmation{BIBLIO_ALREADY_ISSUED} = 1; } } -- 2.9.3