From a39bfaf75dde10dd95c637478793b615724fee2e Mon Sep 17 00:00:00 2001 From: rangi Date: Thu, 25 Aug 2005 23:15:34 +0000 Subject: [PATCH] fixing unfilledreserves --- C4/Stats.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/C4/Stats.pm b/C4/Stats.pm index ac7f5e9c5d..b1529e3e1f 100644 --- a/C4/Stats.pm +++ b/C4/Stats.pm @@ -211,7 +211,8 @@ sub Getpaidbranch{ # Otherwise, it needs a POD. sub unfilledreserves { my $dbh = C4::Context->dbh; - my $sth=$dbh->prepare("select *,biblio.title from reserves,reserveconstraints,biblio,borrowers,biblioitems where found <> 'F' and cancellationdate + my $sth=$dbh->prepare("select *,biblio.title from reserves,reserveconstraints,biblio,borrowers,biblioitems where (found <> 'F' or + found is NULL) and cancellationdate is NULL and biblio.biblionumber=reserves.biblionumber and reserves.constrainttype='o' and (reserves.biblionumber=reserveconstraints.biblionumber @@ -228,7 +229,7 @@ sub unfilledreserves { $i++; } $sth->finish; - $sth=$dbh->prepare("select *,biblio.title from reserves,biblio,borrowers where found <> 'F' and cancellationdate + $sth=$dbh->prepare("select *,biblio.title from reserves,biblio,borrowers where (found <> 'F' or found is NULL) and cancellationdate is NULL and biblio.biblionumber=reserves.biblionumber and reserves.constrainttype='a' and reserves.borrowernumber=borrowers.borrowernumber order by -- 2.20.1