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 61-68 Link Here
61
61
62
        <li>
62
        <li>
63
            <label for="showhistoricexpired">Include historic expirations:</label>
63
            <label for="showhistoricexpired">Include historic expirations:</label>
64
            <input id="showhistoricexpired" type="checkbox" name="showhistoricexpired"
64
            [% IF showhistoricexpired %]
65
            [% IF ( showhistoricexpired ) %] checked="checked" [% END %]/>
65
                <input id="showhistoricexpired" type="checkbox" name="showhistoricexpired" checked="checked" />
66
            [% ELSE %]
67
                <input id="showhistoricexpired" type="checkbox" name="showhistoricexpired" />
68
            [% END %]
66
        </li>
69
        </li>
67
        </ol>
70
        </ol>
68
</fieldset>
71
</fieldset>
(-)a/serials/checkexpiration.pl (-3 / +2 lines)
Lines 69-75 my $issn = $query->param('issn'); Link Here
69
my $branch = $query->param('branch');
69
my $branch = $query->param('branch');
70
my $date = $query->param('date');
70
my $date = $query->param('date');
71
$date = eval { dt_from_string( scalar $query->param('date') ) } if $date;
71
$date = eval { dt_from_string( scalar $query->param('date') ) } if $date;
72
my $showhistoricexpired = $query->param('showhistoryexpired');
72
my $showhistoricexpired = $query->param('showhistoricexpired');
73
73
74
if ($date) {
74
if ($date) {
75
    my @subscriptions = SearchSubscriptions({ title => $title, issn => $issn, orderby => 'title' });
75
    my @subscriptions = SearchSubscriptions({ title => $title, issn => $issn, orderby => 'title' });
Lines 96-102 if ($date) { Link Here
96
        my $expirationdate_dt = dt_from_string( $expirationdate, 'iso' );
96
        my $expirationdate_dt = dt_from_string( $expirationdate, 'iso' );
97
        my $today_dt = dt_from_string();
97
        my $today_dt = dt_from_string();
98
        if (   DateTime->compare( $date, $expirationdate_dt ) == 1
98
        if (   DateTime->compare( $date, $expirationdate_dt ) == 1
99
            && ( $showhistoricexpired || DateTime->compare( $expiration_dt, $today_dt ) == 1 )
99
            && ( $showhistoricexpired || DateTime->compare( $expirationdate_dt, $today_dt ) == 1 )
100
            && ( !$branch || ( $subscription->{'branchcode'} eq $branch ) ) ) {
100
            && ( !$branch || ( $subscription->{'branchcode'} eq $branch ) ) ) {
101
            push @subscriptions_loop, $subscription;
101
            push @subscriptions_loop, $subscription;
102
        }
102
        }
103
- 

Return to bug 23243