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

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt (-11 / +22 lines)
Lines 1-6 Link Here
1
[% USE Koha %]
1
[% USE Koha %]
2
[% USE KohaDates %]
2
[% USE KohaDates %]
3
[% USE Branches %]
3
[% USE Branches %]
4
[% USE Price %]
4
5
5
[% INCLUDE 'doc-head-open.inc' %]
6
[% INCLUDE 'doc-head-open.inc' %]
6
<title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog &rsaquo; Your library home</title>
7
<title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog &rsaquo; Your library home</title>
Lines 33-39 Link Here
33
                                    [% FOREACH message IN patron_messages %]
34
                                    [% FOREACH message IN patron_messages %]
34
                                        <li>
35
                                        <li>
35
                                        <strong>[% message.message %]</strong><br>
36
                                        <strong>[% message.message %]</strong><br>
36
                                        &nbsp;&nbsp;&nbsp;<i>Written on [% message.message_date | $KohaDates %] by [% Branches.GetName(message.branchcode) %]</i>
37
                                        <i>[% message.message_date | $KohaDates %] [% message.branchname %]</i>
37
                                        </li>
38
                                        </li>
38
                                    [% END %]
39
                                    [% END %]
39
40
Lines 90-105 Link Here
90
                        <div class="alert">
91
                        <div class="alert">
91
                            <ul>
92
                            <ul>
92
                                [% IF ( userdebarred ) %]
93
                                [% IF ( userdebarred ) %]
93
                                    <li id="userdebarred"><strong>Please note:</strong> Your account has been frozen[% IF ( BORROWER_INFO.userdebarreddate ) %] until <span id="userdebarred_date">[% BORROWER_INFO.userdebarreddate | $KohaDates %]</span>[% END %][% IF ( BORROWER_INFO.debarredcomment ) %] with the comment <span id="userdebarred_comment">"[% BORROWER_INFO.debarredcomment %]"</span>[% END %]. Usually the reason for freezing an account is old overdues or damage fees. If <a href="/cgi-bin/koha/opac-account.pl">your account page</a> shows your account to be clear, please contact the library.</li>
94
                                    <li id="userdebarred"><strong>Please note:</strong> Your account has been frozen.
95
                                    [% IF ( BORROWER_INFO.debarredcomment ) %] Comment: <span id="userdebarred_comment">"[% BORROWER_INFO.debarredcomment %]"</span>[% END %]
96
                                    [% IF ( BORROWER_INFO.userdebarreddate ) %] End date: <span id="userdebarred_date">[% BORROWER_INFO.userdebarreddate | $KohaDates %]</span>[% END %]
97
                                    <em>Usually the reason for freezing an account is old overdues or damage fees. If your account shows to be clear, please contact the library.</em> <a href="/cgi-bin/koha/opac-account.pl">Go to your account page</a></li>
94
                                [% END %]
98
                                [% END %]
95
                                [% IF ( BORROWER_INFO.gonenoaddress ) %]
99
                                [% IF ( BORROWER_INFO.gonenoaddress ) %]
96
                                    <li id="gonenoaddress"><strong>Please note:</strong> According to our records, we don't have up-to-date [% UNLESS OPACPatronDetails %]<a href="/cgi-bin/koha/opac-memberentry.pl">contact information</a>[% ELSE %]contact information[% END %] on file.  Please contact the library[% IF OPACPatronDetails %] or use the <a href="/cgi-bin/koha/opac-memberentry.pl">online update form</a> to submit current information (<em>Please note:</em> there may be a delay in restoring your account if you submit online)[% END %].</li>
100
                                    <li id="gonenoaddress"><strong>Please note:</strong> According to our records, we don't have up-to-date contact information. Please contact the library.
101
                                <a href="/cgi-bin/koha/opac-memberentry.pl">[% IF ( Koha.Preference('OPACPatronDetails') ) %]Update your contact information[% ELSE %]Go to your contact information[% END %]</a>
102
                                [% IF ( Koha.Preference('OPACPatronDetails') ) %]<em>(Please note: there may be a delay in restoring your account if you submit online.)</em>[% END %]
103
                                    </li>
97
                                [% END %]
104
                                [% END %]
98
                                [% IF ( BORROWER_INFO.lost ) %]
105
                                [% IF ( BORROWER_INFO.lost ) %]
99
                                    <li id="lost"><strong>Please note: </strong> Your library card has been marked as lost or stolen. If this is an error, please contact the library.</li>
106
                                    <li id="lost"><strong>Please note: </strong> Your library card has been marked as lost or stolen. <em>If this is an error, please contact the library.</em></li>
100
                                [% END %]
107
                                [% END %]
101
                                [% IF ( renewal_blocked_fines ) && ( OpacRenewalAllowed ) %]
108
                                [% IF ( checkouts_blocked_amount ) %]
102
                                    <li id="renewal_blocked_fines"><strong>Please note: </strong> Since you have <a href="/cgi-bin/koha/opac-account.pl">[% IF renewal_blocked_fines != "0.00" %] more than <span id="renewal_blocked_fines_amount">[% renewal_blocked_fines %]</span> in [% END %] fines</a>, you cannot renew your books online. Please pay your fines if you wish to renew your books.</li>
109
                                    <li id="renewal_blocked_fines"><strong>Please note: </strong>Your account has been BLOCKED from checkouts. Reason: [% IF ( checkouts_blocked_amount ) > 0  %]Your fines exceed <span id="renewal_blocked_fines_amount">[% checkouts_blocked_amount | $Price %]</span>.[% END %]
110
                                <em>Please pay your fines if you wish to check out books.</em> <a href="/cgi-bin/koha/opac-account.pl">Go to your account page</a></li>
111
                                [% ELSIF ( renewal_blocked_fines.defined ) && ( OpacRenewalAllowed ) %]
112
                                    <li id="renewal_blocked_fines"><strong>Please note: </strong>You cannot renew your books online. Reason: [% IF ( renewal_blocked_fines ) > 0  %]Your fines exceed <span id="renewal_blocked_fines_amount">[% renewal_blocked_fines | $Price %]</span>.[% ELSE %]You have fines.[% END %]
113
                                    <em>Please pay your fines if you wish to renew your books.</em> <a href="/cgi-bin/koha/opac-account.pl">Go to your account page</a></li>
103
                                [% END %]
114
                                [% END %]
104
                            </ul>
115
                            </ul>
105
                        </div>
116
                        </div>
Lines 114-122 Link Here
114
                            [% IF relatives %]<li><a href="#opac-user-relative-issues">Relatives' checkouts</a></li>[% END %]
125
                            [% IF relatives %]<li><a href="#opac-user-relative-issues">Relatives' checkouts</a></li>[% END %]
115
                            [% IF ( overdues_count ) %]<li><a href="#opac-user-overdues">Overdue ([% overdues_count %])</a></li>[% END %]
126
                            [% IF ( overdues_count ) %]<li><a href="#opac-user-overdues">Overdue ([% overdues_count %])</a></li>[% END %]
116
                            [% IF ( OPACFinesTab ) %]
127
                            [% IF ( OPACFinesTab ) %]
117
                                [% IF ( BORROWER_INFO.amountoverfive ) %]<li><a href="#opac-user-fines">Fines ([% BORROWER_INFO.amountoutstanding %])</a></li>[% END %]
128
                                [% IF ( BORROWER_INFO.amountoverfive ) %]<li><a href="#opac-user-fines">Fines ([% BORROWER_INFO.amountoutstanding | $Price %])</a></li>[% END %]
118
                                [% IF ( BORROWER_INFO.amountoverzero ) %]<li><a href="#opac-user-fines">Fines ([% BORROWER_INFO.amountoutstanding %])</a></li>[% END %]
129
                                [% IF ( BORROWER_INFO.amountoverzero ) %]<li><a href="#opac-user-fines">Fines ([% BORROWER_INFO.amountoutstanding | $Price %])</a></li>[% END %]
119
                                [% IF ( BORROWER_INFO.amountlessthanzero ) %]<li><a href="#opac-user-fines">Credits ([% BORROWER_INFO.amountoutstanding %])</a></li>[% END %]
130
                                [% IF ( BORROWER_INFO.amountlessthanzero ) %]<li><a href="#opac-user-fines">Credits ([% BORROWER_INFO.amountoutstanding | $Price %])</a></li>[% END %]
120
                            [% END %]
131
                            [% END %]
121
                            [% IF ( RESERVES.count ) %]<li><a href="#opac-user-holds">Holds ([% RESERVES.count %])</a></li>[% END %]
132
                            [% IF ( RESERVES.count ) %]<li><a href="#opac-user-holds">Holds ([% RESERVES.count %])</a></li>[% END %]
122
                        </ul>
133
                        </ul>
Lines 299-305 Link Here
299
                                        <tbody>
310
                                        <tbody>
300
                                            <tr>
311
                                            <tr>
301
                                                <td>You currently owe fines and charges amounting to:</td>
312
                                                <td>You currently owe fines and charges amounting to:</td>
302
                                                <td><a href="/cgi-bin/koha/opac-account.pl">[% BORROWER_INFO.amountoutstanding %]</a></td>
313
                                                <td><a href="/cgi-bin/koha/opac-account.pl">[% BORROWER_INFO.amountoutstanding | $Price %]</a></td>
303
                                            </tr>
314
                                            </tr>
304
                                        </tbody>
315
                                        </tbody>
305
                                    </table>
316
                                    </table>
Lines 326-332 Link Here
326
                                        <thead><tr><th colspan="2">Amount</th></tr></thead>
337
                                        <thead><tr><th colspan="2">Amount</th></tr></thead>
327
                                        <tbody>
338
                                        <tbody>
328
                                            <tr>
339
                                            <tr>
329
                                                <td>You have a credit of:</td><td><a href="/cgi-bin/koha/opac-account.pl">[% BORROWER_INFO.amountoutstanding %]</a></td>
340
                                                <td>You have a credit of:</td><td><a href="/cgi-bin/koha/opac-account.pl">[% BORROWER_INFO.amountoutstanding | $Price %]</a></td>
330
                                            </tr>
341
                                            </tr>
331
                                        </tbody>
342
                                        </tbody>
332
                                    </table>
343
                                    </table>
(-)a/opac/opac-user.pl (-5 / +14 lines)
Lines 118-126 if ( C4::Context->preference('OpacRenewalAllowed') Link Here
118
    $borr->{'flagged'} = 1;
118
    $borr->{'flagged'} = 1;
119
    $canrenew = 0;
119
    $canrenew = 0;
120
    $template->param(
120
    $template->param(
121
        renewal_blocked_fines => sprintf( '%.02f', $no_renewal_amt ),
121
        renewal_blocked_fines => $no_renewal_amt,
122
        renewal_blocked_fines_amountoutstanding =>
122
        renewal_blocked_fines_amountoutstanding => $borr->{amountoutstanding},
123
          sprintf( '%.02f', $borr->{amountoutstanding} ),
123
    );
124
}
125
126
my $checkoutsblockedamount = C4::Context->preference( 'noissuescharge' );
127
$checkoutsblockedamount ||=0;
128
if ( C4::Context->preference( 'noissuescharge' ) && $borr->{amountoutstanding} > $checkoutsblockedamount ) {
129
    $borr->{'flagged'} = 1;
130
    $canrenew = 0;
131
    $template->param(
132
        checkouts_blocked_amount => sprintf ( '%.02f', $checkoutsblockedamount ),
124
    );
133
    );
125
}
134
}
126
135
Lines 129-135 if ( $borr->{'amountoutstanding'} < 0 ) { Link Here
129
    $borr->{'amountoutstanding'} = -1 * ( $borr->{'amountoutstanding'} );
138
    $borr->{'amountoutstanding'} = -1 * ( $borr->{'amountoutstanding'} );
130
}
139
}
131
140
132
$borr->{'amountoutstanding'} = sprintf "%.02f", $borr->{'amountoutstanding'};
141
my @bordat;
142
$bordat[0] = $borr;
133
143
134
# Warningdate is the date that the warning starts appearing
144
# Warningdate is the date that the warning starts appearing
135
if ( $borr->{'dateexpiry'} && C4::Context->preference('NotifyBorrowerDeparture') ) {
145
if ( $borr->{'dateexpiry'} && C4::Context->preference('NotifyBorrowerDeparture') ) {
136
- 

Return to bug 15775