|
Lines 90-95
my ($template, $borrowernumber, $cookie) = get_template_and_user({
Link Here
|
| 90 |
my $notforloan_avcode = GetAuthValCode('items.notforloan'); |
90 |
my $notforloan_avcode = GetAuthValCode('items.notforloan'); |
| 91 |
my $notforloan_values = GetAuthorisedValues($notforloan_avcode); |
91 |
my $notforloan_values = GetAuthorisedValues($notforloan_avcode); |
| 92 |
|
92 |
|
|
|
93 |
my $location_avcode = GetAuthValCode('items.location'); |
| 94 |
my $location_values = GetAuthorisedValues($location_avcode); |
| 95 |
|
| 93 |
if (scalar keys %params > 0) { |
96 |
if (scalar keys %params > 0) { |
| 94 |
# Parameters given, it's a search |
97 |
# Parameters given, it's a search |
| 95 |
|
98 |
|
|
Lines 193-202
if (scalar keys %params > 0) {
Link Here
|
| 193 |
$notforloan_map->{$nfl_value->{authorised_value}} = $nfl_value->{lib}; |
196 |
$notforloan_map->{$nfl_value->{authorised_value}} = $nfl_value->{lib}; |
| 194 |
} |
197 |
} |
| 195 |
|
198 |
|
|
|
199 |
# Get location labels |
| 200 |
my $location_map = {}; |
| 201 |
foreach my $loc_value (@$location_values) { |
| 202 |
$location_map->{$loc_value->{authorised_value}} = $loc_value->{lib}; |
| 203 |
} |
| 204 |
|
| 196 |
foreach my $item (@$results) { |
205 |
foreach my $item (@$results) { |
| 197 |
$item->{biblio} = GetBiblio($item->{biblionumber}); |
206 |
$item->{biblio} = GetBiblio($item->{biblionumber}); |
| 198 |
($item->{biblioitem}) = GetBiblioItemByBiblioNumber($item->{biblionumber}); |
207 |
($item->{biblioitem}) = GetBiblioItemByBiblioNumber($item->{biblionumber}); |
| 199 |
$item->{status} = $notforloan_map->{$item->{notforloan}}; |
208 |
$item->{status} = $notforloan_map->{$item->{notforloan}}; |
|
|
209 |
if (defined $item->{location}) { |
| 210 |
$item->{location} = $location_map->{$item->{location}}; |
| 211 |
} |
| 200 |
} |
212 |
} |
| 201 |
} |
213 |
} |
| 202 |
|
214 |
|
|
Lines 236-247
if ($format eq 'html') {
Link Here
|
| 236 |
label => $branches->{$branchcode}->{branchname}, |
248 |
label => $branches->{$branchcode}->{branchname}, |
| 237 |
}; |
249 |
}; |
| 238 |
} |
250 |
} |
| 239 |
my $locations = GetAuthorisedValues('LOC'); |
|
|
| 240 |
my @locations; |
251 |
my @locations; |
| 241 |
foreach my $location (@$locations) { |
252 |
foreach my $location (@$location_values) { |
| 242 |
push @locations, { |
253 |
push @locations, { |
| 243 |
value => $location->{authorised_value}, |
254 |
value => $location->{authorised_value}, |
| 244 |
label => $location->{lib}, |
255 |
label => $location->{lib} // $location->{authorised_value}, |
| 245 |
}; |
256 |
}; |
| 246 |
} |
257 |
} |
| 247 |
my @itemtypes = C4::ItemType->all(); |
258 |
my @itemtypes = C4::ItemType->all(); |
| 248 |
- |
|
|