(bug #5154) fix most checkouts report
Ignore null/deleted borrowers Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
This commit is contained in:
parent
c49dc072aa
commit
666cc03bd3
1 changed files with 5 additions and 4 deletions
|
@ -296,10 +296,11 @@ sub calculate {
|
|||
$strcalc .= "SELECT CONCAT(borrowers.surname , \",\\t\",borrowers.firstname), COUNT(*) AS RANK, borrowers.borrowernumber AS ID";
|
||||
$strcalc .= " , $colfield " if ($colfield);
|
||||
$strcalc .= " FROM `old_issues`
|
||||
LEFT JOIN borrowers ON old_issues.borrowernumber=borrowers.borrowernumber
|
||||
LEFT JOIN items ON items.itemnumber=old_issues.itemnumber
|
||||
LEFT JOIN biblioitems ON (biblioitems.biblioitemnumber=items.biblioitemnumber)
|
||||
WHERE 1";
|
||||
LEFT JOIN borrowers USING(borrowernumber)
|
||||
LEFT JOIN items USING(itemnumber)
|
||||
LEFT JOIN biblioitems USING(biblioitemnumber)
|
||||
WHERE old_issues.borrowernumber IS NOT NULL
|
||||
";
|
||||
my @filterterms = (
|
||||
'old_issues.timestamp >',
|
||||
'old_issues.timestamp <',
|
||||
|
|
Loading…
Reference in a new issue