From 6bcbfd23eb97204e0883df3a9645005bbb0d0923 Mon Sep 17 00:00:00 2001 From: tonnesen Date: Tue, 3 Sep 2002 21:03:51 +0000 Subject: [PATCH] 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. --- C4/Acquisitions.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/C4/Acquisitions.pm b/C4/Acquisitions.pm index e18349a809..cb189a36c6 100644 --- a/C4/Acquisitions.pm +++ b/C4/Acquisitions.pm @@ -340,10 +340,14 @@ sub newbasket { } 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='2001-07-01' + and aqbudget.startdate<'$today' and aqbudget.enddate > '$today' group by aqbookfund.bookfundid order by bookfundname"; my $sth=$dbh->prepare($query); $sth->execute; -- 2.39.5