X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=reports%2Fissues_stats.pl;h=ddc3740c26e173650b2629d524f5de45f15e88ee;hb=ca3375e35e79e3a9b2bd53ca92a058b1cb273b96;hp=949e0b903a449cabf22104f8bfae946f5c685cb4;hpb=e5df39dee8880c151f5782cb6eae057c31cb6361;p=koha_fer diff --git a/reports/issues_stats.pl b/reports/issues_stats.pl index 949e0b903a..ddc3740c26 100755 --- a/reports/issues_stats.pl +++ b/reports/issues_stats.pl @@ -14,11 +14,12 @@ # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # -# You should have received a copy of the GNU General Public License along with -# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, -# Suite 330, Boston, MA 02111-1307 USA +# You should have received a copy of the GNU General Public License along +# with Koha; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. use strict; +#use warnings; FIXME - Bug 2505 use CGI; use Date::Manip; @@ -30,6 +31,7 @@ use C4::Branch; # GetBranches use C4::Koha; use C4::Output; use C4::Circulation; +use C4::Reports; use C4::Dates qw/format_date format_date_in_iso/; use C4::Members; @@ -59,18 +61,17 @@ my $monthsel = $input->param("PeriodMonthSel"); my $calc = $input->param("Cellvalue"); my $output = $input->param("output"); my $basename = $input->param("basename"); -my $mime = $input->param("MIME"); -my $del = $input->param("sep"); my ($template, $borrowernumber, $cookie) = get_template_and_user({ template_name => $fullreportname, query => $input, type => "intranet", authnotrequired => 0, - flagsrequired => {reports => 1}, + flagsrequired => {reports => '*'}, debug => 0, }); +our $sep = $input->param("sep"); +$sep = "\t" if ($sep eq 'tabulation'); $template->param(do_it => $do_it, - DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(), ); my $itemtypes = GetItemTypes(); @@ -101,7 +102,6 @@ if ($do_it) { -filename=>"$basename.csv" ); my $cols = @$results[0]->{loopcol}; my $lines = @$results[0]->{looprow}; - my $sep = C4::Context->preference("delimiter"); # header top-right print @$results[0]->{line} ."/". @$results[0]->{column} .$sep; # Other header @@ -122,7 +122,7 @@ if ($do_it) { print map {$sep.$_->{totalcol}} @$cols; print $sep.@$results[0]->{total}; } - exit(1); # exit either way after $do_it + exit; # exit either way after $do_it } my $dbh = C4::Context->dbh; @@ -132,23 +132,10 @@ my %select; # create itemtype arrayref for