Bug 14497 - Add warning to patron details page if patron's fines exceed noissuescharge
authorKyle M Hall <kyle@bywatersolutions.com>
Mon, 6 Jul 2015 13:43:34 +0000 (09:43 -0400)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 29 Apr 2016 12:15:01 +0000 (12:15 +0000)
Some librarians have requested that the same warning on the check out
page be placed on the patron details page if a patron's fines exceed the
system preference noissuescharge.

Test Plan:
1) Apply this patch
2) Find or create a patron who's fines exceed noissuescharge
3) Browse to that patron's details ( moremember.pl )
4) You should see a warning near the top of the page with links to the
   patron's account page and the pay fines page

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Patch ammended post sign-off

Signed-off-by: Sally Healey <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt
members/moremember.pl

index ccb817c..81a18c9 100644 (file)
@@ -173,6 +173,27 @@ function validate1(date) {
 [% ELSE %]
     [% IF ( was_renewed ) %]<div class="dialog message">Patron's account has been renewed until [% dateexpiry | $KohaDates %]</div>[% END %]
 
+    [% IF fines %]
+        [% SET NoIssuesCharge = Koha.Preference('noissuescharge') %]
+        [% IF NoIssuesCharge && fines > NoIssuesCharge %]
+            <li>
+                <span class="circ-hlt">Fees &amp; Charges:</span>
+                Patron has <a href="/cgi-bin/koha/members/boraccount.pl?borrowernumber=[% borrowernumber %]">
+                    Outstanding fees &amp; charges
+                    [% IF ( chargesamount ) %]
+                        of [% chargesamount %]
+                    [% END %]
+                </a>.
+                [% IF !Koha.Preference('AllowFineOverride') %]
+                    <span class="circ-hlt">Checkouts are BLOCKED because fine balance is OVER THE LIMIT.</span>
+                [% END %]
+                <a href="/cgi-bin/koha/members/pay.pl?borrowernumber=[% borrowernumber %]">Make payment</a>
+                or
+                <a href="/cgi-bin/koha/members/paycollect.pl?borrowernumber=[% borrowernumber %]">Pay all fines</a></li>
+            </li>
+        [% END %]
+    [% END %]
+
     [% IF ( flagged ) %]
     <div id="circmessages" class="circmessage attention">
         <ul>
index 80814c3..e7c54f4 100755 (executable)
@@ -116,7 +116,7 @@ my $error = $input->param('error');
 $template->param( error => $error ) if ( $error );
 
 my ( $od, $issue, $fines ) = GetMemberIssuesAndFines($borrowernumber);
-$template->param( issuecount => $issue );
+$template->param( issuecount => $issue, fines => $fines );
 
 my $data = GetMember( 'borrowernumber' => $borrowernumber );