From b95b4d4c89a2a3aa12a059655f705de84e177944 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Thu, 11 May 2023 12:03:55 -0300 Subject: [PATCH] Bug 8179: Make partial receive work correctly Signed-off-by: Tomas Cohen Arazi Signed-off-by: Kyle M Hall Signed-off-by: Tomas Cohen Arazi --- acqui/finishreceive.pl | 2 +- koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/acqui/finishreceive.pl b/acqui/finishreceive.pl index 7b294a9fc8..b682724139 100755 --- a/acqui/finishreceive.pl +++ b/acqui/finishreceive.pl @@ -82,7 +82,7 @@ my $basket = $order_obj->basket; if ($quantityrec > $origquantityrec ) { my @received_items = (); if ($basket->effective_create_items eq 'ordering') { - @received_items = $input->multi_param('items_to_receive'); + @received_items = $input->multi_param('items_to_receive[]'); my @affects = split q{\|}, C4::Context->preference("AcqItemSetSubfieldsWhenReceived"); if ( @affects ) { my $frameworkcode = GetFrameworkCode($biblionumber); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt index c4eb69f02f..1796de3014 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt @@ -645,12 +645,12 @@ }); }); } else if(effective_create_items == 'ordering') { - params['items_to_receive'] = (row.items||[]) + params['items_to_receive[]'] = (row.items||[]) .filter(function(item) { return item._checked }) .map(function(item) { - item.item_id; + return item.item_id; }) } return params; -- 2.39.5