From 4850d162842a94e7252f6b7a16e881dd57ad8aef Mon Sep 17 00:00:00 2001 From: Jacob O'Mara Date: Thu, 19 Feb 2026 14:00:42 +0000 Subject: [PATCH] Bug 39658: (follow-up) block checkout when linked accounts over charge limit When AllowFineOverride is disabled and NoIssuesChargeLinkedAccounts is exceeded, hide the barcode field and show 'Cannot check out'. --- circ/circulation.pl | 12 ++++++++++++ .../prog/en/includes/patron_messages.inc | 11 ++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/circ/circulation.pl b/circ/circulation.pl index 1bdd47321ae..0d13a4f3269 100755 --- a/circ/circulation.pl +++ b/circ/circulation.pl @@ -695,6 +695,18 @@ if ($patron) { } } + # Check the debt of this patron's linked accounts + my $no_issues_charge_linked = $patron_charge_limits->{NoIssuesChargeLinkedAccounts}->{limit}; + if ( defined $no_issues_charge_linked ) { + if ( $patron_charge_limits->{NoIssuesChargeLinkedAccounts}->{overlimit} ) { + $template->param( + charges_linked_accounts => 1, + chargesamount_linked_accounts => $patron_charge_limits->{NoIssuesChargeLinkedAccounts}->{charge}, + ); + $noissues = 1 unless C4::Context->preference("allowfineoverride"); + } + } + if ( $patron->has_overdues ) { $template->param( odues => 1 ); } diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc index dbabcef9aa4..2936efabf52 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc @@ -5,7 +5,7 @@ [% SET return_claims = patron.return_claims %] [% SET logged_in_branchcode = Branches.GetLoggedInBranchcode() %] -[% IF ( has_modifications || warndeparture || returnbeforeexpiry || expired || patron.gonenoaddress || patron.lost || userdebarred || odues || ( return_claims.count > ClaimReturnedWarningThreshold ) || age_limitations || limited_category || charges || charges_guarantors_guarantees || charges_guarantees || credits || patron.account_locked ) %] +[% IF ( has_modifications || warndeparture || returnbeforeexpiry || expired || patron.gonenoaddress || patron.lost || userdebarred || odues || ( return_claims.count > ClaimReturnedWarningThreshold ) || age_limitations || limited_category || charges || charges_guarantors_guarantees || charges_guarantees || charges_linked_accounts || credits || patron.account_locked ) %]

Attention