[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] CVS: koha/C4 Acquisitions.pm,1.5.2.13,1.5.2.14
From: |
Steve Tonnesen |
Subject: |
[Koha-cvs] CVS: koha/C4 Acquisitions.pm,1.5.2.13,1.5.2.14 |
Date: |
Tue, 03 Sep 2002 14:03:53 -0700 |
Update of /cvsroot/koha/koha/C4
In directory usw-pr-cvs1:/tmp/cvs-serv22953
Modified Files:
Tag: rel-1-2
Acquisitions.pm
Log Message:
removed hard coded budget date from sub bookfunds();
Replaced with a check that today's date is after the startdate and before the
enddate of the budget.
Index: Acquisitions.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Acquisitions.pm,v
retrieving revision 1.5.2.13
retrieving revision 1.5.2.14
diff -C2 -r1.5.2.13 -r1.5.2.14
*** Acquisitions.pm 14 Aug 2002 18:30:50 -0000 1.5.2.13
--- Acquisitions.pm 3 Sep 2002 21:03:51 -0000 1.5.2.14
***************
*** 341,348 ****
sub bookfunds {
my $dbh=C4Connect;
my $query="Select * from aqbookfund,aqbudget where aqbookfund.bookfundid
=aqbudget.bookfundid
! and aqbudget.startdate='2001-07-01'
group by aqbookfund.bookfundid order by bookfundname";
my $sth=$dbh->prepare($query);
--- 341,352 ----
sub bookfunds {
+ my ($day,$month,$year)=(localtime(time))[3,4,5];
+ $year+=1900;
+ $month++;
+ my $today=sprintf "%4d-%02d-%02d", $year, $monthm, $day;
my $dbh=C4Connect;
my $query="Select * from aqbookfund,aqbudget where aqbookfund.bookfundid
=aqbudget.bookfundid
! and aqbudget.startdate<'$today' and aqbudget.enddate > '$today'
group by aqbookfund.bookfundid order by bookfundname";
my $sth=$dbh->prepare($query);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] CVS: koha/C4 Acquisitions.pm,1.5.2.13,1.5.2.14,
Steve Tonnesen <=