|
Lines 31-38
use C4::Koha;
Link Here
|
| 31 |
use C4::Output; |
31 |
use C4::Output; |
| 32 |
use C4::Circulation; |
32 |
use C4::Circulation; |
| 33 |
use C4::Reports; |
33 |
use C4::Reports; |
| 34 |
use C4::Dates qw/format_date format_date_in_iso/; |
|
|
| 35 |
use C4::Members; |
34 |
use C4::Members; |
|
|
35 |
use Koha::DateUtils; |
| 36 |
|
36 |
|
| 37 |
=head1 NAME |
37 |
=head1 NAME |
| 38 |
|
38 |
|
|
Lines 51-58
my $do_it = $input->param('do_it');
Link Here
|
| 51 |
my $line = $input->param("Line"); |
51 |
my $line = $input->param("Line"); |
| 52 |
my $column = $input->param("Column"); |
52 |
my $column = $input->param("Column"); |
| 53 |
my @filters = $input->param("Filter"); |
53 |
my @filters = $input->param("Filter"); |
| 54 |
$filters[0]=format_date_in_iso($filters[0]); |
54 |
$filters[0] = eval { output_pref( { dt => dt_from_string( $filters[0]), dateonly => 1, dateformat => 'iso' } ); } |
| 55 |
$filters[1]=format_date_in_iso($filters[1]); |
55 |
if ( $filters[0] ); |
|
|
56 |
$filters[1] = eval { output_pref( { dt => dt_from_string( $filters[1]), dateonly => 1, dateformat => 'iso' } ); } |
| 57 |
if ( $filters[1] ); |
| 56 |
my $podsp = $input->param("DisplayBy"); |
58 |
my $podsp = $input->param("DisplayBy"); |
| 57 |
my $type = $input->param("PeriodTypeSel"); |
59 |
my $type = $input->param("PeriodTypeSel"); |
| 58 |
my $daysel = $input->param("PeriodDaySel"); |
60 |
my $daysel = $input->param("PeriodDaySel"); |
|
Lines 189-195
sub calculate {
Link Here
|
| 189 |
if ($i>=2) { |
191 |
if ($i>=2) { |
| 190 |
$cell{filter} = @$filters[$i]; |
192 |
$cell{filter} = @$filters[$i]; |
| 191 |
} else { |
193 |
} else { |
| 192 |
$cell{filter} = format_date(@$filters[$i]); |
194 |
$cell{filter} = eval { output_pref( { dt => dt_from_string( @$filters[$i] ), dateonly => 1 }); } |
|
|
195 |
if ( @$filters[$i] ); |
| 193 |
} |
196 |
} |
| 194 |
$cell{crit} = |
197 |
$cell{crit} = |
| 195 |
( $i == 0 ) ? "Period From" |
198 |
( $i == 0 ) ? "Period From" |
|
Lines 261-267
sub calculate {
Link Here
|
| 261 |
$linefield = ($dsp == 1) ? " dayname($line)" : |
264 |
$linefield = ($dsp == 1) ? " dayname($line)" : |
| 262 |
($dsp == 2) ? "monthname($line)" : |
265 |
($dsp == 2) ? "monthname($line)" : |
| 263 |
($dsp == 3) ? " Year($line)" : |
266 |
($dsp == 3) ? " Year($line)" : |
| 264 |
'date_format(`datetime`,"%Y-%m-%d")'; # Probably should be left alone or passed through C4::Dates |
267 |
'date_format(`datetime`,"%Y-%m-%d")'; # Probably should be left alone or passed through Koha::DateUtils |
| 265 |
} else { |
268 |
} else { |
| 266 |
$linefield = $line; |
269 |
$linefield = $line; |
| 267 |
} |
270 |
} |
|
Lines 336-342
sub calculate {
Link Here
|
| 336 |
$colfield = ($dsp == 1) ? " dayname($column)" : |
339 |
$colfield = ($dsp == 1) ? " dayname($column)" : |
| 337 |
($dsp == 2) ? "monthname($column)" : |
340 |
($dsp == 2) ? "monthname($column)" : |
| 338 |
($dsp == 3) ? " Year($column)" : |
341 |
($dsp == 3) ? " Year($column)" : |
| 339 |
'date_format(`datetime`,"%Y-%m-%d")'; # Probably should be left alone or passed through C4::Dates |
342 |
'date_format(`datetime`,"%Y-%m-%d")'; # Probably should be left alone or passed through Koha::DateUtils |
| 340 |
} else { |
343 |
} else { |
| 341 |
$colfield = $column; |
344 |
$colfield = $column; |
| 342 |
} |
345 |
} |