From 44949a88ea7dba3262cb82423d4fedd47ee7168a Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Thu, 1 Feb 2024 15:11:41 +0000 Subject: [PATCH] Bug 34478: Manual fix - add op - members/discharge Signed-off-by: Jonathan Druart --- koha-tmpl/intranet-tmpl/prog/en/modules/members/discharge.tt | 1 + members/discharge.pl | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/discharge.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/discharge.tt index 303a34237f..fd2a5b241f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/discharge.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/discharge.tt @@ -60,6 +60,7 @@
[% INCLUDE 'csrf-token.inc' %] +
diff --git a/members/discharge.pl b/members/discharge.pl index e0f4b2d8cc..10002e21c5 100755 --- a/members/discharge.pl +++ b/members/discharge.pl @@ -49,6 +49,7 @@ my ( $template, $loggedinuser, $cookie, $flags ) = get_template_and_user({ flagsrequired => { 'borrowers' => 'edit_borrowers' }, }); +my $op = $input->param('op') // q{}; my $borrowernumber = $input->param('borrowernumber'); unless ( C4::Context->preference('useDischarge') ) { @@ -65,7 +66,7 @@ my $can_be_discharged = Koha::Patron::Discharge::can_be_discharged({ }); # Generating discharge if needed -if ( $input->param('discharge') and $can_be_discharged ) { +if ( $op eq 'cud-discharge' && $input->param('discharge') and $can_be_discharged ) { my $is_discharged = Koha::Patron::Discharge::is_discharged({ borrowernumber => $borrowernumber, }); -- 2.39.5