From 50b7679adb4150ddf2ddb1da8474868afe4e2031 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Mon, 4 Mar 2024 19:37:34 -0300 Subject: [PATCH] Bug 36193: cud- treatment for Acq order receipt cancelling Signed-off-by: Tomas Cohen Arazi Signed-off-by: Nick Clemens Signed-off-by: Katrin Fischer --- acqui/parcel.pl | 2 +- .../intranet-tmpl/prog/en/modules/acqui/parcel.tt | 13 ++++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/acqui/parcel.pl b/acqui/parcel.pl index 06172690f6..7fd16c76d2 100755 --- a/acqui/parcel.pl +++ b/acqui/parcel.pl @@ -82,7 +82,7 @@ my $op = $input->param('op') // ''; # process cancellation first so that list of # orders to display is calculated after -if ($op eq 'cancelreceipt') { +if ($op eq 'cud-cancelreceipt') { my $ordernumber = $input->param('ordernumber'); my $parent_ordernumber = CancelReceipt($ordernumber); unless($parent_ordernumber) { diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt index dcb9379874..74badf6d47 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt @@ -294,7 +294,13 @@ Can't cancel receipt [% ELSE %] - Cancel receipt +
+ [% INCLUDE 'csrf-token.inc' %] + + + +
+ Cancel receipt [% END %] @@ -359,6 +365,11 @@ $(document).ready(function(){ + $(".cancel_receipt").on( 'click', function(e){ + e.preventDefault(); + $('#cancel_receipt_' + $(this).data('ordernumber')).submit(); + }); + if ( $("#receivedt").length ) { var receivedt = $("#receivedt").dataTable($.extend(true, {}, dataTablesDefaults, { "stateSave": true, -- 2.39.5