From cb798758a79d1aa7b73880b8cabe813897b24702 Mon Sep 17 00:00:00 2001 From: Baptiste Wojtkowski Date: Wed, 4 Sep 2024 14:45:20 +0200 Subject: [PATCH] Bug 14250: (follow-up) Refacto the algorithm for discharge messages TEST PLAN: 1 - In the intranet add fines to a client and ensure they have no checkout 2 - Set syspref useDischarge to 'Allow' 3 - On client profile click on "Discharge", see it is possible 4 - On the opac, go to the tab "Ask for discharge", see it is possible 5 - Apply patch 6 - Click on the button "Ask for discharge" -> it will not be possible and you will be propperly messaged 7 - Return to the tab "Ask for a discharge", there will be no button anymore 8 - On the intranet page, there will be no button anymore 9 - Check out a book 10 - Repeat 7 and 8 and see the message include issue with checkout 11 - Remove fine and repeat 7 & 8 Note: removing the useless has_checkout and has_debt --- .../bootstrap/en/modules/opac-discharge.tt | 16 +++------------- opac/opac-discharge.pl | 5 ----- 2 files changed, 3 insertions(+), 18 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-discharge.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-discharge.tt index 3a3f381..f657a4e 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-discharge.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-discharge.tt @@ -44,24 +44,14 @@ Get your discharge [% ELSIF pending %]

Your discharge will be available on this page within a few days.

- [% ELSIF failure %] -

You cannot be discharged because you have checked out items. Please return your checked out items before asking for a discharge.

- [% ELSIF not messages %]

What is a discharge?

This document certifies that you have returned all borrowed items. It is sometimes asked during a file transfer from a school to another. The discharge is sent by us to your school. You will also find it available on your reader account.

Warning: This request is only valid if you are in good standing with the library. Once the application is made, you can not borrow library materials.

[% UNLESS can_be_discharged %] + [% IF failure %] +

There was an error during the discharge process

+ [% END %]
You cannot be discharged because: