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

(-)a/reports/borrowers_stats.pl (-3 lines)
Lines 31-37 use C4::Output; Link Here
31
use C4::Reports;
31
use C4::Reports;
32
use C4::Circulation;
32
use C4::Circulation;
33
use C4::Members::AttributeTypes;
33
use C4::Members::AttributeTypes;
34
use C4::Dates qw/format_date format_date_in_iso/;
35
use Date::Calc qw(
34
use Date::Calc qw(
36
  Today
35
  Today
37
  Add_Delta_YM
36
  Add_Delta_YM
Lines 43-50 plugin that shows a stats on borrowers Link Here
43
42
44
=head1 DESCRIPTION
43
=head1 DESCRIPTION
45
44
46
=over 2
47
48
=cut
45
=cut
49
46
50
my $input = new CGI;
47
my $input = new CGI;
(-)a/reports/guided_reports.pl (-6 / +11 lines)
Lines 357-365 elsif ( $phase eq 'Choose these criteria' ) { Link Here
357
            my $tovalue   = $input->param( "to_"   . $crit . "_value" );
357
            my $tovalue   = $input->param( "to_"   . $crit . "_value" );
358
358
359
            # If the range values are dates
359
            # If the range values are dates
360
            if ($fromvalue =~ C4::Dates->regexp('syspref') && $tovalue =~ C4::Dates->regexp('syspref')) {
360
            my $fromvalue_dt;
361
                $fromvalue = C4::Dates->new($fromvalue)->output("iso");
361
            $fromvalue_dt = eval { dt_from_string( $fromvalue ); } if ( $fromvalue );
362
                $tovalue = C4::Dates->new($tovalue)->output("iso");
362
            my $tovalue_dt;
363
            $tovalue_dt = eval { dt_from_string( $tovalue ); } if ($tovalue);
364
            if ( $fromvalue_dt && $tovalue_dt ) {
365
                $fromvalue = output_pref( { dt => dt_from_string( $fromvalue_dt ), dateonly => 1, dateformat => 'iso' } );
366
                $tovalue   = output_pref( { dt => dt_from_string( $tovalue_dt ), dateonly => 1, dateformat => 'iso' } );
363
            }
367
            }
364
368
365
            if ($fromvalue && $tovalue) {
369
            if ($fromvalue && $tovalue) {
Lines 369-376 elsif ( $phase eq 'Choose these criteria' ) { Link Here
369
        } else {
373
        } else {
370
374
371
            # If value is a date
375
            # If value is a date
372
            if ($value =~ C4::Dates->regexp('syspref')) {
376
            my $value_dt;
373
                $value = C4::Dates->new($value)->output("iso");
377
            $value_dt  =  eval { dt_from_string( $value ); } if ( $value );
378
            if ( $value_dt ) {
379
                $value = output_pref( { dt => dt_from_string( $value_dt ), dateonly => 1, dateformat => 'iso' } );
374
            }
380
            }
375
            # don't escape runtime parameters, they'll be at runtime
381
            # don't escape runtime parameters, they'll be at runtime
376
            if ($value =~ /<<.*>>/) {
382
            if ($value =~ /<<.*>>/) {
377
- 

Return to bug 14870