View | Details | Raw Unified | Return to bug 16760
Collapse All | Expand All

(-)a/reports/issues_stats.pl (-12 / +11 lines)
Lines 18-24 Link Here
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
19
20
use strict;
20
use strict;
21
#use warnings; FIXME - Bug 2505
21
use warnings;
22
22
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
use Date::Manip;
24
use Date::Manip;
Lines 45-51 Plugin that shows circulation stats Link Here
45
=cut
45
=cut
46
46
47
# my $debug = 1;	# override for now.
47
# my $debug = 1;	# override for now.
48
my $input = new CGI;
48
my $input = CGI->new;
49
my $fullreportname = "reports/issues_stats.tt";
49
my $fullreportname = "reports/issues_stats.tt";
50
my $do_it    = $input->param('do_it');
50
my $do_it    = $input->param('do_it');
51
my $line     = $input->param("Line");
51
my $line     = $input->param("Line");
Lines 70-88 my ($template, $borrowernumber, $cookie) = get_template_and_user({ Link Here
70
	flagsrequired => {reports => '*'},
70
	flagsrequired => {reports => '*'},
71
	debug => 0,
71
	debug => 0,
72
});
72
});
73
our $sep     = $input->param("sep");
73
our $sep     = $input->param("sep") // '';
74
$sep = "\t" if ($sep eq 'tabulation');
74
$sep = "\t" if ($sep eq 'tabulation');
75
$template->param(do_it => $do_it,
75
$template->param(do_it => $do_it,
76
);
76
);
77
77
78
my $itemtypes = GetItemTypes();
78
our $itemtypes = GetItemTypes();
79
my $categoryloop = GetBorrowercategoryList;
79
our $categoryloop = GetBorrowercategoryList;
80
80
81
my $ccodes    = GetKohaAuthorisedValues("items.ccode");
81
our $ccodes    = GetKohaAuthorisedValues("items.ccode");
82
my $locations = GetKohaAuthorisedValues("items.location");
82
our $locations = GetKohaAuthorisedValues("items.location");
83
83
84
my $Bsort1 = GetAuthorisedValues("Bsort1");
84
our $Bsort1 = GetAuthorisedValues("Bsort1");
85
my $Bsort2 = GetAuthorisedValues("Bsort2");
85
our $Bsort2 = GetAuthorisedValues("Bsort2");
86
my ($hassort1,$hassort2);
86
my ($hassort1,$hassort2);
87
$hassort1=1 if $Bsort1;
87
$hassort1=1 if $Bsort1;
88
$hassort2=1 if $Bsort2;
88
$hassort2=1 if $Bsort2;
Lines 219-226 sub calculate { Link Here
219
	push @loopfilter,{crit=>"Select Month",filter=>$monthsel} if ($monthsel);
219
	push @loopfilter,{crit=>"Select Month",filter=>$monthsel} if ($monthsel);
220
220
221
	my @linefilter;
221
	my @linefilter;
222
	$debug and warn "filtres ". join "|", @filters;
222
	$debug and warn "filtres ". join "|", @$filters;
223
	my ($colsource, $linesource);
223
	my ($colsource, $linesource) = ('', '');
224
	$linefilter[1] = @$filters[1] if ($line =~ /datetime/);
224
	$linefilter[1] = @$filters[1] if ($line =~ /datetime/);
225
	$linefilter[0] = 
225
	$linefilter[0] = 
226
	    ( $line =~ /datetime/ ) ? @$filters[0]
226
	    ( $line =~ /datetime/ ) ? @$filters[0]
227
- 

Return to bug 16760