From 3fd3b300c4a0feea1ae3aa15eeeccf8ee83c8c12 Mon Sep 17 00:00:00 2001 From: tonnesen Date: Wed, 2 May 2001 22:38:26 +0000 Subject: [PATCH] Added an overdue variable to the itemdata returned by the currentissues subroutine. This makes it easier to pick out overdue items in other modules (ie circulation, reports, etc.) --- C4/Circulation/Circ2.pm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/C4/Circulation/Circ2.pm b/C4/Circulation/Circ2.pm index 033054b13c..ce86f54c67 100755 --- a/C4/Circulation/Circ2.pm +++ b/C4/Circulation/Circ2.pm @@ -635,7 +635,14 @@ sub currentissues { while (my $data = $sth->fetchrow_hashref) { $data->{'dewey'}=~s/0*$//; ($data->{'dewey'} == 0) && ($data->{'dewey'}=''); + my @datearr = localtime(time()); + my $todaysdate = (1900+$datearr[5]).sprintf ("%0.2d", ($datearr[4] + +1)).sprintf ("%0.2d", $datearr[3]); my $datedue=$data->{'date_due'}; + $datedue=~s/-//g; + if ($datedue < $todaysdate) { + $data->{'overdue'}=1; + } my $itemnumber=$data->{'itemnumber'}; $currentissues{$counter}=$data; $counter++; -- 2.39.5