[Koha-cvs] koha overdue.pl [R_2-2-7-1]
Antoine Farnault
antoine at koha-fr.org
Mon Feb 12 11:15:05 CET 2007
CVSROOT: /sources/koha
Module name: koha
Branch: R_2-2-7-1
Changes by: Antoine Farnault <toins> 07/02/12 10:15:05
Modified files:
. : overdue.pl
Log message:
Commiting BUG FIX for 2.2.7.1.
(Fix for bug 1102, dates are now formatted in according to the preference chosen
metric,us,iso etcl)
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/overdue.pl?cvsroot=koha&only_with_tag=R_2-2-7-1&r1=1.9.2.12&r2=1.9.2.12.2.1
Patches:
Index: overdue.pl
===================================================================
RCS file: /sources/koha/koha/Attic/overdue.pl,v
retrieving revision 1.9.2.12
retrieving revision 1.9.2.12.2.1
diff -u -b -r1.9.2.12 -r1.9.2.12.2.1
--- overdue.pl 14 Jun 2006 15:37:46 -0000 1.9.2.12
+++ overdue.pl 12 Feb 2007 10:15:05 -0000 1.9.2.12.2.1
@@ -1,6 +1,6 @@
#!/usr/bin/perl
-# $Id: overdue.pl,v 1.9.2.12 2006/06/14 15:37:46 tipaul Exp $
+# $Id: overdue.pl,v 1.9.2.12.2.1 2007/02/12 10:15:05 toins Exp $
# Copyright 2000-2002 Katipo Communications
#
@@ -27,6 +27,7 @@
use C4::Auth;
use C4::Koha;
use C4::Acquisition;
+use C4::Date;
my $input = new CGI;
my $type=$input->param('type');
@@ -121,11 +122,13 @@
$bornamefilter =~s/\*/\%/g;
$bornamefilter =~s/\?/\_/g;
-my $strsth="select date_due,concat(surname,' ', firstname) as borrower, borrowers.phone, borrowers.emailaddress,issues.itemnumber, biblio.title, biblio.author,borrowers.borrowernumber 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
+my $strsth="select date_due,concat(surname,' ', firstname) as borrower,
+ borrowers.phone, borrowers.emailaddress,issues.itemnumber, biblio.title, biblio.author,borrowers.borrowernumber
+ 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.=" && (borrowers.firstname like '".$bornamefilter."%' or borrowers.surname like '".$bornamefilter."%' or borrowers.cardnumber like '".$bornamefilter."%')" if($bornamefilter) ;
@@ -133,23 +136,18 @@
$strsth.=" && biblioitems.itemtype = '".$itemtypefilter."' " if($itemtypefilter) ;
$strsth.=" && borrowers.flags = '".$borflagsfilter."' " if ($borflagsfilter ne " ") ;
$strsth.=" && issues.branchcode = '".$branchfilter."' " if($branchfilter) ;
-# my $bornamefilter=$input->param('borname');
-# my $borcatfilter=$input->param('borcat');
-# my $itemtypefilter=$input->param('itemtype');
-# my $borflagsfilter=$input->param('borflags');
-# my $branchfilter=$input->param('branch');
if ($order eq "borrower"){
$strsth.=" order by borrower,date_due " ;
} else {
$strsth.=" order by date_due,borrower ";
}
my $sth=$dbh->prepare($strsth);
-warn "overdue.pl : query string ".$strsth;
$sth->execute();
my @overduedata;
while (my $data=$sth->fetchrow_hashref) {
$duedate=$data->{'date_due'};
+ $duedate = format_date($duedate);
$itemnum=$data->{'itemnumber'};
$name=$data->{'borrower'};
@@ -171,6 +169,7 @@
}
$sth->finish;
+$todaysdate=format_date($todaysdate);
$template->param(todaysdate => $todaysdate,
overdueloop => \@overduedata,
intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
@@ -178,4 +177,4 @@
IntranetNav => C4::Context->preference("IntranetNav"),
);
-print "Content-Type: text/html\n\n", $template->output;
+print $input->header(), $template->output;
More information about the Koha-cvs
mailing list