@@ -, +, @@
due to fines
---
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt | 6 ++++++
opac/opac-user.pl | 5 +++++
2 files changed, 11 insertions(+)
--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt
+++ a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt
@@ -58,6 +58,12 @@
[% END %]
+ [% IF ( borrower.blockedonfines ) %]
+
+ Please note: Your account has outstanding fees & charges of [% amountoutstanding | $Price %]. Checkouts and holds are blocked because your fine balance is over the limit.
+
+ [% END %]
+
[% IF ( borrower.warndeparture ) %]
Please note: Your card will expire on [% borrower.warndeparture | $KohaDates %]. Please contact the library for more information.
--- a/opac/opac-user.pl
+++ a/opac/opac-user.pl
@@ -141,6 +141,11 @@ if ( C4::Context->preference('OpacRenewalAllowed')
);
}
+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 );
--