From 19ee95a6d5a292152ac0313ad4429b78210da4e0 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 Signed-off-by: Kyle M Hall --- C4/Circulation.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 4325801d09..6e6f4c14a0 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.39.5