Lines 58-63
my $op = $input->param('op');
Link Here
|
58 |
my $compareinv2barcd = $input->param('compareinv2barcd'); |
58 |
my $compareinv2barcd = $input->param('compareinv2barcd'); |
59 |
my $dont_checkin = $input->param('dont_checkin'); |
59 |
my $dont_checkin = $input->param('dont_checkin'); |
60 |
my $out_of_order = $input->param('out_of_order'); |
60 |
my $out_of_order = $input->param('out_of_order'); |
|
|
61 |
my $ccode = $input->param('ccode'); |
61 |
|
62 |
|
62 |
my ( $template, $borrowernumber, $cookie ) = get_template_and_user( |
63 |
my ( $template, $borrowernumber, $cookie ) = get_template_and_user( |
63 |
{ template_name => "tools/inventory.tt", |
64 |
{ template_name => "tools/inventory.tt", |
Lines 73-78
my $authorisedvalue_categories = '';
Link Here
|
73 |
my $frameworks = Koha::BiblioFrameworks->search({}, { order_by => ['frameworktext'] })->unblessed; |
74 |
my $frameworks = Koha::BiblioFrameworks->search({}, { order_by => ['frameworktext'] })->unblessed; |
74 |
unshift @$frameworks, { frameworkcode => '' }; |
75 |
unshift @$frameworks, { frameworkcode => '' }; |
75 |
|
76 |
|
|
|
77 |
my @collections = (); |
78 |
my @collection_codes = (); |
79 |
|
76 |
for my $fwk ( @$frameworks ){ |
80 |
for my $fwk ( @$frameworks ){ |
77 |
my $fwkcode = $fwk->{frameworkcode}; |
81 |
my $fwkcode = $fwk->{frameworkcode}; |
78 |
my $mss = Koha::MarcSubfieldStructures->search({ frameworkcode => $fwkcode, kohafield => 'items.location', authorised_value => [ -and => {'!=' => undef }, {'!=' => ''}] }); |
82 |
my $mss = Koha::MarcSubfieldStructures->search({ frameworkcode => $fwkcode, kohafield => 'items.location', authorised_value => [ -and => {'!=' => undef }, {'!=' => ''}] }); |
Lines 149-154
$template->param(
Link Here
|
149 |
class_sources => \@class_sources, |
153 |
class_sources => \@class_sources, |
150 |
pref_class => $pref_class, |
154 |
pref_class => $pref_class, |
151 |
itemtypes => \@itemtypes, |
155 |
itemtypes => \@itemtypes, |
|
|
156 |
ccode => $ccode, |
152 |
); |
157 |
); |
153 |
|
158 |
|
154 |
# Walk through uploaded barcodes, report errors, mark as seen, check in |
159 |
# Walk through uploaded barcodes, report errors, mark as seen, check in |
Lines 260-271
if ( $op && ( !$uploadbarcodes || $compareinv2barcd )) {
Link Here
|
260 |
branch => $branch, |
265 |
branch => $branch, |
261 |
offset => 0, |
266 |
offset => 0, |
262 |
statushash => $staton, |
267 |
statushash => $staton, |
|
|
268 |
ccode => $ccode, |
263 |
ignore_waiting_holds => $ignore_waiting_holds, |
269 |
ignore_waiting_holds => $ignore_waiting_holds, |
264 |
itemtypes => \@selected_itemtypes, |
270 |
itemtypes => \@selected_itemtypes, |
265 |
}); |
271 |
}); |
266 |
} |
272 |
} |
267 |
# Build rightplacelist used to check if a scanned item is in the right place. |
273 |
# Build rightplacelist used to check if a scanned item is in the right place. |
268 |
if( @scanned_items ) { |
274 |
if( @scanned_items ) { |
|
|
275 |
# For the items that may be marked as "wrong place", we only check the location (callnumbers, location, ccode and branch) |
269 |
( $rightplacelist ) = GetItemsForInventory({ |
276 |
( $rightplacelist ) = GetItemsForInventory({ |
270 |
minlocation => $minlocation, |
277 |
minlocation => $minlocation, |
271 |
maxlocation => $maxlocation, |
278 |
maxlocation => $maxlocation, |
Lines 279-289
if( @scanned_items ) {
Link Here
|
279 |
statushash => undef, |
286 |
statushash => undef, |
280 |
ignore_waiting_holds => $ignore_waiting_holds, |
287 |
ignore_waiting_holds => $ignore_waiting_holds, |
281 |
itemtypes => \@selected_itemtypes, |
288 |
itemtypes => \@selected_itemtypes, |
|
|
289 |
ccode => $ccode, |
282 |
}); |
290 |
}); |
283 |
# Convert the structure to a hash on barcode |
291 |
# Convert the structure to a hash on barcode |
284 |
$rightplacelist = { |
292 |
$rightplacelist = { |
285 |
map { $_->{barcode} ? ( $_->{barcode}, $_ ) : (); } @$rightplacelist |
293 |
map { $_->{barcode} ? ( $_->{barcode}, $_ ) : (); } @$rightplacelist |
286 |
}; |
294 |
}; |
|
|
295 |
|
287 |
} |
296 |
} |
288 |
|
297 |
|
289 |
# Report scanned items that are on the wrong place, or have a wrong notforloan |
298 |
# Report scanned items that are on the wrong place, or have a wrong notforloan |
Lines 394-400
if (defined $input->param('CSVexport') && $input->param('CSVexport') eq 'on'){
Link Here
|
394 |
my @translated_keys; |
403 |
my @translated_keys; |
395 |
for my $key (qw / biblioitems.title biblio.author |
404 |
for my $key (qw / biblioitems.title biblio.author |
396 |
items.barcode items.itemnumber |
405 |
items.barcode items.itemnumber |
397 |
items.homebranch items.location |
406 |
items.homebranch items.location items.ccode |
398 |
items.itemcallnumber items.notforloan |
407 |
items.itemcallnumber items.notforloan |
399 |
items.itemlost items.damaged |
408 |
items.itemlost items.damaged |
400 |
items.withdrawn items.stocknumber |
409 |
items.withdrawn items.stocknumber |
Lines 406-412
if (defined $input->param('CSVexport') && $input->param('CSVexport') eq 'on'){
Link Here
|
406 |
$csv->combine(@translated_keys); |
415 |
$csv->combine(@translated_keys); |
407 |
print $csv->string, "\n"; |
416 |
print $csv->string, "\n"; |
408 |
|
417 |
|
409 |
my @keys = qw/ title author barcode itemnumber homebranch location itemcallnumber notforloan itemlost damaged withdrawn stocknumber /; |
418 |
my @keys = qw/ title author barcode itemnumber homebranch location ccode itemcallnumber notforloan itemlost damaged withdrawn stocknumber /; |
410 |
for my $item ( @$loop ) { |
419 |
for my $item ( @$loop ) { |
411 |
my @line; |
420 |
my @line; |
412 |
for my $key (@keys) { |
421 |
for my $key (@keys) { |
413 |
- |
|
|