Bug 10184 - Circulation History reverses sort order
[koha.git] / circ / pendingreserves.pl
index 0f5d3da..9a60ec1 100755 (executable)
@@ -141,6 +141,7 @@ if ( $run_report ) {
     $sqldatewhere
     AND (reserves.itemnumber IS NULL OR reserves.itemnumber = items.itemnumber)
     AND items.itemnumber NOT IN (SELECT itemnumber FROM branchtransfers where datearrived IS NULL)
+    AND items.itemnumber NOT IN (select itemnumber FROM reserves where found='W')
     AND issues.itemnumber IS NULL
     AND reserves.priority <> 0 
     AND reserves.suspend = 0
@@ -150,7 +151,7 @@ if ( $run_report ) {
     #    multiple patrons have a hold on an item
 
 
-    if (C4::Context->preference('IndependantBranches')){
+    if (C4::Context->preference('IndependentBranches')){
         $strsth .= " AND items.holdingbranch=? ";
         push @query_params, C4::Context->userenv->{'branch'};
     }