If a patron owes more than the system preference maxoutstanding in fees
and fines, the patron will be unable to place holds via the opac.
However, a librarian placing a hold for a patron is not even warned!
Test Plan:
1) Apply this patch
2) Set maxoutstanding to 1.00
3) Find a patron owing more than 1.00
4) Attempt to place a hold
5) Note the warning that the patron owes money
Works as expected.
Signed-off-by: Marc VĂ©ron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
+[% USE Koha %]
[% USE KohaDates %]
[% INCLUDE 'doc-head-open.inc' %]
[% UNLESS ( multi_hold ) %]
<li><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">[% borrowerfirstname %] [% borrowersurname %]</a>'s <strong>account has expired</strong></li>
[% END %]
+ [% IF amount_outstanding && Koha.Preference('maxoutstanding') && amount_outstanding > Koha.Preference('maxoutstanding') %]
+ <li><a href="/cgi-bin/koha/members/pay.pl?borrowernumber=[% borrowernumber %]">[% borrowerfirstname %] [% borrowersurname %]</a> <strong>owes [% amount_outstanding | format('%.2f') %]</strong></li>
+ [% END %]
+
[% IF ( diffbranch ) %]
<li> <strong>Pickup library is different</strong> than <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">[% borrowerfirstname %] [% borrowersurname %]</a>'s home library ([% borrower_branchname %] / [% borrower_branchcode %] )</li>
[% END %]
expiry => $expiry,
diffbranch => $diffbranch,
messages => $messages,
- warnings => $warnings
+ warnings => $warnings,
+ amount_outstanding => GetMemberAccountRecords($borrowerinfo->{borrowernumber}),
);
}