From 2d5559ffcce28e8a6f5b0ce56e1a456bc58a1bc7 Mon Sep 17 00:00:00 2001 From: Nahuel ANGELINETTI Date: Fri, 2 Jul 2010 15:27:59 +0200 Subject: [PATCH] (bug #4931) add the ability to choose home or holding branch in stocktaking This add radio box in stocktaking to base it on home or holdingbranch Signed-off-by: Henri-Damien LAURENT --- C4/Items.pm | 12 ++++++++---- .../prog/en/modules/tools/inventory.tmpl | 4 ++++ tools/inventory.pl | 3 ++- 3 files changed, 14 insertions(+), 5 deletions(-) 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 +