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

(-)a/C4/Items.pm (-12 / +19 lines)
Lines 1037-1042 sub GetLostItems { Link Here
1037
  size         => $size,
1037
  size         => $size,
1038
  statushash   => $statushash,
1038
  statushash   => $statushash,
1039
  interface    => $interface,
1039
  interface    => $interface,
1040
  ignore_holds_waiting => $ignore_holds_waiting,
1040
} );
1041
} );
1041
1042
1042
Retrieve a list of title/authors/barcode/callnumber, for biblio inventory.
1043
Retrieve a list of title/authors/barcode/callnumber, for biblio inventory.
Lines 1056-1073 $iTotalRecords is the number of rows that would have been returned without the $ Link Here
1056
1057
1057
sub GetItemsForInventory {
1058
sub GetItemsForInventory {
1058
    my ( $parameters ) = @_;
1059
    my ( $parameters ) = @_;
1059
    my $minlocation  = $parameters->{'minlocation'}  // '';
1060
    my $minlocation          = $parameters->{minlocation}          // '';
1060
    my $maxlocation  = $parameters->{'maxlocation'}  // '';
1061
    my $maxlocation          = $parameters->{maxlocation}          // '';
1061
    my $location     = $parameters->{'location'}     // '';
1062
    my $location             = $parameters->{location}             // '';
1062
    my $itemtype     = $parameters->{'itemtype'}     // '';
1063
    my $itemtype             = $parameters->{itemtype}             // '';
1063
    my $ignoreissued = $parameters->{'ignoreissued'} // '';
1064
    my $ignoreissued         = $parameters->{ignoreissued}         // '';
1064
    my $datelastseen = $parameters->{'datelastseen'} // '';
1065
    my $datelastseen         = $parameters->{datelastseen}         // '';
1065
    my $branchcode   = $parameters->{'branchcode'}   // '';
1066
    my $branchcode           = $parameters->{branchcode}           // '';
1066
    my $branch       = $parameters->{'branch'}       // '';
1067
    my $branch               = $parameters->{branch}               // '';
1067
    my $offset       = $parameters->{'offset'}       // '';
1068
    my $offset               = $parameters->{offset}               // '';
1068
    my $size         = $parameters->{'size'}         // '';
1069
    my $size                 = $parameters->{size}                 // '';
1069
    my $statushash   = $parameters->{'statushash'}   // '';
1070
    my $statushash           = $parameters->{statushash}           // '';
1070
    my $interface    = $parameters->{'interface'}    // '';
1071
    my $interface            = $parameters->{interface}            // '';
1072
    my $ignore_holds_waiting = $parameters->{ignore_holds_waiting} // '';
1071
1073
1072
    my $dbh = C4::Context->dbh;
1074
    my $dbh = C4::Context->dbh;
1073
    my ( @bind_params, @where_strings );
1075
    my ( @bind_params, @where_strings );
Lines 1130-1135 sub GetItemsForInventory { Link Here
1130
        push @where_strings, 'issues.date_due IS NULL';
1132
        push @where_strings, 'issues.date_due IS NULL';
1131
    }
1133
    }
1132
1134
1135
    if ( $ignore_holds_waiting ) {
1136
        $query .= "LEFT JOIN reserves ON items.itemnumber = reserves.itemnumber ";
1137
        push( @where_strings, q{reserves.found != 'W' OR reserves.found IS NULL} );
1138
    }
1139
1133
    if ( @where_strings ) {
1140
    if ( @where_strings ) {
1134
        $query .= 'WHERE ';
1141
        $query .= 'WHERE ';
1135
        $query .= join ' AND ', @where_strings;
1142
        $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 (-30 / +36 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 136-141 $template->param( Link Here
136
    maxlocation              => $maxlocation,
137
    maxlocation              => $maxlocation,
137
    location                 => $location,
138
    location                 => $location,
138
    ignoreissued             => $ignoreissued,
139
    ignoreissued             => $ignoreissued,
140
    ignore_holds_waiting     => $ignore_holds_waiting,
139
    branchcode               => $branchcode,
141
    branchcode               => $branchcode,
140
    branch                   => $branch,
142
    branch                   => $branch,
141
    datelastseen             => $datelastseen,
143
    datelastseen             => $datelastseen,
Lines 244-280 if ( $markseen or $op ) { Link Here
244
246
245
    # We use datelastseen only when comparing the results to the barcode file.
247
    # We use datelastseen only when comparing the results to the barcode file.
246
    my $paramdatelastseen = ($compareinv2barcd) ? $datelastseen : '';
248
    my $paramdatelastseen = ($compareinv2barcd) ? $datelastseen : '';
247
    ($inventorylist, $totalrecords) = GetItemsForInventory( {
249
    ( $inventorylist, $totalrecords ) = GetItemsForInventory(
248
      minlocation  => $minlocation,
250
        {
249
      maxlocation  => $maxlocation,
251
            minlocation          => $minlocation,
250
      location     => $location,
252
            maxlocation          => $maxlocation,
251
      itemtype     => $itemtype,
253
            location             => $location,
252
      ignoreissued => $ignoreissued,
254
            itemtype             => $itemtype,
253
      datelastseen => $paramdatelastseen,
255
            ignoreissued         => $ignoreissued,
254
      branchcode   => $branchcode,
256
            datelastseen         => $paramdatelastseen,
255
      branch       => $branch,
257
            branchcode           => $branchcode,
256
      offset       => 0,
258
            branch               => $branch,
257
      size         => undef,
259
            offset               => 0,
258
      statushash   => $staton,
260
            size                 => undef,
259
      interface    => 'staff',
261
            statushash           => $staton,
260
    } );
262
            interface            => 'staff',
263
            ignore_holds_waiting => $ignore_holds_waiting,
264
        }
265
    );
261
266
262
    # For the items that may be marked as "wrong place", we only check the location (callnumbers, location and branch)
267
    # For the items that may be marked as "wrong place", we only check the location (callnumbers, location and branch)
263
    ($wrongplacelist, $totalrecords) = GetItemsForInventory( {
268
    ( $wrongplacelist, $totalrecords ) = GetItemsForInventory(
264
      minlocation  => $minlocation,
269
        {
265
      maxlocation  => $maxlocation,
270
            minlocation          => $minlocation,
266
      location     => $location,
271
            maxlocation          => $maxlocation,
267
      itemtype     => undef,
272
            location             => $location,
268
      ignoreissued => undef,
273
            itemtype             => undef,
269
      datelastseen => undef,
274
            ignoreissued         => undef,
270
      branchcode   => $branchcode,
275
            datelastseen         => undef,
271
      branch       => $branch,
276
            branchcode           => $branchcode,
272
      offset       => 0,
277
            branch               => $branch,
273
      size         => undef,
278
            offset               => 0,
274
      statushash   => undef,
279
            size                 => undef,
275
      interface    => 'staff',
280
            statushash           => undef,
276
    } );
281
            interface            => 'staff',
277
282
            ignore_holds_waiting => $ignore_holds_waiting,
283
        }
284
    );
278
}
285
}
279
286
280
# If "compare barcodes list to results" has been checked, we want to alert for missing items
287
# If "compare barcodes list to results" has been checked, we want to alert for missing items
281
- 

Return to bug 11405