Fix for Bug 3397 - Deleting item record leaves a hole in patron's reading history
authorOwen Leonard <oleonard@myacpl.org>
Wed, 18 May 2011 14:20:51 +0000 (10:20 -0400)
committerChris Cormack <chrisc@catalyst.net.nz>
Sun, 10 Jul 2011 08:17:56 +0000 (20:17 +1200)
Excluding entries in old_issues which have a NULL itemnumber

Signed-off-by: Magnus Enger <magnus@enger.priv.no>
Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
C4/Members.pm

index 4eb9979..aab3caa 100644 (file)
@@ -1123,7 +1123,7 @@ sub GetAllIssues {
   LEFT JOIN items on items.itemnumber=old_issues.itemnumber
   LEFT JOIN biblio ON items.biblionumber=biblio.biblionumber
   LEFT JOIN biblioitems ON items.biblioitemnumber=biblioitems.biblioitemnumber
-  WHERE borrowernumber=? 
+  WHERE borrowernumber=? AND old_issues.itemnumber IS NOT NULL
   order by $order";
     if ( $limit != 0 ) {
         $query .= " limit $limit";