Bug 8408 - Odd OPAC message when OPAC Renewals are disabled and OPACFineNoRenewals...
authorKyle M Hall <kyle@bywatersolutions.com>
Tue, 10 Jul 2012 14:57:46 +0000 (10:57 -0400)
committerPaul Poulain <paul.poulain@biblibre.com>
Wed, 1 Aug 2012 15:43:03 +0000 (17:43 +0200)
If OpacRenewalAllowed is set to "Don't allow" and OPACFineNoRenewals is set to blank ( i.e. disabled ).
A user who owes any fines, when logged in to the OPAC will receive the following message:

    Please note: You have more than 0.00 in fines.

This is a rather odd message, and is not very sensible. The message should either be modified or removed altogether.

This patch modifies the message to the following:

    Please note: You currently owe $fines in fines

where $fines in the formatted amount the borrower currently owes
in fines.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt
opac/opac-user.pl

index 33e3b48..26b5efc 100644 (file)
@@ -103,7 +103,7 @@ $.tablesorter.addParser({
             [% IF ( renewal_blocked_fines ) && ( OpacRenewalAllowed ) %]
                 <span id="renewal_blocked_fines"><li><strong>Please note: </strong> Since you have <a href="/cgi-bin/koha/opac-account.pl">more than <span id="renewal_blocked_fines_amount">[% renewal_blocked_fines %]</span></a> in fines, you cannot renew your books online. Please pay your fines if you wish to renew your books.</li></span>
             [% ELSIF ( renewal_blocked_fines ) %]
-        <span id="renewal_blocked_fines"><li><strong>Please note: </strong> You have <a href="/cgi-bin/koha/opac-account.pl">more than <span id="renewal_blocked_fines_amount">[% renewal_blocked_fines %]</span></a> in fines. </li></span>
+                <span id="renewal_blocked_fines"><li><strong>Please note: </strong> You currently owe <a href="/cgi-bin/koha/opac-account.pl"><span id="renewal_blocked_fines_amount">[% renewal_blocked_fines %] in fines.</span></a></li></span>
             [% END %]
         </ul></div>
         [% END %]
index 4dbc432..50a167e 100755 (executable)
@@ -109,7 +109,7 @@ if ( $borr->{amountoutstanding} > $no_renewal_amt ) {
     $borr->{'flagged'} = 1;
     $canrenew = 0;
     $template->param(
-        renewal_blocked_fines => sprintf( '%.02f', $no_renewal_amt ),
+        renewal_blocked_fines => sprintf( '%.02f', $borr->{amountoutstanding} ),
     );
 }