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

(-)a/reports/bor_issues_top.pl (-2 / +2 lines)
Lines 29-35 use C4::Circulation; Link Here
29
use C4::Members;
29
use C4::Members;
30
use C4::Reports;
30
use C4::Reports;
31
use C4::Debug;
31
use C4::Debug;
32
use C4::Dates qw(format_date format_date_in_iso);
32
use Koha::DateUtils;
33
33
34
=head1 NAME
34
=head1 NAME
35
35
Lines 51-57 my $limit = $input->param("Limit"); Link Here
51
my $column  = $input->param("Criteria");
51
my $column  = $input->param("Criteria");
52
my @filters = $input->param("Filter");
52
my @filters = $input->param("Filter");
53
foreach ( @filters[0..3] ) {
53
foreach ( @filters[0..3] ) {
54
	$_ and $_ = format_date_in_iso($_);	
54
    $_ and $_ = eval { output_pref( { dt => dt_from_string ( $_ ), dateonly => 1, dateformat => 'iso' }); };
55
}
55
}
56
my $output   = $input->param("output");
56
my $output   = $input->param("output");
57
my $basename = $input->param("basename");
57
my $basename = $input->param("basename");
(-)a/reports/borrowers_out.pl (-3 / +5 lines)
Lines 28-34 use C4::Output; Link Here
28
use C4::Circulation;
28
use C4::Circulation;
29
use C4::Reports;
29
use C4::Reports;
30
use C4::Members;
30
use C4::Members;
31
use C4::Dates qw/format_date_in_iso/;
31
use Koha::DateUtils;
32
32
33
=head1 NAME
33
=head1 NAME
34
34
Lines 46-52 my $fullreportname = "reports/borrowers_out.tt"; Link Here
46
my $limit = $input->param("Limit");
46
my $limit = $input->param("Limit");
47
my $column = $input->param("Criteria");
47
my $column = $input->param("Criteria");
48
my @filters = $input->param("Filter");
48
my @filters = $input->param("Filter");
49
$filters[1] = format_date_in_iso($filters[1]) if $filters[1];
49
$filters[1] = eval { output_pref( { dt => dt_from_string( $filters[1]), dateonly => 1, dateformat => 'iso' } ); }
50
    if ( $filters[1] );
51
50
my $output = $input->param("output");
52
my $output = $input->param("output");
51
my $basename = $input->param("basename");
53
my $basename = $input->param("basename");
52
our $sep     = $input->param("sep") || '';
54
our $sep     = $input->param("sep") || '';
Lines 230-236 sub calculate { Link Here
230
    }
232
    }
231
    $strcalc .= " AND NOT EXISTS (SELECT * FROM issues WHERE issues.borrowernumber=borrowers.borrowernumber ";
233
    $strcalc .= " AND NOT EXISTS (SELECT * FROM issues WHERE issues.borrowernumber=borrowers.borrowernumber ";
232
    if ( @$filters[1] ) {
234
    if ( @$filters[1] ) {
233
        $strcalc .= " AND issues.timestamap > ?";
235
        $strcalc .= " AND issues.timestamp > ?";
234
        push @query_args, @$filters[1];
236
        push @query_args, @$filters[1];
235
    }
237
    }
236
    $strcalc .= ") ";
238
    $strcalc .= ") ";
(-)a/reports/cat_issues_top.pl (-7 / +9 lines)
Lines 28-35 use C4::Output; Link Here
28
use C4::Koha;
28
use C4::Koha;
29
use C4::Circulation;
29
use C4::Circulation;
30
use C4::Reports;
30
use C4::Reports;
31
use C4::Dates qw/format_date format_date_in_iso/;
32
use C4::Members;
31
use C4::Members;
32
use Koha::DateUtils;
33
33
34
=head1 NAME
34
=head1 NAME
35
35
Lines 47-56 my $fullreportname = "reports/cat_issues_top.tt"; Link Here
47
my $limit = $input->param("Limit");
47
my $limit = $input->param("Limit");
48
my $column = $input->param("Criteria");
48
my $column = $input->param("Criteria");
49
my @filters = $input->param("Filter");
49
my @filters = $input->param("Filter");
50
$filters[0]=format_date_in_iso($filters[0]);
50
foreach ( @filters[0..3] ) {
51
$filters[1]=format_date_in_iso($filters[1]);
51
    $_ and $_ = eval { output_pref( { dt => dt_from_string ( $_ ), dateonly => 1, dateformat => 'iso' } ); };
52
$filters[2]=format_date_in_iso($filters[2]);
52
}
53
$filters[3]=format_date_in_iso($filters[3]);
53
54
my $output = $input->param("output");
54
my $output = $input->param("output");
55
my $basename = $input->param("basename");
55
my $basename = $input->param("basename");
56
#warn "calcul : ".$calc;
56
#warn "calcul : ".$calc;
Lines 181-188 sub calculate { Link Here
181
            if ($i>=2) {
181
            if ($i>=2) {
182
                $cell{filter} .= @$filters[$i];
182
                $cell{filter} .= @$filters[$i];
183
            } else {
183
            } else {
184
                $cell{filter} .= format_date(@$filters[$i]);
184
                $cell{filter} .= eval { output_pref( { dt => dt_from_string( @$filters[$i] ), dateonly => 1 }); }
185
            }            $cell{crit} .="Issue From" if ($i==0);
185
                   if ( @$filters[$i] );
186
            }
187
            $cell{crit} .="Issue From" if ($i==0);
186
            $cell{crit} .="Issue To" if ($i==1);
188
            $cell{crit} .="Issue To" if ($i==1);
187
            $cell{crit} .="Return From" if ($i==2);
189
            $cell{crit} .="Return From" if ($i==2);
188
            $cell{crit} .="Return To" if ($i==3);
190
            $cell{crit} .="Return To" if ($i==3);
(-)a/reports/itemslost.pl (-3 / +4 lines)
Lines 35-41 use C4::Biblio; Link Here
35
use C4::Items;
35
use C4::Items;
36
use C4::Koha;                  # GetItemTypes
36
use C4::Koha;                  # GetItemTypes
37
use C4::Branch; # GetBranches
37
use C4::Branch; # GetBranches
38
use C4::Dates qw/format_date/;
38
use Koha::DateUtils;
39
39
40
my $query = new CGI;
40
my $query = new CGI;
41
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
41
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
Lines 68-75 if ( $get_items ) { Link Here
68
68
69
    my $items = GetLostItems( \%where );
69
    my $items = GetLostItems( \%where );
70
    foreach my $it (@$items) {
70
    foreach my $it (@$items) {
71
        $it->{'datelastseen'} = format_date($it->{'datelastseen'});
71
        $it->{'datelastseen'} = eval { output_pref( { dt => dt_from_string( $it->{'datelastseen'} ), dateonly => 1 }); }
72
                   if ( $it->{'datelastseen'} );
72
    }
73
    }
74
73
    $template->param(
75
    $template->param(
74
                     total       => scalar @$items,
76
                     total       => scalar @$items,
75
                     itemsloop   => $items,
77
                     itemsloop   => $items,
76
- 

Return to bug 14965