|
Lines 52-57
my $branchcode = $input->param('branchcode') || '';
Link Here
|
| 52 |
my $branch = $input->param('branch'); |
52 |
my $branch = $input->param('branch'); |
| 53 |
my $op = $input->param('op'); |
53 |
my $op = $input->param('op'); |
| 54 |
my $compareinv2barcd = $input->param('compareinv2barcd'); |
54 |
my $compareinv2barcd = $input->param('compareinv2barcd'); |
|
|
55 |
my $ccode = $input->param('ccode'); |
| 55 |
|
56 |
|
| 56 |
my ( $template, $borrowernumber, $cookie ) = get_template_and_user( |
57 |
my ( $template, $borrowernumber, $cookie ) = get_template_and_user( |
| 57 |
{ template_name => "tools/inventory.tt", |
58 |
{ template_name => "tools/inventory.tt", |
|
Lines 79-84
my $authorisedvalue_categories = '';
Link Here
|
| 79 |
my $frameworks = getframeworks(); |
80 |
my $frameworks = getframeworks(); |
| 80 |
$frameworks->{''} = {frameworkcode => ''}; # Add the default framework |
81 |
$frameworks->{''} = {frameworkcode => ''}; # Add the default framework |
| 81 |
|
82 |
|
|
|
83 |
my @collections = (); |
| 84 |
my @collection_codes = (); |
| 85 |
|
| 82 |
for my $fwk (keys %$frameworks){ |
86 |
for my $fwk (keys %$frameworks){ |
| 83 |
my $fwkcode = $frameworks->{$fwk}->{'frameworkcode'}; |
87 |
my $fwkcode = $frameworks->{$fwk}->{'frameworkcode'}; |
| 84 |
my $authcode = GetAuthValCode('items.location', $fwkcode); |
88 |
my $authcode = GetAuthValCode('items.location', $fwkcode); |
|
Lines 90-96
for my $fwk (keys %$frameworks){
Link Here
|
| 90 |
} |
94 |
} |
| 91 |
push @authorised_value_list,@$data; |
95 |
push @authorised_value_list,@$data; |
| 92 |
} |
96 |
} |
|
|
97 |
|
| 98 |
my $collection_authorised_value = C4::Koha::GetAuthValCode("items.ccode", $fwkcode); |
| 99 |
if ($collection_authorised_value && (! grep { $collection_authorised_value eq $_ } @collection_codes) ) { |
| 100 |
#Add authorised value category to array |
| 101 |
push (@collection_codes,$collection_authorised_value); |
| 102 |
my $collection_values = C4::Koha::GetAuthorisedValues($collection_authorised_value); |
| 103 |
if (ref $collection_values eq 'ARRAY' && @$collection_values){ |
| 104 |
#Add authorised values to array |
| 105 |
push(@collections,@$collection_values); |
| 106 |
} |
| 107 |
} |
| 93 |
} |
108 |
} |
|
|
109 |
$template->param( ccode_list => \@collections ); |
| 94 |
|
110 |
|
| 95 |
my $statuses = []; |
111 |
my $statuses = []; |
| 96 |
for my $statfield (qw/items.notforloan items.itemlost items.withdrawn items.damaged/){ |
112 |
for my $statfield (qw/items.notforloan items.itemlost items.withdrawn items.damaged/){ |
|
Lines 138-144
$template->param(
Link Here
|
| 138 |
branch => $branch, |
154 |
branch => $branch, |
| 139 |
datelastseen => $datelastseen, |
155 |
datelastseen => $datelastseen, |
| 140 |
compareinv2barcd => $compareinv2barcd, |
156 |
compareinv2barcd => $compareinv2barcd, |
| 141 |
notforloanlist => $notforloanlist |
157 |
notforloanlist => $notforloanlist, |
|
|
158 |
ccode => $ccode, |
| 142 |
); |
159 |
); |
| 143 |
|
160 |
|
| 144 |
my @notforloans; |
161 |
my @notforloans; |
|
Lines 253-261
if ( $markseen or $op ) {
Link Here
|
| 253 |
size => undef, |
270 |
size => undef, |
| 254 |
statushash => $staton, |
271 |
statushash => $staton, |
| 255 |
interface => 'staff', |
272 |
interface => 'staff', |
|
|
273 |
ccode => $ccode, |
| 256 |
} ); |
274 |
} ); |
| 257 |
|
275 |
|
| 258 |
# For the items that may be marked as "wrong place", we only check the location (callnumbers, location and branch) |
276 |
# For the items that may be marked as "wrong place", we only check the location (callnumbers, location, ccode and branch) |
| 259 |
($wrongplacelist, $totalrecords) = GetItemsForInventory( { |
277 |
($wrongplacelist, $totalrecords) = GetItemsForInventory( { |
| 260 |
minlocation => $minlocation, |
278 |
minlocation => $minlocation, |
| 261 |
maxlocation => $maxlocation, |
279 |
maxlocation => $maxlocation, |
|
Lines 269-274
if ( $markseen or $op ) {
Link Here
|
| 269 |
size => undef, |
287 |
size => undef, |
| 270 |
statushash => undef, |
288 |
statushash => undef, |
| 271 |
interface => 'staff', |
289 |
interface => 'staff', |
|
|
290 |
ccode => $ccode, |
| 272 |
} ); |
291 |
} ); |
| 273 |
|
292 |
|
| 274 |
} |
293 |
} |
|
Lines 382-388
if (defined $input->param('CSVexport') && $input->param('CSVexport') eq 'on'){
Link Here
|
| 382 |
my @translated_keys; |
401 |
my @translated_keys; |
| 383 |
for my $key (qw / biblioitems.title biblio.author |
402 |
for my $key (qw / biblioitems.title biblio.author |
| 384 |
items.barcode items.itemnumber |
403 |
items.barcode items.itemnumber |
| 385 |
items.homebranch items.location |
404 |
items.homebranch items.location items.ccode |
| 386 |
items.itemcallnumber items.notforloan |
405 |
items.itemcallnumber items.notforloan |
| 387 |
items.itemlost items.damaged |
406 |
items.itemlost items.damaged |
| 388 |
items.withdrawn items.stocknumber |
407 |
items.withdrawn items.stocknumber |
|
Lines 394-400
if (defined $input->param('CSVexport') && $input->param('CSVexport') eq 'on'){
Link Here
|
| 394 |
$csv->combine(@translated_keys); |
413 |
$csv->combine(@translated_keys); |
| 395 |
print $csv->string, "\n"; |
414 |
print $csv->string, "\n"; |
| 396 |
|
415 |
|
| 397 |
my @keys = qw / title author barcode itemnumber homebranch location itemcallnumber notforloan lost damaged withdrawn stocknumber /; |
416 |
my @keys = qw / title author barcode itemnumber homebranch location ccode itemcallnumber notforloan lost damaged withdrawn stocknumber /; |
| 398 |
for my $item ( @results ) { |
417 |
for my $item ( @results ) { |
| 399 |
my @line; |
418 |
my @line; |
| 400 |
for my $key (@keys) { |
419 |
for my $key (@keys) { |
| 401 |
- |
|
|