|
Lines 205-214
sub can_be_transferred {
Link Here
|
| 205 |
|
205 |
|
| 206 |
=head3 pickup_locations |
206 |
=head3 pickup_locations |
| 207 |
|
207 |
|
| 208 |
@pickup_locations = $biblio->pickup_locations( {patron => $patron } ) |
208 |
my $pickup_locations = $biblio->pickup_locations( {patron => $patron } ); |
| 209 |
|
209 |
|
| 210 |
Returns possible pickup locations for this biblio items, according to patron's home library (if patron is defined and holds are allowed only from hold groups) |
210 |
Returns an I<arrayref> of possible pickup locations for this biblio's items, |
| 211 |
and if item can be transferred to each pickup location. |
211 |
according to patron's home library (if patron is defined and holds are allowed |
|
|
212 |
only from hold groups) and if item can be transferred to each pickup location. |
| 212 |
|
213 |
|
| 213 |
=cut |
214 |
=cut |
| 214 |
|
215 |
|
|
Lines 219-232
sub pickup_locations {
Link Here
|
| 219 |
|
220 |
|
| 220 |
my @pickup_locations; |
221 |
my @pickup_locations; |
| 221 |
foreach my $item_of_bib ($self->items->as_list) { |
222 |
foreach my $item_of_bib ($self->items->as_list) { |
| 222 |
push @pickup_locations, $item_of_bib->pickup_locations( {patron => $patron} ); |
223 |
push @pickup_locations, @{ $item_of_bib->pickup_locations( {patron => $patron} ) }; |
| 223 |
} |
224 |
} |
| 224 |
|
225 |
|
| 225 |
my %seen; |
226 |
my %seen; |
| 226 |
@pickup_locations = |
227 |
@pickup_locations = |
| 227 |
grep { !$seen{ $_->branchcode }++ } @pickup_locations; |
228 |
grep { !$seen{ $_->branchcode }++ } @pickup_locations; |
| 228 |
|
229 |
|
| 229 |
return wantarray ? @pickup_locations : \@pickup_locations; |
230 |
return \@pickup_locations; |
| 230 |
} |
231 |
} |
| 231 |
|
232 |
|
| 232 |
=head3 hidden_in_opac |
233 |
=head3 hidden_in_opac |