Bug 16913: Koha::Patrons - Remove GetBorrowersNamesAndLatestIssue
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 12 Jul 2016 07:37:33 +0000 (08:37 +0100)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 15 Jul 2016 18:18:27 +0000 (18:18 +0000)
This subroutine has been added by
  commit 5904681faca77c87ff8071414d66e123a2d3baa9
  Date:   Wed Mar 19 10:11:12 2008 -0500
    CleanBorrowers fixing.
but has never been used.
It can be removed safely.

Test plan:
  git grep GetBorrowersNamesAndLatestIssue
should not return any results.

Signed-off-by: Marc VĂ©ron <veron@veron.ch>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
C4/Members.pm

index 451b997..63e3f36 100644 (file)
@@ -1860,32 +1860,6 @@ sub GetBorrowersWithIssuesHistoryOlderThan {
     return \@results;
 }
 
-=head2 GetBorrowersNamesAndLatestIssue
-
-  $results = &GetBorrowersNamesAndLatestIssueList(@borrowernumbers)
-
-this function get borrowers Names and surnames and Issue information.
-
-I<@borrowernumbers> is an array which all elements are borrowernumbers.
-This hashref is containt the number of time this borrowers has borrowed before I<$date> and the borrowernumber.
-
-=cut
-
-sub GetBorrowersNamesAndLatestIssue {
-    my $dbh  = C4::Context->dbh;
-    my @borrowernumbers=@_;  
-    my $query = "
-       SELECT surname,lastname, phone, email,max(timestamp)
-       FROM borrowers 
-         LEFT JOIN issues ON borrowers.borrowernumber=issues.borrowernumber
-       GROUP BY borrowernumber
-   ";
-    my $sth = $dbh->prepare($query);
-    $sth->execute;
-    my $results = $sth->fetchall_arrayref({});
-    return $results;
-}
-
 =head2 IssueSlip
 
   IssueSlip($branchcode, $borrowernumber, $quickslip)