Bug 14399: Prevent display of double zero notforloan status
[koha.git] / tools / inventory.pl
index 731ad77..9efa8c5 100755 (executable)
@@ -97,7 +97,7 @@ for my $statfield (qw/items.notforloan items.itemlost items.withdrawn items.dama
         if ( $statfield eq 'items.notforloan') {
             # Add notforloan == 0 to the list of possible notforloan statuses
             # The lib value is replaced in the template
-            push @$arr, { authorised_value => 0, id => 'stat0' , lib => 'ignore' };
+            push @$arr, { authorised_value => 0, id => 'stat0' , lib => 'ignore' } if ! grep { $_->{authorised_value} eq '0' } @$arr;
             @notforloans = map { $_->{'authorised_value'} } @$arr;
         }
         $hash->{values} = $arr;