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

(-)a/reports/reserves_stats.pl (-16 / +3 lines)
Lines 17-25 Link Here
17
# Koha; if not, write to the Free Software Foundation, Inc., 
17
# Koha; if not, write to the Free Software Foundation, Inc., 
18
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19
19
20
20
use Modern::Perl;
21
use strict;
22
use warnings;
23
21
24
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
25
23
Lines 53-66 my $fullreportname = "reports/reserves_stats.tt"; Link Here
53
my $do_it    = $input->param('do_it');
51
my $do_it    = $input->param('do_it');
54
my $line     = $input->param("Line");
52
my $line     = $input->param("Line");
55
my $column   = $input->param("Column");
53
my $column   = $input->param("Column");
56
my $podsp    = $input->param("DisplayBy");
57
my $type     = $input->param("PeriodTypeSel");
58
my $daysel   = $input->param("PeriodDaySel");
59
my $monthsel = $input->param("PeriodMonthSel");
60
my $calc     = $input->param("Cellvalue");
54
my $calc     = $input->param("Cellvalue");
61
my $output   = $input->param("output");
55
my $output   = $input->param("output");
62
my $basename = $input->param("basename");
56
my $basename = $input->param("basename");
63
my $mime     = $input->param("MIME");
64
my $hash_params = $input->Vars;
57
my $hash_params = $input->Vars;
65
my $filter_hashref;
58
my $filter_hashref;
66
foreach my $filter (grep {$_ =~/^filter/} keys %$hash_params){
59
foreach my $filter (grep {$_ =~/^filter/} keys %$hash_params){
Lines 322-333 sub calculate { Link Here
322
	return [(\%globalline)];
315
	return [(\%globalline)];
323
}
316
}
324
317
325
sub null_to_zzempty ($) {
326
	my $string = shift;
327
	defined($string)    or  return 'zzEMPTY';
328
	($string eq "NULL") and return 'zzEMPTY';
329
	return $string;		# else return the valid value
330
}
331
sub display_value {
318
sub display_value {
332
    my ( $crit, $value ) = @_;
319
    my ( $crit, $value ) = @_;
333
    my $locations = { map { ( $_->{authorised_value} => $_->{lib} ) } Koha::AuthorisedValues->get_descriptions_by_koha_field( { frameworkcode => '', kohafield => 'items.location' }, { order_by => ['description'] } ) };
320
    my $locations = { map { ( $_->{authorised_value} => $_->{lib} ) } Koha::AuthorisedValues->get_descriptions_by_koha_field( { frameworkcode => '', kohafield => 'items.location' }, { order_by => ['description'] } ) };
Lines 363-368 sub display_value { Link Here
363
    }
350
    }
364
    return $display_value;
351
    return $display_value;
365
}
352
}
353
366
sub reservestatushuman{
354
sub reservestatushuman{
367
	my ($val)=@_;
355
	my ($val)=@_;
368
	my %hashhuman=(
356
	my %hashhuman=(
Lines 375-380 sub reservestatushuman{ Link Here
375
	);
363
	);
376
	$hashhuman{$val};
364
	$hashhuman{$val};
377
}
365
}
366
378
sub changeifreservestatus{
367
sub changeifreservestatus{
379
	my ($val)=@_;
368
	my ($val)=@_;
380
	($val=~/reservestatus/
369
	($val=~/reservestatus/
Lines 394-397 sub changeifreservestatus{ Link Here
394
					end }
383
					end }
395
		:$val);
384
		:$val);
396
}
385
}
397
1;
398
- 

Return to bug 17931