Bug 20003: (QA follow-up) use patron checkouts method instead of Koha::Checkouts
authorNick Clemens <nick@bywatersolutions.com>
Fri, 26 Jan 2018 21:05:39 +0000 (21:05 +0000)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 30 Jan 2018 17:17:29 +0000 (14:17 -0300)
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

circ/returns.pl

index fab6bc2..247a71e 100755 (executable)
@@ -50,7 +50,6 @@ use Koha::AuthorisedValues;
 use Koha::DateUtils;
 use Koha::Calendar;
 use Koha::BiblioFrameworks;
-use Koha::Checkouts;
 use Koha::Holds;
 use Koha::Items;
 use Koha::Patrons;
@@ -596,7 +595,7 @@ foreach ( sort { $a <=> $b } keys %returneditems ) {
             $ri{bortitle}       = $patron->title;
             $ri{bornote}        = $patron->borrowernotes;
             $ri{borcategorycode}= $patron->categorycode;
-            $ri{borissuescount} = Koha::Checkouts->count( { borrowernumber => $patron->borrowernumber } );
+            $ri{borissuescount} = $patron->checkouts->count;
         }
         else {
             $ri{borrowernumber} = $riborrowernumber{$_};