Lines 113-129
sub pickup_locations {
Link Here
|
113 |
$patron = Koha::Patrons->find($patron); |
113 |
$patron = Koha::Patrons->find($patron); |
114 |
} |
114 |
} |
115 |
|
115 |
|
116 |
if($item) { |
116 |
if ($item) { |
117 |
$item = Koha::Items->find($item) unless ref($item) eq 'Koha::Item'; |
117 |
$item = Koha::Items->find($item) |
118 |
@libraries = map { $_->unblessed } $item->pickup_locations( {patron => $patron} ) if defined $item; |
118 |
unless ref($item) eq 'Koha::Item'; |
119 |
} elsif($biblio) { |
119 |
@libraries = @{ $item->pickup_locations( { patron => $patron } ) } |
120 |
$biblio = Koha::Biblios->find($biblio) unless ref($biblio) eq 'Koha::Biblio'; |
120 |
if defined $item; |
121 |
@libraries = map { $_->unblessed } $biblio->pickup_locations( {patron => $patron} ) if defined $biblio; |
121 |
} |
|
|
122 |
elsif ($biblio) { |
123 |
$biblio = Koha::Biblios->find($biblio) |
124 |
unless ref($biblio) eq 'Koha::Biblio'; |
125 |
@libraries = @{ $biblio->pickup_locations( { patron => $patron } ) } |
126 |
if defined $biblio; |
122 |
} |
127 |
} |
123 |
|
|
|
124 |
} |
128 |
} |
125 |
|
129 |
|
126 |
@libraries = Koha::Libraries->pickup_locations() unless @libraries; |
130 |
@libraries = Koha::Libraries->search( { pickup_location => 1 }, |
|
|
131 |
{ order_by => ['branchname'] } )->as_list |
132 |
unless @libraries; |
133 |
|
134 |
@libraries = map { $_->unblessed } @libraries; |
127 |
|
135 |
|
128 |
for my $l (@libraries) { |
136 |
for my $l (@libraries) { |
129 |
if ( defined $selected and $l->{branchcode} eq $selected |
137 |
if ( defined $selected and $l->{branchcode} eq $selected |
130 |
- |
|
|