Bug 14250: (QA follow-up) Small changes

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT] Changed commit title. Tidied opac script.
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Baptiste Wojtkowski 2025-04-18 10:30:31 +02:00 committed by Katrin Fischer
parent 2fcb2145c2
commit 438137ebf6
No known key found for this signature in database
GPG Key ID: 0EF6E2C03357A834
2 changed files with 2 additions and 6 deletions

View File

@ -53,7 +53,7 @@
</div>
[% END %]
[% UNLESS can_be_discharged %]
<p>A discharge cannot be generated for this patron because:</p>
<p>A discharge cannot be generated for this patron for following reasons:</p>
<ul>
[% IF discharge_problems.checkouts %]
<li>The patron has [% discharge_problems.checkouts | html %] item(s) checked out</li>
@ -68,9 +68,6 @@
<p>The patron has holds. The holds will be cancelled if the discharge is generated.</p>
[% END %]
[% IF discharge_problems.debt %]
<li>The patron has unpaid charges of [% discharge_problems.debt | $Price %]</li>
[% END %]
<div class="btn-toolbar">
<form method="post">
[% INCLUDE 'csrf-token.inc' %]

View File

@ -47,8 +47,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
my ( $can_be_discharged, $discharge_problems ) =
Koha::Patron::Discharge::can_be_discharged( { borrowernumber => $loggedinuser } );
my $patron = Koha::Patrons->find($loggedinuser);
my $has_pending_checkouts = $patron->checkouts->count;
my $patron = Koha::Patrons->find($loggedinuser);
$template->param(
can_be_discharged => $can_be_discharged,