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