Revert "fix for 2181: Late Items in Red"
authorJoshua Ferraro <jmf@liblime.com>
Fri, 11 Jul 2008 02:30:03 +0000 (21:30 -0500)
committerJoshua Ferraro <jmf@liblime.com>
Fri, 11 Jul 2008 02:30:03 +0000 (21:30 -0500)
This used Date::Manip which we went to great lengths to remove about a year ago.

This reverts commit 36b2897430b27a6b8a12f6684d32bc64e026073f.

circ/circulation.pl

index b165d68..61babaa 100755 (executable)
@@ -44,10 +44,6 @@ use Date::Calc qw(
   Date_to_Days
 );
 
-use Date::Manip qw(
-  Date_Cmp
-);
-
 
 #
 # PARAMETERS READING
@@ -454,7 +450,9 @@ if ($borrower) {
     ($restype) and $it->{'can_renew'} = 0;
 
     $it->{'dd'} = format_date($it->{'date_due'});
-    $it->{'od'} = Date_Cmp($todaysdate, $it->{'date_due'}) == 1 ? 1 : 0 ;
+        my $datedue = $it->{'date_due'};
+        $datedue =~ s/-//g;
+    $it->{'od'} = ($datedue < $todaysdate) ? 1 : 0 ;
         ($it->{'author'} eq '') and $it->{'author'} = ' ';
         $it->{'renew_failed'} = $renew_failed[$it->{'itemnumber'}];
         # ADDED BY JF: NEW ITEMTYPE COUNT DISPLAY