[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] CVS: koha stats.screen.pl,1.3,1.4 stats.print.pl,1.4,1.5
From: |
Mason James |
Subject: |
[Koha-cvs] CVS: koha stats.screen.pl,1.3,1.4 stats.print.pl,1.4,1.5 |
Date: |
Tue, 23 Aug 2005 16:56:10 -0700 |
Update of /cvsroot/koha/koha
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2737
Modified Files:
stats.screen.pl stats.print.pl
Log Message:
Fixed non us date, and ?time=19/08/2005 now works.
Index: stats.screen.pl
===================================================================
RCS file: /cvsroot/koha/koha/stats.screen.pl,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** stats.screen.pl 23 Aug 2005 22:03:09 -0000 1.3
--- stats.screen.pl 23 Aug 2005 23:56:08 -0000 1.4
***************
*** 10,14 ****
use Date::Manip;
use C4::Stats;
!
my $input=new CGI;
--- 10,14 ----
use Date::Manip;
use C4::Stats;
! &Date_Init("DateFormat=non-US"); # set non-USA date, eg:19/08/2005
my $input=new CGI;
***************
*** 48,51 ****
--- 48,58 ----
$date2=DateCalc($date,$date2);
}
+ # if time is blank
+ if ($time eq ''){
+ $date=ParseDate('today');
+ $date2=ParseDate('tomorrow');
+ }
+
+
my $date=UnixDate($date,'%Y-%m-%d');
Index: stats.print.pl
===================================================================
RCS file: /cvsroot/koha/koha/stats.print.pl,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** stats.print.pl 22 Aug 2005 05:56:34 -0000 1.4
--- stats.print.pl 23 Aug 2005 23:56:08 -0000 1.5
***************
*** 11,14 ****
--- 11,15 ----
use C4::Stats;
use Text::CSV_XS;
+ &Date_Init("DateFormat=non-US"); # set non-USA date, eg:19/08/2005
my $csv = Text::CSV_XS->new(
***************
*** 51,57 ****
--- 52,65 ----
}
+ if ($time eq ''){
+ $date=ParseDate('today');
+ $date2=ParseDate('tomorrow');
+ }
+
+
my $date=UnixDate($date,'%Y-%m-%d');
my $date2=UnixDate($date2,'%Y-%m-%d');
+ #warn "MASON: DATE: $date, $date2";
#get a list of every payment
***************
*** 134,138 ****
print $input->header(
-type => 'application/vnd.ms-excel',
! -attachment => "moo.csv",
);
print "Branch, Datetime, Surame, Firstnames, Description, Type, Invoice
amount, Payment type, Payment Amount\n";
--- 142,146 ----
print $input->header(
-type => 'application/vnd.ms-excel',
! -attachment => "moo.csv",
);
print "Branch, Datetime, Surame, Firstnames, Description, Type, Invoice
amount, Payment type, Payment Amount\n";
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] CVS: koha stats.screen.pl,1.3,1.4 stats.print.pl,1.4,1.5,
Mason James <=