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

(-)a/admin/categorie.pl (-6 / +4 lines)
Lines 42-50 use C4::Context; Link Here
42
use C4::Auth;
42
use C4::Auth;
43
use C4::Branch;
43
use C4::Branch;
44
use C4::Output;
44
use C4::Output;
45
use C4::Dates;
46
use C4::Form::MessagingPreferences;
45
use C4::Form::MessagingPreferences;
47
use Koha::Database;
46
use Koha::Database;
47
use Koha::DateUtils;
48
48
49
sub StringSearch {
49
sub StringSearch {
50
    my ( $searchstring, $type ) = @_;
50
    my ( $searchstring, $type ) = @_;
Lines 172-182 elsif ( $op eq 'add_validate' ) { Link Here
172
    my $dbh = C4::Context->dbh;
172
    my $dbh = C4::Context->dbh;
173
173
174
    if ( $input->param('enrolmentperioddate') ) {
174
    if ( $input->param('enrolmentperioddate') ) {
175
        $input->param(
175
        my $enrolment_dt = eval { dt_from_string( $input->param('enrolmentperioddate') ) };
176
            'enrolmentperioddate' => C4::Dates::format_date_in_iso(
176
        $enrolment_dt = eval { output_pref( { dt => $enrolment_dt, dateonly => 1, dateformat => 'iso' } ) } if ( $enrolment_dt );
177
                $input->param('enrolmentperioddate')
177
        $input->param( 'enrolmentperioddate' => $enrolment_dt );
178
            )
179
        );
180
    }
178
    }
181
179
182
    if ($is_a_modif) {
180
    if ($is_a_modif) {
(-)a/admin/smart-rules.pl (-5 / +5 lines)
Lines 26-32 use C4::Auth; Link Here
26
use C4::Koha;
26
use C4::Koha;
27
use C4::Debug;
27
use C4::Debug;
28
use C4::Branch; # GetBranches
28
use C4::Branch; # GetBranches
29
use C4::Dates qw/format_date format_date_in_iso/;
29
use Koha::DateUtils;
30
use Koha::Database;
30
use Koha::Database;
31
31
32
my $input = CGI->new;
32
my $input = CGI->new;
Lines 122-129 elsif ($op eq 'add') { Link Here
122
    $maxissueqty = undef if $maxissueqty !~ /^\d+/;
122
    $maxissueqty = undef if $maxissueqty !~ /^\d+/;
123
    my $issuelength  = $input->param('issuelength');
123
    my $issuelength  = $input->param('issuelength');
124
    my $lengthunit  = $input->param('lengthunit');
124
    my $lengthunit  = $input->param('lengthunit');
125
    my $hardduedate = $input->param('hardduedate');
125
    my $hardduedate = eval { dt_from_string( $input->param('hardduedate') ) };
126
    $hardduedate = format_date_in_iso($hardduedate);
126
    $hardduedate = output_pref( { dt => $hardduedate, dateonly => 1, dateformat => 'iso' } ) if ( $hardduedate );
127
    my $hardduedatecompare = $input->param('hardduedatecompare');
127
    my $hardduedatecompare = $input->param('hardduedatecompare');
128
    my $rentaldiscount = $input->param('rentaldiscount');
128
    my $rentaldiscount = $input->param('rentaldiscount');
129
    my $opacitemholds = $input->param('opacitemholds') || 0;
129
    my $opacitemholds = $input->param('opacitemholds') || 0;
Lines 414-420 while (my $row = $sth2->fetchrow_hashref) { Link Here
414
    $row->{'default_humancategorycode'} = 1 if $row->{'humancategorycode'} eq '*';
414
    $row->{'default_humancategorycode'} = 1 if $row->{'humancategorycode'} eq '*';
415
    $row->{'fine'} = sprintf('%.2f', $row->{'fine'});
415
    $row->{'fine'} = sprintf('%.2f', $row->{'fine'});
416
    if ($row->{'hardduedate'} && $row->{'hardduedate'} ne '0000-00-00') {
416
    if ($row->{'hardduedate'} && $row->{'hardduedate'} ne '0000-00-00') {
417
       $row->{'hardduedate'} = format_date( $row->{'hardduedate'});
417
       my $harddue_dt = eval { dt_from_string( $row->{'hardduedate'} ) };
418
       $row->{'hardduedate'} = eval { output_pref( { dt => $harddue_dt, dateonly => 1 } ) } if ( $harddue_dt );
418
       $row->{'hardduedatebefore'} = 1 if ($row->{'hardduedatecompare'} == -1);
419
       $row->{'hardduedatebefore'} = 1 if ($row->{'hardduedatecompare'} == -1);
419
       $row->{'hardduedateexact'} = 1 if ($row->{'hardduedatecompare'} ==  0);
420
       $row->{'hardduedateexact'} = 1 if ($row->{'hardduedatecompare'} ==  0);
420
       $row->{'hardduedateafter'} = 1 if ($row->{'hardduedatecompare'} ==  1);
421
       $row->{'hardduedateafter'} = 1 if ($row->{'hardduedatecompare'} ==  1);
421
- 

Return to bug 14949