X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=admin%2Faqplan.pl;h=0614babb9d6b61439fcd51578aba6c2769474e6a;hb=5d6c092921919526ade501facb1220f8a108a08f;hp=81418ff358a3a590f474c504793fdd98b91a8f0e;hpb=afa94246d3d13993b7add9b34b40be977945f8fd;p=koha_fer diff --git a/admin/aqplan.pl b/admin/aqplan.pl index 81418ff358..0614babb9d 100755 --- a/admin/aqplan.pl +++ b/admin/aqplan.pl @@ -85,8 +85,8 @@ $template->param( # ------- 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'); @@ -132,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%' "); @@ -225,7 +225,6 @@ HideCols($authcat, @hide_cols); } # ------------------------------------------------------------ if ( $authcat =~ m/^Asort/ ) { - # ----------- copied from C4::Input::buildCGIsort() my $query = qq{ SELECT * FROM authorised_values WHERE category=? order by lib }; my $sth = $dbh->prepare($query); $sth->execute($authcat ); @@ -354,6 +353,10 @@ my ( @budget_lines, %cell_hash ); foreach my $budget (@budgets) { my $budget_lock; + unless (CanUserUseBudget($borrowernumber, $budget, $staff_flags)) { + $budget_lock = 1 + } + # check budget permission if ( $period->{budget_period_locked} == 1 ) { $budget_lock = 1; @@ -463,7 +466,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,