diff --git a/C4/Items.pm b/C4/Items.pm index d5a4167403..cc84447a52 100644 --- a/C4/Items.pm +++ b/C4/Items.pm @@ -1034,7 +1034,7 @@ offset & size can be used to retrieve only a part of the whole listing (defaut b =cut sub GetItemsForInventory { - my ( $minlocation, $maxlocation,$location, $itemtype, $ignoreissued, $datelastseen, $branch, $offset, $size ) = @_; + my ( $minlocation, $maxlocation,$location, $itemtype, $ignoreissued, $datelastseen, $branchcode, $branch, $offset, $size ) = @_; my $dbh = C4::Context->dbh; my ( @bind_params, @where_strings ); @@ -1066,9 +1066,13 @@ END_SQL push @bind_params, $location; } - if ( $branch ) { - push @where_strings, 'items.homebranch = ?'; - push @bind_params, $branch; + if ( $branchcode ) { + if($branch eq "homebranch"){ + push @where_strings, 'items.homebranch = ?'; + }else{ + push @where_strings, 'items.holdingbranch = ?'; + } + push @bind_params, $branchcode; } if ( $itemtype ) { diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tmpl index dfb7a4cba9..df67ea28b6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tmpl @@ -47,6 +47,10 @@ $(document).ready(function(){
Select items you want to check
  1. + + Home Branch + Holding Branch +