[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] koha overdue.pl [rel_2_2]
From: |
Chris Cormack |
Subject: |
[Koha-cvs] koha overdue.pl [rel_2_2] |
Date: |
Fri, 19 Jan 2007 09:33:48 +0000 |
CVSROOT: /sources/koha
Module name: koha
Branch: rel_2_2
Changes by: Chris Cormack <rangi> 07/01/19 09:33:48
Modified files:
. : overdue.pl
Log message:
Fix for bug 1102, dates are now formatted in according to the
preference chosen
metric,us,iso etc
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/overdue.pl?cvsroot=koha&only_with_tag=rel_2_2&r1=1.9.2.12&r2=1.9.2.13
Patches:
Index: overdue.pl
===================================================================
RCS file: /sources/koha/koha/Attic/overdue.pl,v
retrieving revision 1.9.2.12
retrieving revision 1.9.2.13
diff -u -b -r1.9.2.12 -r1.9.2.13
--- overdue.pl 14 Jun 2006 15:37:46 -0000 1.9.2.12
+++ overdue.pl 19 Jan 2007 09:33:48 -0000 1.9.2.13
@@ -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.13 2007/01/19 09:33:48 rangi 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');
@@ -116,16 +117,19 @@
my $author;
my @datearr = localtime(time());
my $todaysdate = (1900+$datearr[5]).'-'.sprintf ("%0.2d",
($datearr[4]+1)).'-'.sprintf ("%0.2d", $datearr[3]);
+$todaysdate=format_date($todaysdate);
my $dbh = C4::Context->dbh;
$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) ;
@@ -150,6 +154,7 @@
my @overduedata;
while (my $data=$sth->fetchrow_hashref) {
$duedate=$data->{'date_due'};
+ $duedate = format_date($duedate);
$itemnum=$data->{'itemnumber'};
$name=$data->{'borrower'};
@@ -178,4 +183,4 @@
IntranetNav => C4::Context->preference("IntranetNav"),
);
-print "Content-Type: text/html\n\n", $template->output;
+print $input->header(), $template->output;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] koha overdue.pl [rel_2_2],
Chris Cormack <=