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

(-)a/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt (+6 lines)
Lines 89-94 $.tablesorter.addParser({ Link Here
89
        </div>
89
        </div>
90
        [% END %]
90
        [% END %]
91
91
92
        [% IF ( BORROWER_INF.warnexpired ) %]
93
        <div class="dialog alert" id="warnexpired">
94
                <strong>Please note:</strong><span> Your card has expired. Please contact the library for more information.</span>
95
        </div>
96
        [% END %]
97
92
        [% IF ( patron_flagged ) %]
98
        [% IF ( patron_flagged ) %]
93
		<div class="dialog alert">
99
		<div class="dialog alert">
94
        <ul>
100
        <ul>
(-)a/opac/opac-user.pl (-10 / +12 lines)
Lines 125-141 my @bordat; Link Here
125
$bordat[0] = $borr;
125
$bordat[0] = $borr;
126
126
127
# Warningdate is the date that the warning starts appearing
127
# Warningdate is the date that the warning starts appearing
128
if ( $borr->{dateexpiry} && C4::Context->preference('NotifyBorrowerDeparture') &&
128
if ( $borr->{dateexpiry} && Date_to_Days( $today_year, $today_month, $today_day ) > Date_to_Days( $warning_year, $warning_month, $warning_day ) ) {
129
    Date_to_Days(Add_Delta_Days($warning_year,$warning_month,$warning_day,- C4::Context->preference('NotifyBorrowerDeparture'))) <
129
    $borr->{'warnexpired'} = 1;
130
    Date_to_Days( $today_year, $today_month, $today_day ) )
130
}
131
{
131
elsif ( $borr->{dateexpiry} && C4::Context->preference('NotifyBorrowerDeparture') &&
132
    # borrower card soon to expire, warn the borrower
132
        Date_to_Days(Add_Delta_Days($warning_year, $warning_month, $warning_day,- C4::Context->preference('NotifyBorrowerDeparture'))) <
133
    $borr->{'warndeparture'} = $borr->{dateexpiry};
133
        Date_to_Days( $today_year, $today_month, $today_day ) ) {
134
    if (C4::Context->preference('ReturnBeforeExpiry')){
134
        # borrower card soon to expire, warn the borrower
135
        $borr->{'returnbeforeexpiry'} = 1;
135
        $borr->{'warndeparture'} = $borr->{dateexpiry};
136
    }
136
        if (C4::Context->preference('ReturnBeforeExpiry')){
137
            $borr->{'returnbeforeexpiry'} = 1;
138
        }
137
}
139
}
138
140
141
139
$template->param(   BORROWER_INFO     => \@bordat,
142
$template->param(   BORROWER_INFO     => \@bordat,
140
                    borrowernumber    => $borrowernumber,
143
                    borrowernumber    => $borrowernumber,
141
                    patron_flagged    => $borr->{flagged},
144
                    patron_flagged    => $borr->{flagged},
142
- 

Return to bug 9329