bugfixing pending reserves
[koha_fer] / circ / transferstodo.pl
index 174061a..1837e33 100755 (executable)
@@ -1,6 +1,5 @@
 #!/usr/bin/perl
 
-# $Id$
 
 # Copyright 2000-2002 Katipo Communications
 #
@@ -25,7 +24,7 @@ use C4::Output;
 use CGI;
 use C4::Branch; # GetBranches
 use C4::Auth;
-use C4::Date;
+use C4::Dates qw/format_date/;
 use C4::Circulation;
 use C4::Reserves;
 use C4::Members;
@@ -36,6 +35,7 @@ use Date::Calc qw(
 );
 use C4::Koha;
 use C4::Biblio;
+use C4::Items;
 
 my $input = new CGI;
 
@@ -53,12 +53,6 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
 # set the userenv branch
 my $default = C4::Context->userenv->{'branch'};
 
-my @datearr    = localtime( time() );
-my $todaysdate =
-    ( 1900 + $datearr[5] ) . '-'
-  . sprintf( "%0.2d", ( $datearr[4] + 1 ) ) . '-'
-  . sprintf( "%0.2d", $datearr[3] );
-
 my $item = $input->param('itemnumber');
 my $fbr  = $input->param('fbr');
 my $tbr  = $input->param('tbr');
@@ -134,7 +128,8 @@ foreach my $br ( keys %$branches ) {
 
 $template->param(
     branchesloop => \@branchesloop,
-    show_date    => format_date($todaysdate)
+    show_date    => format_date(C4::Dates->today('iso')),
+       dateformat    => C4::Context->preference("dateformat"),
 );
 
 output_html_with_http_headers $input, $cookie, $template->output;