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

(-)a/C4/Items.pm (-2 / +7 lines)
Lines 1001-1007 sub GetLostItems { Link Here
1001
1001
1002
=head2 GetItemsForInventory
1002
=head2 GetItemsForInventory
1003
1003
1004
($itemlist, $iTotalRecords)  = GetItemsForInventory($minlocation, $maxlocation, $location, $itemtype, $ignoreissued, $datelastseen, $branchcode, $offset, $size, $statushash);
1004
($itemlist, $iTotalRecords)  = GetItemsForInventory($minlocation, $maxlocation, $location, $itemtype, $ignoreissued, $ignore_holds_waiting, $datelastseen, $branchcode, $offset, $size, $statushash);
1005
1005
1006
Retrieve a list of title/authors/barcode/callnumber, for biblio inventory.
1006
Retrieve a list of title/authors/barcode/callnumber, for biblio inventory.
1007
1007
Lines 1019-1025 $iTotalRecords is the number of rows that would have been returned without the $ Link Here
1019
=cut
1019
=cut
1020
1020
1021
sub GetItemsForInventory {
1021
sub GetItemsForInventory {
1022
    my ( $minlocation, $maxlocation,$location, $itemtype, $ignoreissued, $datelastseen, $branchcode, $branch, $offset, $size, $statushash ) = @_;
1022
    my ( $minlocation, $maxlocation,$location, $itemtype, $ignoreissued, $ignore_holds_waiting, $datelastseen, $branchcode, $branch, $offset, $size, $statushash ) = @_;
1023
    my $dbh = C4::Context->dbh;
1023
    my $dbh = C4::Context->dbh;
1024
    my ( @bind_params, @where_strings );
1024
    my ( @bind_params, @where_strings );
1025
1025
Lines 1081-1086 sub GetItemsForInventory { Link Here
1081
        push @where_strings, 'issues.date_due IS NULL';
1081
        push @where_strings, 'issues.date_due IS NULL';
1082
    }
1082
    }
1083
1083
1084
    if ( $ignore_holds_waiting ) {
1085
        $query .= "LEFT JOIN reserves ON items.itemnumber = reserves.itemnumber ";
1086
        push( @where_strings, q{reserves.found != 'W' OR reserves.found IS NULL} );
1087
    }
1088
1084
    if ( @where_strings ) {
1089
    if ( @where_strings ) {
1085
        $query .= 'WHERE ';
1090
        $query .= 'WHERE ';
1086
        $query .= join ' AND ', @where_strings;
1091
        $query .= join ' AND ', @where_strings;
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt (+5 lines)
Lines 174-179 $(document).ready(function(){ Link Here
174
            <input type="checkbox" id="ignoreissued" name="ignoreissued" /></li>
174
            <input type="checkbox" id="ignoreissued" name="ignoreissued" /></li>
175
            [% END %]
175
            [% END %]
176
        <li>
176
        <li>
177
        <li>
178
            <label for="ignore_holds_waiting">Skip copies marked as waiting holds: </label>
179
            <input type="checkbox" id="ignore_holds_waiting" name="ignore_holds_waiting" />
180
        </li>
181
        <li>
177
           <label for="CSVexport">Export to CSV file: </label>
182
           <label for="CSVexport">Export to CSV file: </label>
178
           <input type="checkbox" name="CSVexport" id="CSVexport" />
183
           <input type="checkbox" name="CSVexport" id="CSVexport" />
179
        </li>
184
        </li>
(-)a/tools/inventory.pl (-2 / +3 lines)
Lines 46-51 $maxlocation=$minlocation.'Z' unless ( $maxlocation || ! $minlocation ); Link Here
46
my $location=$input->param('location') || '';
46
my $location=$input->param('location') || '';
47
my $itemtype=$input->param('itemtype'); # FIXME note, template does not currently supply this
47
my $itemtype=$input->param('itemtype'); # FIXME note, template does not currently supply this
48
my $ignoreissued=$input->param('ignoreissued');
48
my $ignoreissued=$input->param('ignoreissued');
49
my $ignore_holds_waiting = $input->param('ignore_holds_waiting');
49
my $datelastseen = $input->param('datelastseen');
50
my $datelastseen = $input->param('datelastseen');
50
my $markseen = $input->param('markseen');
51
my $markseen = $input->param('markseen');
51
my $branchcode = $input->param('branchcode') || '';
52
my $branchcode = $input->param('branchcode') || '';
Lines 135-140 $template->param( Link Here
135
    maxlocation              => $maxlocation,
136
    maxlocation              => $maxlocation,
136
    location                 => $location,
137
    location                 => $location,
137
    ignoreissued             => $ignoreissued,
138
    ignoreissued             => $ignoreissued,
139
    ignore_holds_waiting     => $ignore_holds_waiting,
138
    branchcode               => $branchcode,
140
    branchcode               => $branchcode,
139
    branch                   => $branch,
141
    branch                   => $branch,
140
    datelastseen             => $datelastseen,
142
    datelastseen             => $datelastseen,
Lines 199-205 my @items_with_problems; Link Here
199
if ( $markseen or $op ) {
201
if ( $markseen or $op ) {
200
    # retrieve all items in this range.
202
    # retrieve all items in this range.
201
    my $totalrecords;
203
    my $totalrecords;
202
    ($inventorylist, $totalrecords) = GetItemsForInventory($minlocation, $maxlocation, $location, $itemtype, $ignoreissued, '', $branchcode, $branch, 0, undef , $staton);
204
    ($inventorylist, $totalrecords) = GetItemsForInventory($minlocation, $maxlocation, $location, $itemtype, $ignoreissued, $ignore_holds_waiting, '', $branchcode, $branch, 0, undef , $staton);
203
}
205
}
204
206
205
# If "compare barcodes list to results" has been checked, we want to alert for missing items
207
# If "compare barcodes list to results" has been checked, we want to alert for missing items
206
- 

Return to bug 11405