Lines 522-527
sub update_pickup_location {
Link Here
|
522 |
my $overrides = $c->stash('koha.overrides'); |
522 |
my $overrides = $c->stash('koha.overrides'); |
523 |
my $can_override = $overrides->{any} && C4::Context->preference('AllowHoldPolicyOverride'); |
523 |
my $can_override = $overrides->{any} && C4::Context->preference('AllowHoldPolicyOverride'); |
524 |
|
524 |
|
|
|
525 |
my $error_code = |
526 |
$hold->is_waiting ? 'hold_waiting' |
527 |
: $hold->is_in_transit ? 'hold_in_transit' |
528 |
: $hold->is_in_processing ? 'hold_in_processing' |
529 |
: undef; |
530 |
|
531 |
return $c->render( |
532 |
status => 409, |
533 |
openapi => { error => 'Cannot change pickup location', error_code => $error_code } |
534 |
) if $error_code; |
535 |
|
525 |
$hold->set_pickup_location( |
536 |
$hold->set_pickup_location( |
526 |
{ |
537 |
{ |
527 |
library_id => $pickup_library_id, |
538 |
library_id => $pickup_library_id, |
528 |
- |
|
|