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

(-)a/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt (+6 lines)
Lines 79-84 $.tablesorter.addParser({ Link Here
79
        
79
        
80
		[% IF ( patronupdate ) %]<div class="dialog message"><h3>Thank you!</h3><p>Your corrections have been submitted to the library, and a staff member will update your record as soon as possible.</p></div>[% END %]
80
		[% IF ( patronupdate ) %]<div class="dialog message"><h3>Thank you!</h3><p>Your corrections have been submitted to the library, and a staff member will update your record as soon as possible.</p></div>[% END %]
81
		
81
		
82
        [% IF ( BORROWER_INF.warndeparture ) %]
83
        <div class="dialog alert">
84
                <strong>Please note:</strong><span> Your card will expire on [% BORROWER_INF.warndeparture %]. Please contact the library if you wish to renew your subscription.</span>
85
                [% IF ( BORROWER_INF.returnbeforeexpiry ) %]<span> Also note that you must return all checked out items before your card expires.</span>[% END %]
86
        </div>
87
        [% END %]
82
88
83
        [% IF ( BORROWER_INF.flagged ) %]
89
        [% IF ( BORROWER_INF.flagged ) %]
84
		<div class="dialog alert">
90
		<div class="dialog alert">
(-)a/opac/opac-user.pl (-1 / +21 lines)
Lines 38-43 use C4::Branch; # GetBranches Link Here
38
38
39
use constant ATTRIBUTE_SHOW_BARCODE => 'SHOW_BCODE';
39
use constant ATTRIBUTE_SHOW_BARCODE => 'SHOW_BCODE';
40
40
41
use Date::Calc qw(
42
  Today
43
  Add_Delta_Days
44
  Date_to_Days
45
);
46
41
my $query = new CGI;
47
my $query = new CGI;
42
48
43
BEGIN {
49
BEGIN {
Lines 99-104 $borr->{'amountoutstanding'} = sprintf "%.02f", $borr->{'amountoutstanding'}; Link Here
99
my @bordat;
105
my @bordat;
100
$bordat[0] = $borr;
106
$bordat[0] = $borr;
101
107
108
# Warningdate is the date that the warning starts appearing
109
my (  $today_year,   $today_month,   $today_day) = Today();
110
my ($warning_year, $warning_month, $warning_day) = split /-/, $borr->{'dateexpiry'};
111
112
if ( C4::Context->preference('NotifyBorrowerDeparture') &&
113
    Date_to_Days(Add_Delta_Days($warning_year,$warning_month,$warning_day,- C4::Context->preference('NotifyBorrowerDeparture'))) <
114
    Date_to_Days( $today_year, $today_month, $today_day ) ) 
115
{
116
    # borrower card soon to expire, warn the borrower
117
    $borr->{'warndeparture'} = format_date($borr->{dateexpiry});
118
    if (C4::Context->preference('ReturnBeforeExpiry')){
119
        $borr->{'returnbeforeexpiry'} = 1;
120
    }
121
}
122
102
$template->param(   BORROWER_INFO     => \@bordat,
123
$template->param(   BORROWER_INFO     => \@bordat,
103
                    borrowernumber    => $borrowernumber,
124
                    borrowernumber    => $borrowernumber,
104
                    patron_flagged    => $borr->{flagged},
125
                    patron_flagged    => $borr->{flagged},
105
- 

Return to bug 6978