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 <jmf@liblime.com>
This commit is contained in:
Galen Charlton 2008-05-13 10:56:49 -05:00 committed by Joshua Ferraro
parent b42b8da0d6
commit 472d77353e

View file

@ -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";