@@ -, +, @@ --- C4/Items.pm | 5 ++++- .../prog/en/modules/tools/inventory.tt | 15 +++++++++++++++ tools/inventory.pl | 9 ++++++--- 3 files changed, 25 insertions(+), 4 deletions(-) --- a/C4/Items.pm +++ a/C4/Items.pm @@ -1112,7 +1112,10 @@ sub GetItemsForInventory { if ($f and $sf) { # We replace the code with it's description my $authvals = C4::Koha::GetKohaAuthorisedValuesFromField($f, $sf, $row->{'frameworkcode'}); - $row->{$_} = $authvals->{$row->{$_}} if defined $authvals->{$row->{$_}}; + if ( defined $authvals->{ $row->{$_} } ) { + $row->{"$_-code"} = $row->{$_}; + $row->{$_} = $authvals->{ $row->{$_} }; + } } } push @results, $row; --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt @@ -163,6 +163,21 @@ $(document).ready(function(){ [% END %] + [% IF (authorised_values) %] +
+ If comparing barcodes list to results, assume items with the following locations should not have been scanned + +
    + [% FOREACH value IN authorised_values %] +
  1. + + +
  2. + [% END %] +
+
+ [% END %] +
  1. --- a/tools/inventory.pl +++ a/tools/inventory.pl @@ -37,7 +37,7 @@ use C4::Circulation; use C4::Reports::Guided; #_get_column_defs use C4::Charset; use Koha::DateUtils; -use List::MoreUtils qw( none ); +use List::MoreUtils qw( none any ); my $minlocation=$input->param('minlocation') || ''; @@ -54,6 +54,7 @@ my $branch = $input->param('branch'); my $op = $input->param('op'); my $compareinv2barcd = $input->param('compareinv2barcd'); my $out_of_order = $input->param('out_of_order'); +my @ignore_locations = $input->param('ignore_locations'); my ( $template, $borrowernumber, $cookie ) = get_template_and_user( { template_name => "tools/inventory.tt", @@ -285,8 +286,10 @@ if ( $compareinv2barcd ) { for my $should_be_scanned ( @$inventorylist ) { my $barcode = $should_be_scanned->{barcode}; unless ( grep /^$barcode$/, @scanned_barcodes ) { - $should_be_scanned->{problem} = 'not_scanned'; - push @items_with_problems, { %$should_be_scanned }; + unless ( any { $should_be_scanned->{'location-code'} eq $_ } @ignore_locations ) { + $should_be_scanned->{problem} = 'not_scanned'; + push @items_with_problems, { %$should_be_scanned }; + } } } } --