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

(-)a/C4/Items.pm (-2 / +7 lines)
Lines 1011-1017 sub GetLostItems { Link Here
1011
1011
1012
=head2 GetItemsForInventory
1012
=head2 GetItemsForInventory
1013
1013
1014
($itemlist, $iTotalRecords)  = GetItemsForInventory($minlocation, $maxlocation, $location, $itemtype, $ignoreissued, $datelastseen, $branchcode, $offset, $size, $statushash);
1014
($itemlist, $iTotalRecords)  = GetItemsForInventory($minlocation, $maxlocation, $location, $itemtype, $ignoreissued, $ignore_holds_waiting, $datelastseen, $branchcode, $offset, $size, $statushash);
1015
1015
1016
Retrieve a list of title/authors/barcode/callnumber, for biblio inventory.
1016
Retrieve a list of title/authors/barcode/callnumber, for biblio inventory.
1017
1017
Lines 1029-1035 $iTotalRecords is the number of rows that would have been returned without the $ Link Here
1029
=cut
1029
=cut
1030
1030
1031
sub GetItemsForInventory {
1031
sub GetItemsForInventory {
1032
    my ( $minlocation, $maxlocation,$location, $itemtype, $ignoreissued, $datelastseen, $branchcode, $branch, $offset, $size, $statushash ) = @_;
1032
    my ( $minlocation, $maxlocation,$location, $itemtype, $ignoreissued, $ignore_holds_waiting, $datelastseen, $branchcode, $branch, $offset, $size, $statushash ) = @_;
1033
    my $dbh = C4::Context->dbh;
1033
    my $dbh = C4::Context->dbh;
1034
    my ( @bind_params, @where_strings );
1034
    my ( @bind_params, @where_strings );
1035
1035
Lines 1091-1096 sub GetItemsForInventory { Link Here
1091
        push @where_strings, 'issues.date_due IS NULL';
1091
        push @where_strings, 'issues.date_due IS NULL';
1092
    }
1092
    }
1093
1093
1094
    if ( $ignore_holds_waiting ) {
1095
        $query .= "LEFT JOIN reserves ON items.itemnumber = reserves.itemnumber ";
1096
        push( @where_strings, q{reserves.found != 'W' OR reserves.found IS NULL} );
1097
    }
1098
1094
    if ( @where_strings ) {
1099
    if ( @where_strings ) {
1095
        $query .= 'WHERE ';
1100
        $query .= 'WHERE ';
1096
        $query .= join ' AND ', @where_strings;
1101
        $query .= join ' AND ', @where_strings;
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt (+5 lines)
Lines 207-212 $(document).ready(function(){ Link Here
207
            <input type="checkbox" id="ignoreissued" name="ignoreissued" /></li>
207
            <input type="checkbox" id="ignoreissued" name="ignoreissued" /></li>
208
            [% END %]
208
            [% END %]
209
        <li>
209
        <li>
210
        <li>
211
            <label for="ignore_holds_waiting">Skip copies marked as waiting holds: </label>
212
            <input type="checkbox" id="ignore_holds_waiting" name="ignore_holds_waiting" />
213
        </li>
214
        <li>
210
           <label for="CSVexport">Export to CSV file: </label>
215
           <label for="CSVexport">Export to CSV file: </label>
211
           <input type="checkbox" name="CSVexport" id="CSVexport" />
216
           <input type="checkbox" name="CSVexport" id="CSVexport" />
212
        </li>
217
        </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 231-237 my @items_with_problems; Link Here
231
if ( $markseen or $op ) {
233
if ( $markseen or $op ) {
232
    # retrieve all items in this range.
234
    # retrieve all items in this range.
233
    my $totalrecords;
235
    my $totalrecords;
234
    ($inventorylist, $totalrecords) = GetItemsForInventory($minlocation, $maxlocation, $location, $itemtype, $ignoreissued, '', $branchcode, $branch, 0, undef , $staton);
236
    ($inventorylist, $totalrecords) = GetItemsForInventory($minlocation, $maxlocation, $location, $itemtype, $ignoreissued, $ignore_holds_waiting, '', $branchcode, $branch, 0, undef , $staton);
235
}
237
}
236
238
237
# If "compare barcodes list to results" has been checked, we want to alert for missing items
239
# If "compare barcodes list to results" has been checked, we want to alert for missing items
238
- 

Return to bug 11405