Lines 115-123
sub pickup_locations {
Link Here
|
115 |
|
115 |
|
116 |
my $ps_set = $item->pickup_locations( { patron => $patron } ); |
116 |
my $ps_set = $item->pickup_locations( { patron => $patron } ); |
117 |
|
117 |
|
118 |
my $pickup_locations = $c->objects->search( $ps_set ); |
|
|
119 |
my @response = (); |
118 |
my @response = (); |
120 |
|
|
|
121 |
if ( C4::Context->preference('AllowHoldPolicyOverride') ) { |
119 |
if ( C4::Context->preference('AllowHoldPolicyOverride') ) { |
122 |
|
120 |
|
123 |
my $libraries_rs = Koha::Libraries->search( { pickup_location => 1 } ); |
121 |
my $libraries_rs = Koha::Libraries->search( { pickup_location => 1 } ); |
Lines 127-133
sub pickup_locations {
Link Here
|
127 |
my $library = $_; |
125 |
my $library = $_; |
128 |
$library->{needs_override} = ( |
126 |
$library->{needs_override} = ( |
129 |
any { $_->{library_id} eq $library->{library_id} } |
127 |
any { $_->{library_id} eq $library->{library_id} } |
130 |
@{$pickup_locations} |
128 |
@{$ps_set->as_list} |
131 |
) |
129 |
) |
132 |
? Mojo::JSON->false |
130 |
? Mojo::JSON->false |
133 |
: Mojo::JSON->true; |
131 |
: Mojo::JSON->true; |
Lines 140-145
sub pickup_locations {
Link Here
|
140 |
); |
138 |
); |
141 |
} |
139 |
} |
142 |
|
140 |
|
|
|
141 |
my $pickup_locations = $c->objects->search( $ps_set ); |
142 |
|
143 |
@response = map { $_->{needs_override} = Mojo::JSON->false; $_; } @{$pickup_locations}; |
143 |
@response = map { $_->{needs_override} = Mojo::JSON->false; $_; } @{$pickup_locations}; |
144 |
|
144 |
|
145 |
return $c->render( |
145 |
return $c->render( |
146 |
- |
|
|