>From 5eeff4b998df8e99269f956f0a197f86baad62ac Mon Sep 17 00:00:00 2001
From: Darrell Ulm <[EMAIL PROTECTED]>
Date: Thu, 19 Jun 2008 13:11:25 -0400
Subject: [PATCH] Fix for item showing up when already waiting, tested on
small dataset worked - D.Ulm

---
 circ/pendingreserves.pl |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/circ/pendingreserves.pl b/circ/pendingreserves.pl
index b083319..35dda24 100755
--- a/circ/pendingreserves.pl
+++ b/circ/pendingreserves.pl
@@ -144,12 +144,13 @@ my $strsth =
        LEFT JOIN biblio ON reserves.biblionumber=biblio.biblionumber
        LEFT JOIN branchtransfers ON
items.itemnumber=branchtransfers.itemnumber
  WHERE
-reserves.found IS NULL
- $sqldatewhere
-AND items.itemnumber NOT IN (SELECT itemnumber FROM branchtransfers where
datearrived IS NULL)
+#reserves.priority <> 0
+#reserves.found IS NULL
+items.itemnumber NOT IN (SELECT itemnumber FROM branchtransfers where
datearrived IS NULL)
 AND items.itemnumber NOT IN (SELECT itemnumber FROM issues WHERE itemnumber
IS NOT NULL)
-AND reserves.priority <> 0
+AND items.itemnumber NOT IN (SELECT itemnumber FROM reserves WHERE found IS
NOT NULL or priority = 0)
 AND notforloan = 0 AND damaged = 0 AND itemlost = 0 AND wthdrawn = 0
+$sqldatewhere
 ";
 # GROUP BY reserves.biblionumber allows only items that are not checked
out, else multiples occur when
 #    multiple patrons have a hold on an item
--
1.5.3.7
_______________________________________________
Koha-patches mailing list
[email protected]
http://lists.koha.org/mailman/listinfo/koha-patches

Reply via email to