Merge branch 'master' of http://manage-gmc.dev.kohalibrary.com/koha-installer
[koha.git] / admin / aqbudget.pl
index e5642ce..ed579f4 100755 (executable)
@@ -41,20 +41,18 @@ use strict;
 use CGI;
 use C4::Branch; # GetBranches
 use List::Util qw/min/;
-
-use C4::Date;
+use C4::Dates qw/format_date format_date_in_iso/;
 use C4::Auth;
 use C4::Acquisition;
 use C4::Context;
 use C4::Output;
-use C4::Interface::CGI::Output;
 use C4::Koha;
 
 my $input = new CGI;
 my $script_name="/cgi-bin/koha/admin/aqbudget.pl";
-my $bookfundid=$input->param('bookfundid');
-my $aqbudgetid=$input->param('aqbudgetid');
-my $branchcodeid=$input->param('branchcode');
+my $bookfundid   = $input->param('bookfundid');
+my $aqbudgetid   = $input->param('aqbudgetid');
+my $branchcodeid = $input->param('branchcode');
 my $pagesize = 20;
 my $op = $input->param('op');
 
@@ -71,7 +69,7 @@ my ($template, $borrowernumber, $cookie)
 
 $template->param(
     action => $script_name,
-    DHTMLcalendar_dateformat => get_date_format_string_for_DHTMLcalendar(),
+    DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(),
     script_name => $script_name,
     $op || 'else' => 1,
 );
@@ -167,10 +165,10 @@ SELECT branchcode,
     $sth->finish;
 
     $template->param(
-        dateformat => display_date_format(),
+        dateformat => C4::Dates->new()->visual(),
         aqbudgetid => $dataaqbudget->{'aqbudgetid'},
         startdate => format_date($dataaqbudget->{'startdate'}),
-        enddate => format_date($dataaqbudget->{'enddate'}),
+          enddate => format_date($dataaqbudget->{'enddate'}),
         budgetamount => $dataaqbudget->{'budgetamount'},
         branches => \@branches,
     );
@@ -342,7 +340,7 @@ SELECT aqbudgetid,
        budgetamount,
        branchcode
   FROM aqbudget
-  WHERE 1 = 1';
+  WHERE 1 = 1';                        # What's the point?
 
     my @bindings;
 
@@ -429,9 +427,5 @@ SELECT aqbudgetid,
         )
     );
 } #---- END $OP eq DEFAULT
-$template->param(intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
-               intranetstylesheet => C4::Context->preference("intranetstylesheet"),
-               IntranetNav => C4::Context->preference("IntranetNav"),
-               );
 output_html_with_http_headers $input, $cookie, $template->output;