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

(-)a/C4/Items.pm (+6 lines)
Lines 814-819 sub GetItemsForInventory { Link Here
814
    my $offset       = $parameters->{'offset'}       // '';
814
    my $offset       = $parameters->{'offset'}       // '';
815
    my $size         = $parameters->{'size'}         // '';
815
    my $size         = $parameters->{'size'}         // '';
816
    my $statushash   = $parameters->{'statushash'}   // '';
816
    my $statushash   = $parameters->{'statushash'}   // '';
817
    my $ignore_waiting_holds = $parameters->{'ignore_waiting_holds'} // '';
817
818
818
    my $dbh = C4::Context->dbh;
819
    my $dbh = C4::Context->dbh;
819
    my ( @bind_params, @where_strings );
820
    my ( @bind_params, @where_strings );
Lines 876-881 sub GetItemsForInventory { Link Here
876
        push @where_strings, 'issues.date_due IS NULL';
877
        push @where_strings, 'issues.date_due IS NULL';
877
    }
878
    }
878
879
880
    if ( $ignore_waiting_holds ) {
881
        $query .= "LEFT JOIN reserves ON items.itemnumber = reserves.itemnumber ";
882
        push( @where_strings, q{reserves.found != 'W' OR reserves.found IS NULL} );
883
    }
884
879
    if ( @where_strings ) {
885
    if ( @where_strings ) {
880
        $query .= 'WHERE ';
886
        $query .= 'WHERE ';
881
        $query .= join ' AND ', @where_strings;
887
        $query .= join ' AND ', @where_strings;
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt (+4 lines)
Lines 128-133 Link Here
128
                <input type="checkbox" id="ignoreissued" name="ignoreissued" />
128
                <input type="checkbox" id="ignoreissued" name="ignoreissued" />
129
            [% END %]
129
            [% END %]
130
        </li>
130
        </li>
131
        <li>
132
            <label for="ignore_waiting_holds">Skip copies marked as waiting holds: </label>
133
            <input type="checkbox" id="ignore_waiting_holds" name="ignore_waiting_holds" />
134
        </li>
131
        </ol>
135
        </ol>
132
    </fieldset>
136
    </fieldset>
133
137
(-)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 126-131 $template->param( Link Here
126
    datelastseen             => $datelastseen,
127
    datelastseen             => $datelastseen,
127
    compareinv2barcd         => $compareinv2barcd,
128
    compareinv2barcd         => $compareinv2barcd,
128
    uploadedbarcodesflag     => $uploadbarcodes ? 1 : 0,
129
    uploadedbarcodesflag     => $uploadbarcodes ? 1 : 0,
130
    ignore_waiting_holds     => $ignore_waiting_holds,
129
);
131
);
130
132
131
# Walk through uploaded barcodes, report errors, mark as seen, check in
133
# Walk through uploaded barcodes, report errors, mark as seen, check in
Lines 229-234 if ( $op && ( !$uploadbarcodes || $compareinv2barcd )) { Link Here
229
      branch       => $branch,
231
      branch       => $branch,
230
      offset       => 0,
232
      offset       => 0,
231
      statushash   => $staton,
233
      statushash   => $staton,
234
      ignore_waiting_holds => $ignore_waiting_holds,
232
    });
235
    });
233
}
236
}
234
# Build rightplacelist used to check if a scanned item is in the right place.
237
# Build rightplacelist used to check if a scanned item is in the right place.
Lines 243-248 if( @scanned_items ) { Link Here
243
      branch       => $branch,
246
      branch       => $branch,
244
      offset       => 0,
247
      offset       => 0,
245
      statushash   => undef,
248
      statushash   => undef,
249
      ignore_waiting_holds => $ignore_waiting_holds,
246
    });
250
    });
247
    # Convert the structure to a hash on barcode
251
    # Convert the structure to a hash on barcode
248
    $rightplacelist = {
252
    $rightplacelist = {
249
- 

Return to bug 21413