X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=circ%2Fcirculation.pl;h=26e20ae16b337a5338011a224bb851f1744b6163;hb=1d62ea2c9ff7edc0bc1e202b8f5591939ee5735f;hp=11b40a4132b1ea4d439faae883c549f752279f83;hpb=b7b6a8e388bea78dd7511b11df7380bcee649a79;p=koha_fer diff --git a/circ/circulation.pl b/circ/circulation.pl index 11b40a4132..26e20ae16b 100755 --- a/circ/circulation.pl +++ b/circ/circulation.pl @@ -4,6 +4,7 @@ # Copyright 2000-2002 Katipo Communications # copyright 2010 BibLibre +# Copyright 2011 PTFS-Europe Ltd. # # This file is part of Koha. # @@ -36,6 +37,7 @@ use C4::Reserves; use C4::Context; use CGI::Session; use C4::Members::Attributes qw(GetBorrowerAttributes); +use Koha::DateUtils; use Date::Calc qw( Today @@ -144,8 +146,9 @@ my $duedatespec_allow = C4::Context->preference('SpecifyDueDate'); if($duedatespec_allow){ if ($duedatespec) { if ($duedatespec =~ C4::Dates->regexp('syspref')) { - my $tempdate = C4::Dates->new($duedatespec); - $datedue = $tempdate; + $datedue = dt_from_string($duedatespec); + $datedue->set_hour(23); + $datedue->set_minute(59); } else { $invalidduedate = 1; $template->param(IMPOSSIBLE=>1, INVALID_DATE=>$duedatespec); @@ -445,9 +448,10 @@ sub build_issue_data { $totalprice += $it->{'replacementprice'}; $it->{'itemtype'} = $itemtypeinfo->{'description'}; $it->{'itemtype_image'} = $itemtypeinfo->{'imageurl'}; - $it->{'dd'} = format_date($it->{'date_due'}); + $it->{'dd'} = output_pref($it->{'date_due'}); $it->{'displaydate'} = format_date($it->{'issuedate'}); - $it->{'od'} = ( $it->{'date_due'} lt $todaysdate ) ? 1 : 0 ; + #$it->{'od'} = ( $it->{'date_due'} lt $todaysdate ) ? 1 : 0 ; + $it->{'od'} = $it->{'overdue'}; ($it->{'author'} eq '') and $it->{'author'} = ' '; $it->{'renew_failed'} = $renew_failed{$it->{'itemnumber'}};