From 472d77353e1997844f50475bef5b7b5027c9f203 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Tue, 13 May 2008 10:56:49 -0500 Subject: [PATCH] patron cleaning - do not delete staff borrowers Adjusted C4::Members::GetBorrowersWhoHaveNotBorrowedSince so that staff member records are not selected for deletion. This functionality change is motivated by the consideration that a staff member who is authorized to operate Koha is not necessarily a prolific user of the library's services. If a batch purge job for inactive staff records is really need, it should be a separate tool. Signed-off-by: Joshua Ferraro --- C4/Members.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/C4/Members.pm b/C4/Members.pm index 41e92dc574..226308fbaa 100644 --- a/C4/Members.pm +++ b/C4/Members.pm @@ -1856,11 +1856,13 @@ sub GetBorrowersWhoHaveNotBorrowedSince { my $query = " SELECT borrowers.borrowernumber,max(issues.timestamp) as latestissue FROM borrowers - LEFT JOIN issues ON borrowers.borrowernumber = issues.borrowernumber + JOIN categories USING (categorycode) + LEFT JOIN issues ON borrowers.borrowernumber = issues.borrowernumber + WHERE category_type <> 'S' "; my @query_params; if ($filterbranch && $filterbranch ne ""){ - $query.=" WHERE borrowers.branchcode= ?"; + $query.=" AND borrowers.branchcode= ?"; push @query_params,$filterbranch; } $query.=" GROUP BY borrowers.borrowernumber"; -- 2.39.5