@@ -, +, @@ --- acqui/finishreceive.pl | 10 +++++----- .../prog/en/modules/acqui/orderreceive.tt | 14 ++++++-------- 2 files changed, 11 insertions(+), 13 deletions(-) --- a/acqui/finishreceive.pl +++ a/acqui/finishreceive.pl @@ -145,11 +145,11 @@ if ($quantityrec > $origquantityrec ) { # now, add items if applicable if ($basket->effective_create_items eq 'receiving') { - my @tags = $input->multi_param('tag'); - my @subfields = $input->multi_param('subfield'); - my @field_values = $input->multi_param('field_value'); - my @serials = $input->multi_param('serial'); - my @itemid = $input->multi_param('itemid'); + my @tags = $input->multi_param('tag[]'); + my @subfields = $input->multi_param('subfield[]'); + my @field_values = $input->multi_param('field_value[]'); + my @serials = $input->multi_param('serial[]'); + my @itemid = $input->multi_param('itemid[]'); #Rebuilding ALL the data for items into a hash # parting them on $itemid. my %itemhash; --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt @@ -695,14 +695,12 @@ params['replacementprice'] = row.replacement_price; params['unitprice'] = ( invoiceincgst=="1" ) ? ( row.unit_price_tax_included || row.ecost_tax_included ) : ( row.unit_price_tax_excluded || row.ecost_tax_excluded ); params['order_internalnote'] = row.internal_note; - if(effective_create_items == 'receiving') { - Object.keys(row.items).forEach(function(key) { - var item = row.items[key]; - Object.keys(item).forEach(function(key) { - var field = item[key]; - Object.keys(field).forEach(function(key) { - if(!params[key]) params[key] = []; - params[key].push(item[key]); + if (effective_create_items == 'receiving') { + row.items.forEach(function(item){ + Object.keys(item).forEach(function(item_field){ + Object.keys(item[item_field]).forEach(function(key){ + if (!params[key]) params[key] = []; + params[key].push(item[item_field][key]); }); }); }); --