X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;ds=sidebyside;f=reports%2Fserials_stats.pl;h=9aff54b722a770a1b73dd2a40c9fd6928ad83284;hb=2c5b11620e5703810d94009eb992033231a40941;hp=640ef603ad16cf46bdad8f9ba10156124a315a33;hpb=f9299b1a76b7c6195e7abcc689127e78ce26701c;p=koha_fer diff --git a/reports/serials_stats.pl b/reports/serials_stats.pl index 640ef603ad..9aff54b722 100755 --- a/reports/serials_stats.pl +++ b/reports/serials_stats.pl @@ -103,7 +103,7 @@ if($do_it){ $template->param(datas => \@datas, do_it => 1); }else{ - binmode STDOUT, ':utf8'; + binmode STDOUT, ':encoding(UTF-8)'; print $input->header(-type => 'application/vnd.sun.xml.calc', -encoding => 'utf-8', -name => "$basename.csv", @@ -125,7 +125,7 @@ if($do_it){ print $item->{startdate}.$sep; print $item->{enddate}."\n"; } - exit(1); + exit; } }else{ ## We generate booksellers list @@ -140,19 +140,7 @@ if($do_it){ while(my $row = $sth->fetchrow_hashref){ push(@booksellers,$row) } - - ## We generate branchlist - my $branches=GetBranches(); - my @branchloop; - foreach (sort {$branches->{$a}->{'branchname'} cmp $branches->{$b}->{'branchname'}} keys %$branches) { - my $thisbranch = ''; # FIXME: populate $thisbranch to preselect one - my %row = (branchcode => $_, - selected => ($thisbranch eq $_ ? 1 : 0), - branchname => $branches->{$_}->{'branchname'}, - ); - push @branchloop, \%row; - } - + my $CGIextChoice=CGI::scrolling_list( -name => 'MIME', -id => 'MIME', @@ -164,7 +152,7 @@ if($do_it){ CGIextChoice => $CGIextChoice, CGIsepChoice => $CGIsepChoice, booksellers => \@booksellers, - branches => \@branchloop); + branches => GetBranchesLoop(C4::Context->userenv->{'branch'})); } output_html_with_http_headers $input, $cookie, $template->output;