From 77a5a6f8e73da565b429164961d4365d50f0159d Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Thu, 7 Jul 2016 16:10:24 +0000 Subject: [PATCH] Bug 16870 - Update Koha::Patron use of the class Test Plan: 1) Apply this patch 2) prove t/db_dependent/Patron/Borrower_PrevCheckout.t 3) prove t/db_dependent/Koha/Checkouts.t --- Koha/Patron.pm | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Koha/Patron.pm b/Koha/Patron.pm index 5ba5efc..37a1d85 100644 --- a/Koha/Patron.pm +++ b/Koha/Patron.pm @@ -24,7 +24,7 @@ use Carp; use C4::Context; use Koha::Database; -use Koha::Issues; +use Koha::Checkouts; use Koha::OldIssues; use Koha::Patron::Categories; use Koha::Patron::Images; @@ -153,19 +153,19 @@ sub do_check_for_previous_checkout { push @item_nos, $item->itemnumber; } - # Create (old)issues search criteria + # Create (old)checkouts search criteria my $criteria = { borrowernumber => $self->borrowernumber, itemnumber => \@item_nos, }; - # Check current issues table - my $issues = Koha::Issues->search($criteria); - return 1 if $issues->count; # 0 || N + # Check current checkouts table + my $checkouts = Koha::Checkouts->search($criteria); + return 1 if $checkouts->count; # 0 || N - # Check old issues table - my $old_issues = Koha::OldIssues->search($criteria); - return $old_issues->count; # 0 || N + # Check old checkouts table + my $old_checkouts = Koha::OldIssues->search($criteria); + return $old_checkouts->count; # 0 || N } =head3 type -- 2.1.4