From a64a4d7fead5d7c57a34695ea833b409170cf1cc Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Tue, 28 Mar 2017 17:02:19 +0200 Subject: [PATCH] Bug 14399: Fix the code for missing items in inventory.pl Content-Type: text/plain; charset=utf-8 --- .../intranet-tmpl/prog/en/modules/tools/inventory.tt | 6 ++---- tools/inventory.pl | 20 -------------------- 2 files changed, 2 insertions(+), 24 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt index 650a510..304ee99 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt @@ -295,13 +295,11 @@ $(document).ready(function(){ [% IF result.problem == 'wrongplace' %] -

Item should not have been scanned

- [% ELSIF result.problem == 'missingitem' %] -

Item missing

+

Item at wrong location (should not have been scanned)

[% ELSIF result.problem == 'changestatus' %]

Unknown not-for-loan status

[% ELSIF result.problem == 'not_scanned' %] -

Item should have been scanned

+

Item missing (should have been scanned)

[% END %] diff --git a/tools/inventory.pl b/tools/inventory.pl index 731ad77..fa9a8c8 100755 --- a/tools/inventory.pl +++ b/tools/inventory.pl @@ -257,24 +257,6 @@ if ( $markseen or $op ) { } -# If "compare barcodes list to results" has been checked, we want to alert for missing items -if ( $compareinv2barcd ) { - # set "missing" flags for all items with a datelastseen (dls) before the chosen datelastseen (cdls) - my $dls = output_pref( { dt => dt_from_string( $datelastseen ), - dateformat => 'iso' } ); - foreach my $item ( @$inventorylist ) { - my $cdls = output_pref( { dt => dt_from_string( $item->{datelastseen} ), - dateformat => 'iso' } ); - if ( $cdls lt $dls ) { - $item->{problem} = 'missingitem'; - # We have to push a copy of the item, not the reference - push @items_with_problems, { %$item }; - } - } -} - - - # insert "wrongplace" to all scanned items that are not supposed to be in this range # note this list is always displayed, whatever the librarian has chosen for comparison my $moddatecount = 0; @@ -389,8 +371,6 @@ if (defined $input->param('CSVexport') && $input->param('CSVexport') eq 'on'){ if ( defined $item->{problem} ) { if ( $item->{problem} eq 'wrongplace' ) { push @line, "wrong place"; - } elsif ( $item->{problem} eq 'missingitem' ) { - push @line, "missing item"; } elsif ( $item->{problem} eq 'changestatus' ) { push @line, "change item status"; } elsif ($item->{problem} eq 'not_scanned' ) { -- 2.1.4