To test:
1) Set maxoutstanding syspref to 5
2) Create a manual invoice for a borrower for $6
3) Log in to the OPAC as this borrower
4) Go to opac-user.pl, your summary page
5) Confirm there is a warning box explaining that the borrower is
blocked from holds due to fines
6) Back on the staff side, pay some or all of the borrower's fines so
they are no longer over the max outstanding amount
7) Refresh the summary page in the OPAC and confirm the warning is gone
Sponsored-by: Catalyst IT
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
</div>
[% END %]
+ [% IF ( borrower.blockedonfines ) %]
+ <div class="alert" id="blockedonfines">
+ <strong>Please note:</strong><span> Your account has outstanding fees & charges of [% amountoutstanding | $Price %]. Checkouts and holds are blocked because your fine balance is over the limit.</span>
+ </div>
+ [% END %]
+
[% IF ( borrower.warndeparture ) %]
<div class="alert" id="warndeparture">
<strong>Please note:</strong><span> Your card will expire on <span id="warndeparture_date">[% borrower.warndeparture | $KohaDates %]</span>. Please contact the library for more information.</span>
);
}
+my $maxoutstanding = C4::Context->preference('maxoutstanding');
+if ( $amountoutstanding && ( $amountoutstanding > $maxoutstanding ) ){
+ $borr->{blockedonfines} = 1;
+}
+
# Warningdate is the date that the warning starts appearing
if ( $borr->{'dateexpiry'} && C4::Context->preference('NotifyBorrowerDeparture') ) {
my $days_to_expiry = Date_to_Days( $warning_year, $warning_month, $warning_day ) - Date_to_Days( $today_year, $today_month, $today_day );