X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=admin%2Faqplan.pl;h=ffb11456060a81e6e73ab51826cf9890e08c5a1c;hb=5f2e1ba7b14b226cbe23438116d77be710dd88b0;hp=da4717925cfba959e2b8150a3e0aa536d5d92782;hpb=f46abf8b909257a54c9e2c1fdd999ba30c7ac0ae;p=koha_fer diff --git a/admin/aqplan.pl b/admin/aqplan.pl index da4717925c..ffb1145606 100755 --- a/admin/aqplan.pl +++ b/admin/aqplan.pl @@ -60,7 +60,9 @@ my $budget_period_id = $input->param('budget_period_id'); my $period = GetBudgetPeriod($budget_period_id); my $count = GetPeriodsCount(); my $cur = GetCurrency; - +$template->param( symbol => $cur->{symbol}, + currency => $cur->{currency} + ); $template->param( period_button_only => 1 ) if $count == 0; @@ -72,21 +74,19 @@ my $budget_period_startdate = $period->{'budget_period_startdate'}; my $budget_period_enddate = $period->{'budget_period_enddate'}; my $budget_period_locked = $period->{'budget_period_locked'}; my $budget_period_description = $period->{'budget_period_description'}; -my $budget_period_dropbox = GetBudgetPeriodsDropbox($budget_period_id ); $template->param( budget_period_id => $budget_period_id, budget_period_locked => $budget_period_locked, budget_period_description => $budget_period_description, - budget_period_dropbox => $budget_period_dropbox, auth_cats_loop => $auth_cats_loop, ); # ------- get periods stuff ------------------ -my $borrower_id = $template->{param_map}->{'USER_INFO'}[0]->{'borrowernumber'}; -my $borrower_branchcode = $template->{param_map}->{'USER_INFO'}[0]->{'branchcode'}; +my $borrower_id = $template->{VARS}->{'USER_INFO'}[0]->{'borrowernumber'}; +my $borrower_branchcode = $template->{VARS}->{'USER_INFO'}[0]->{'branchcode'}; my $periods; my $authcat = $input->param('authcat'); @@ -95,7 +95,6 @@ my $show_actual = $input->param('show_actual'); my $show_percent = $input->param('show_percent'); my $output = $input->param("output"); my $basename = $input->param("basename"); -my $mime = $input->param("MIME"); my $del = $input->param("sep"); my $show_mine = $input->param('show_mine') ; @@ -133,7 +132,7 @@ my $op = $input->param("op"); my $budget_branchcode; -my $budgets_ref = GetBudgetHierarchy( $budget_period_id, $show_mine?$template->{param_map}->{'USER_INFO'}[0]->{'branchcode'}:'', $show_mine?$template->{param_map}->{'USER_INFO'}[0]->{'borrowernumber'}:'' ); +my $budgets_ref = GetBudgetHierarchy( $budget_period_id, $show_mine?$template->{VARS}->{'USER_INFO'}[0]->{'branchcode'}:'', $show_mine?$template->{VARS}->{'USER_INFO'}[0]->{'borrowernumber'}:'' ); # build categories list my $sth = $dbh->prepare("select distinct category from authorised_values where category like 'A%' "); @@ -332,11 +331,10 @@ foreach my $n (@names) { # ------------------------------------------------------------ # DEFAULT DISPLAY BEGINS -my @mime = ( C4::Context->preference("MIME") ); my $CGIextChoice = CGI::scrolling_list( -name => 'MIME', -id => 'MIME', - -values => \@mime, + -values => ['CSV'], # FIXME translation -size => 1, -multiple => 0 ); @@ -452,7 +450,6 @@ $template->param( show_actual => $show_actual, show_percent => $show_percent, show_mine => $show_mine, - cur => $cur->{symbol}, cur_format => $cur_format, CGIextChoice => $CGIextChoice, CGIsepChoice => $CGIsepChoice, @@ -466,7 +463,7 @@ output_html_with_http_headers $input, $cookie, $template->output; sub _print_to_csv { my ( $header, $results ) = @_; - binmode STDOUT, ":utf8"; + binmode STDOUT, ':encoding(UTF-8)'; my $csv = Text::CSV_XS->new( { sep_char => $del,