View | Details | Raw Unified | Return to bug 4931
Collapse All | Expand All

(-)a/C4/Items.pm (-3 / +7 lines)
Lines 993-1002 END_SQL Link Here
993
        push @where_strings, 'items.location = ?';
993
        push @where_strings, 'items.location = ?';
994
        push @bind_params, $location;
994
        push @bind_params, $location;
995
    }
995
    }
996
    
996
997
    if ( $branch ) {
997
    if ( $branchcode ) {
998
        if($branch eq "homebranch"){
998
        push @where_strings, 'items.homebranch = ?';
999
        push @where_strings, 'items.homebranch = ?';
999
        push @bind_params, $branch;
1000
        }else{
1001
            push @where_strings, 'items.holdingbranch = ?';
1002
        }
1003
        push @bind_params, $branchcode;
1000
    }
1004
    }
1001
    
1005
    
1002
    if ( $itemtype ) {
1006
    if ( $itemtype ) {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tmpl (+6 lines)
Lines 76-81 $(document).ready(function(){ Link Here
76
        <fieldset class="rows">
76
        <fieldset class="rows">
77
        <legend>Select items you want to check</legend>
77
        <legend>Select items you want to check</legend>
78
        <ol><li>
78
        <ol><li>
79
        <label for="branch">Branch</label>
80
            <input type="radio" name="branch" value="homebranch">Home Branch</input>
81
            <input type="radio" name="branch" value="holdingbranch">Holding Branch</input>
82
        </li><li>
79
        <label for="branchloop">Library</label><select id="branchloop" name="branchcode" style="width:12em;">
83
        <label for="branchloop">Library</label><select id="branchloop" name="branchcode" style="width:12em;">
80
            <option value="">All Locations</option>
84
            <option value="">All Locations</option>
81
        <!-- TMPL_LOOP NAME="branchloop" -->
85
        <!-- TMPL_LOOP NAME="branchloop" -->
Lines 228-233 $(document).ready(function(){ Link Here
228
    </form>
232
    </form>
229
    <!-- TMPL_IF NAME="offset" -->
233
    <!-- TMPL_IF NAME="offset" -->
230
    <form method="post" action="/cgi-bin/koha/tools/inventory.pl">
234
    <form method="post" action="/cgi-bin/koha/tools/inventory.pl">
235
        <input type="hidden" name="branch" value="<!-- TMPL_VAR NAME="branch" -->" />
231
        <input type="hidden" name="minlocation" value="<!-- TMPL_VAR NAME="minlocation" -->" />
236
        <input type="hidden" name="minlocation" value="<!-- TMPL_VAR NAME="minlocation" -->" />
232
        <input type="hidden" name="maxlocation" value="<!-- TMPL_VAR NAME="maxlocation" -->" />
237
        <input type="hidden" name="maxlocation" value="<!-- TMPL_VAR NAME="maxlocation" -->" />
233
        <input type="hidden" name="location" value="<!-- TMPL_VAR NAME="location" -->" />
238
        <input type="hidden" name="location" value="<!-- TMPL_VAR NAME="location" -->" />
Lines 241-246 $(document).ready(function(){ Link Here
241
    <!-- /TMPL_IF -->
246
    <!-- /TMPL_IF -->
242
    <!-- TMPL_IF NAME="nextoffset" -->
247
    <!-- TMPL_IF NAME="nextoffset" -->
243
    <form method="post">
248
    <form method="post">
249
        <input type="hidden" name="branch" value="<!-- TMPL_VAR NAME="branch" -->" />
244
        <input type="hidden" name="location" value="<!-- TMPL_VAR NAME="location" -->" />
250
        <input type="hidden" name="location" value="<!-- TMPL_VAR NAME="location" -->" />
245
        <input type="hidden" name="branchcode" value="<!-- TMPL_VAR NAME="branchcode" -->" />
251
        <input type="hidden" name="branchcode" value="<!-- TMPL_VAR NAME="branchcode" -->" />
246
        <input type="hidden" name="minlocation" value="<!-- TMPL_VAR NAME="minlocation" -->" />
252
        <input type="hidden" name="minlocation" value="<!-- TMPL_VAR NAME="minlocation" -->" />
(-)a/tools/inventory.pl (-2 / +3 lines)
Lines 49-54 $offset=0 unless $offset; Link Here
49
my $pagesize = $input->param('pagesize');
49
my $pagesize = $input->param('pagesize');
50
$pagesize=50 unless $pagesize;
50
$pagesize=50 unless $pagesize;
51
my $branchcode = $input->param('branchcode');
51
my $branchcode = $input->param('branchcode');
52
my $branch     = $input->param('branch');
52
my $op = $input->param('op');
53
my $op = $input->param('op');
53
my $res;    #contains the results loop
54
my $res;    #contains the results loop
54
# warn "uploadbarcodes : ".$uploadbarcodes;
55
# warn "uploadbarcodes : ".$uploadbarcodes;
Lines 129-134 $template->param(branchloop => \@branch_loop, Link Here
129
                location=>$location,
130
                location=>$location,
130
                ignoreissued=>$ignoreissued,
131
                ignoreissued=>$ignoreissued,
131
                branchcode=>$branchcode,      
132
                branchcode=>$branchcode,      
133
                branch    => $branch,
132
                offset => $offset,
134
                offset => $offset,
133
                pagesize => $pagesize,
135
                pagesize => $pagesize,
134
                datelastseen => $datelastseen,
136
                datelastseen => $datelastseen,
Lines 183-189 if ( ! ($uploadbarcodes && length($uploadbarcodes)>0 ) || ( $input->param('compa Link Here
183
        }
185
        }
184
    }
186
    }
185
    if ($markseen or $op) {
187
    if ($markseen or $op) {
186
        $res = GetItemsForInventory($minlocation,$maxlocation,$location, $ignoreissued,$itemtype,$datelastseen,$branchcode,$offset,$pagesize,$staton);
188
        $res = GetItemsForInventory( $minlocation, $maxlocation, $location, $ignoreissued, $itemtype, $datelastseen, $branchcode, $branch, $offset, $pagesize, $staton );
187
        $template->param(loop =>$res,
189
        $template->param(loop =>$res,
188
                        nextoffset => ($offset+$pagesize),
190
                        nextoffset => ($offset+$pagesize),
189
                        prevoffset => ($offset?$offset-$pagesize:0),
191
                        prevoffset => ($offset?$offset-$pagesize:0),
190
- 

Return to bug 4931