From aa377853b17a696341e8c95c217e4bdf41b1c900 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 | 30 +++++++------------ opac/opac-discharge.pl | 5 ---- 2 files changed, 11 insertions(+), 24 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 6dfcbf6b..20ff8ecf 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-discharge.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-discharge.tt @@ -42,19 +42,6 @@

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?

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 %] -
You cannot be discharged for following reasons: -