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

(-)a/C4/Items.pm (+6 lines)
Lines 823-828 sub GetItemsForInventory { Link Here
823
    my $offset       = $parameters->{'offset'}       // '';
823
    my $offset       = $parameters->{'offset'}       // '';
824
    my $size         = $parameters->{'size'}         // '';
824
    my $size         = $parameters->{'size'}         // '';
825
    my $statushash   = $parameters->{'statushash'}   // '';
825
    my $statushash   = $parameters->{'statushash'}   // '';
826
    my $ignore_waiting_holds = $parameters->{'ignore_waiting_holds'} // '';
826
827
827
    my $dbh = C4::Context->dbh;
828
    my $dbh = C4::Context->dbh;
828
    my ( @bind_params, @where_strings );
829
    my ( @bind_params, @where_strings );
Lines 885-890 sub GetItemsForInventory { Link Here
885
        push @where_strings, 'issues.date_due IS NULL';
886
        push @where_strings, 'issues.date_due IS NULL';
886
    }
887
    }
887
888
889
    if ( $ignore_waiting_holds ) {
890
        $query .= "LEFT JOIN reserves ON items.itemnumber = reserves.itemnumber ";
891
        push( @where_strings, q{reserves.found != 'W' OR reserves.found IS NULL} );
892
    }
893
888
    if ( @where_strings ) {
894
    if ( @where_strings ) {
889
        $query .= 'WHERE ';
895
        $query .= 'WHERE ';
890
        $query .= join ' AND ', @where_strings;
896
        $query .= join ' AND ', @where_strings;
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt (+4 lines)
Lines 129-134 Link Here
129
                <input type="checkbox" id="ignoreissued" name="ignoreissued" />
129
                <input type="checkbox" id="ignoreissued" name="ignoreissued" />
130
            [% END %]
130
            [% END %]
131
        </li>
131
        </li>
132
        <li>
133
            <label for="ignore_waiting_holds">Skip copies marked as waiting holds: </label>
134
            <input type="checkbox" id="ignore_waiting_holds" name="ignore_waiting_holds" />
135
        </li>
132
        </ol>
136
        </ol>
133
    </fieldset>
137
    </fieldset>
134
138
(-)a/tools/inventory.pl (-1 / +4 lines)
Lines 46-51 my $maxlocation=$input->param('maxlocation'); Link Here
46
$maxlocation=$minlocation.'Z' unless ( $maxlocation || ! $minlocation );
46
$maxlocation=$minlocation.'Z' unless ( $maxlocation || ! $minlocation );
47
my $location=$input->param('location') || '';
47
my $location=$input->param('location') || '';
48
my $ignoreissued=$input->param('ignoreissued');
48
my $ignoreissued=$input->param('ignoreissued');
49
my $ignore_waiting_holds = $input->param('ignore_waiting_holds');
49
my $datelastseen = $input->param('datelastseen'); # last inventory date
50
my $datelastseen = $input->param('datelastseen'); # last inventory date
50
my $branchcode = $input->param('branchcode') || '';
51
my $branchcode = $input->param('branchcode') || '';
51
my $branch     = $input->param('branch');
52
my $branch     = $input->param('branch');
Lines 127-132 $template->param( Link Here
127
    datelastseen             => $datelastseen,
128
    datelastseen             => $datelastseen,
128
    compareinv2barcd         => $compareinv2barcd,
129
    compareinv2barcd         => $compareinv2barcd,
129
    uploadedbarcodesflag     => $uploadbarcodes ? 1 : 0,
130
    uploadedbarcodesflag     => $uploadbarcodes ? 1 : 0,
131
    ignore_waiting_holds     => $ignore_waiting_holds,
130
);
132
);
131
133
132
# Walk through uploaded barcodes, report errors, mark as seen, check in
134
# Walk through uploaded barcodes, report errors, mark as seen, check in
Lines 230-235 if ( $op && ( !$uploadbarcodes || $compareinv2barcd )) { Link Here
230
      branch       => $branch,
232
      branch       => $branch,
231
      offset       => 0,
233
      offset       => 0,
232
      statushash   => $staton,
234
      statushash   => $staton,
235
      ignore_waiting_holds => $ignore_waiting_holds,
233
    });
236
    });
234
}
237
}
235
# Build rightplacelist used to check if a scanned item is in the right place.
238
# Build rightplacelist used to check if a scanned item is in the right place.
Lines 244-249 if( @scanned_items ) { Link Here
244
      branch       => $branch,
247
      branch       => $branch,
245
      offset       => 0,
248
      offset       => 0,
246
      statushash   => undef,
249
      statushash   => undef,
250
      ignore_waiting_holds => $ignore_waiting_holds,
247
    });
251
    });
248
    # Convert the structure to a hash on barcode
252
    # Convert the structure to a hash on barcode
249
    $rightplacelist = {
253
    $rightplacelist = {
250
- 

Return to bug 21413