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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/checkexpiration.tt (-2 / +5 lines)
Lines 47-54 Link Here
47
47
48
        <li>
48
        <li>
49
            <label for="showhistoricexpired">Include historic expirations:</label>
49
            <label for="showhistoricexpired">Include historic expirations:</label>
50
            <input id="showhistoricexpired" type="checkbox" name="showhistoricexpired"
50
            [% IF showhistoricexpired %]
51
            [% IF ( showhistoricexpired ) %] checked="checked" [% END %]/>
51
                <input id="showhistoricexpired" type="checkbox" name="showhistoricexpired" checked="checked" />
52
            [% ELSE %]
53
                <input id="showhistoricexpired" type="checkbox" name="showhistoricexpired" />
54
            [% END %]
52
        </li>
55
        </li>
53
        </ol>
56
        </ol>
54
</fieldset>
57
</fieldset>
(-)a/serials/checkexpiration.pl (-3 / +2 lines)
Lines 70-76 my $issn = $query->param('issn'); Link Here
70
my $branch = $query->param('branch');
70
my $branch = $query->param('branch');
71
my $date = $query->param('date');
71
my $date = $query->param('date');
72
$date = eval { dt_from_string( scalar $query->param('date') ) } if $date;
72
$date = eval { dt_from_string( scalar $query->param('date') ) } if $date;
73
my $showhistoricexpired = $query->param('showhistoryexpired');
73
my $showhistoricexpired = $query->param('showhistoricexpired');
74
74
75
if ($date) {
75
if ($date) {
76
    my @subscriptions = SearchSubscriptions({ title => $title, issn => $issn, orderby => 'title' });
76
    my @subscriptions = SearchSubscriptions({ title => $title, issn => $issn, orderby => 'title' });
Lines 97-103 if ($date) { Link Here
97
        my $expirationdate_dt = dt_from_string( $expirationdate, 'iso' );
97
        my $expirationdate_dt = dt_from_string( $expirationdate, 'iso' );
98
        my $today_dt = dt_from_string();
98
        my $today_dt = dt_from_string();
99
        if (   DateTime->compare( $date, $expirationdate_dt ) == 1
99
        if (   DateTime->compare( $date, $expirationdate_dt ) == 1
100
            && ( $showhistoricexpired || DateTime->compare( $expiration_dt, $today_dt ) == 1 )
100
            && ( $showhistoricexpired || DateTime->compare( $expirationdate_dt, $today_dt ) == 1 )
101
            && ( !$branch || ( $subscription->{'branchcode'} eq $branch ) ) ) {
101
            && ( !$branch || ( $subscription->{'branchcode'} eq $branch ) ) ) {
102
            push @subscriptions_loop, $subscription;
102
            push @subscriptions_loop, $subscription;
103
        }
103
        }
104
- 

Return to bug 23243