From 7d55824aa7740472d71fba995fa7315c4d2b485b Mon Sep 17 00:00:00 2001 From: Baptiste Wojtkowski Date: Wed, 24 Jul 2024 15:52:27 +0200 Subject: [PATCH] Bug 37451 - Remove the ability to delete a restriction due to discharge However it is not possible to remove the discharge, it is possible to remove the suspension associated to the discharge. This can lead to a lot of undesired behaviors when the user asks for another discharge or get suspended for another reason. Suspension due to discharge should therefore be definitive. TEST PLAN: 1 - Go to patron -> pick a patron -> go to discharges 2 - Generate a discharge for the patron 3 - Go to check out -> restrictions 4 - There should be a restriction with type discharge that can be deleted 5 - Apply patch 6 - There still should be a restriction but the button has been replaced by an infobox --- .../prog/en/includes/patron-restrictions-tab.inc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-restrictions-tab.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-restrictions-tab.inc index d1a4a64..feed0e9 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-restrictions-tab.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-restrictions-tab.inc @@ -24,6 +24,7 @@ [% PROCESS restriction_type_description restriction_type=restriction.type %] + [% restriction.type.code %] [% IF restriction.comment.search('OVERDUES_PROCESS') %] Restriction added by overdues process [% restriction.comment.remove('OVERDUES_PROCESS ') | $raw %] [% ELSE %] @@ -41,6 +42,7 @@ [% restriction.created | $KohaDates %] [% IF CAN_user_borrowers_edit_borrowers && CAN_user_circulate_manage_restrictions %] + [% IF restriction.type.code != "DISCHARGE" %]
[% INCLUDE 'csrf-token.inc' %] @@ -48,7 +50,11 @@
+ [% ELSE %] + + [% END %] + [% END %] [% END %] -- 2.43.0