[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] koha overdue.pl [rel_2_2]
From: |
paul poulain |
Subject: |
[Koha-cvs] koha overdue.pl [rel_2_2] |
Date: |
Tue, 04 Apr 2006 13:13:47 +0000 |
CVSROOT: /cvsroot/koha
Module name: koha
Branch: rel_2_2
Changes by: paul poulain <address@hidden> 06/04/04 13:13:47
Modified files:
. : overdue.pl
Log message:
* using a left join to avoid missing some lines.
* fixing a bug when a parameter is empty.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/koha/overdue.pl.diff?only_with_tag=rel_2_2&tr1=1.9.2.10&tr2=1.9.2.11&r1=text&r2=text
Patches:
Index: koha/overdue.pl
diff -u koha/overdue.pl:1.9.2.10 koha/overdue.pl:1.9.2.11
--- koha/overdue.pl:1.9.2.10 Tue Feb 7 23:19:09 2006
+++ koha/overdue.pl Tue Apr 4 13:13:47 2006
@@ -1,6 +1,6 @@
#!/usr/bin/perl
-# $Id: overdue.pl,v 1.9.2.10 2006/02/07 23:19:09 kados Exp $
+# $Id: overdue.pl,v 1.9.2.11 2006/04/04 13:13:47 tipaul Exp $
# Copyright 2000-2002 Katipo Communications
#
@@ -34,7 +34,7 @@
my $bornamefilter=$input->param('borname');
my $borcatfilter=$input->param('borcat');
my $itemtypefilter=$input->param('itemtype');
-my $borflagsfilter=$input->param('borflags');
+my $borflagsfilter=$input->param('borflags') || " ";
my $branchfilter=$input->param('branch');
my $showall=$input->param('showall');
my $theme = $input->param('theme'); # only used if allowthemeoverride is set
@@ -121,9 +121,13 @@
$bornamefilter =~s/\*/\%/g;
$bornamefilter =~s/\?/\_/g;
-my $strsth="select date_due,concat(firstname,' ',surname) as borrower,
borrowers.phone, borrowers.emailaddress,issues.itemnumber, biblio.title,
biblio.author from issues, borrowers,items,biblioitems, biblio where
isnull(returndate) ";
+my $strsth="select date_due,concat(surname,' ', firstname) as borrower,
borrowers.phone, borrowers.emailaddress,issues.itemnumber, biblio.title,
biblio.author from issues
+LEFT JOIN borrowers ON issues.borrowernumber=borrowers.borrowernumber
+LEFT JOIN items ON issues.itemnumber=items.itemnumber
+LEFT JOIN biblioitems ON biblioitems.biblioitemnumber=items.biblioitemnumber
+LEFT JOIN biblio ON biblio.biblionumber=items.biblionumber
+where isnull(returndate) ";
$strsth.= " && date_due<'".$todaysdate."' " unless ($showall);
-$strsth.= " && issues.borrowernumber=borrowers.borrowernumber &&
issues.itemnumber=items.itemnumber &&
biblioitems.biblioitemnumber=items.biblioitemnumber &&
biblio.biblionumber=items.biblionumber ";
$strsth.=" && (borrowers.firstname like '".$bornamefilter."%' or
borrowers.surname like '".$bornamefilter."%' or borrowers.cardnumber like
'".$bornamefilter."%')" if($bornamefilter) ;
$strsth.=" && borrowers.categorycode = '".$borcatfilter."' " if($borcatfilter)
;
$strsth.=" && biblioitems.itemtype = '".$itemtypefilter."' "
if($itemtypefilter) ;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] koha overdue.pl [rel_2_2],
paul poulain <=