Koha-clms/members
Baptiste Wojtkowski 2fcb2145c2
Bug 14250: Patron with fines cannot be discharged anymore
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

Bug 14250: (QA follow-up) Deduplicate checks

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Bug 14250: (follow-up) Update messages

Update the text for the reasons the patron cannot be discharged.

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

Bug 14250: (follow-up) Refacto discharge messages display

The script that determines if one should display messages to the user,
informing him whether they are allowed or not to ask for a discharge is
quite hard to understand.

For sake of readability, transforming the unless to an if since the
error behaviour was in the unless and the success in the else.
Changing to success behaviour in the if and failure in the else.

Bug 14250: Tidy

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-04-22 08:46:26 +02:00
..
accountline-details.pl Bug 37222: Standardize markup for sidebar menus 2025-02-21 16:41:24 +01:00
alert-subscriptions.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
apikeys.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
boraccount.pl Bug 37211: Make notes in patron transactions table editable 2025-04-14 08:51:12 +02:00
cancel-charge.pl Bug 23674: Add ability to add note to canceled charge 2025-03-10 11:42:36 +01:00
default_messageprefs.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
deletemem.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
discharge.pl Bug 14250: Patron with fines cannot be discharged anymore 2025-04-22 08:46:26 +02:00
discharges.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
files.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
holdshistory.pl Bug 35560: Use the REST API for holds 2025-04-14 08:51:17 +02:00
housebound.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
ill-requests.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
mancredit.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
maninvoice.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
member-flags.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
member-password.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
member.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
memberentry.pl Bug 39331: If patron category cant be guarantee do not continue with add_guarantors 2025-03-21 17:50:26 +01:00
members-home.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
members-update-do.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
members-update.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
merge-patrons.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
mod_debarment.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
moremember.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
notices.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
patronimage.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
pay.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
paycollect.pl Bug 37222: Standardize markup for sidebar menus 2025-02-21 16:41:24 +01:00
print_overdues.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
printfeercpt.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
printinvoice.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
printnotice.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
printslip.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
purchase-suggestions.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
readingrec.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
recallshistory.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
routing-lists.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
setstatus.pl Bug 38847: Fix error when renewing an expired child patron without a guarantor 2025-02-12 15:28:17 +01:00
statistics.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
summary-print.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
two_factor_auth.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
update-child.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00