Lines 456-461
sub request_transfer {
Link Here
|
456 |
Koha::Exceptions::Item::Transfer::InQueue->throw( transfer => $request ) |
456 |
Koha::Exceptions::Item::Transfer::InQueue->throw( transfer => $request ) |
457 |
if ( $request && !$params->{enqueue} && !$params->{replace} ); |
457 |
if ( $request && !$params->{enqueue} && !$params->{replace} ); |
458 |
|
458 |
|
|
|
459 |
$request->cancel( { reason => $params->{reason}, force => 1 } ) |
460 |
if ( defined($request) && $params->{replace} ); |
461 |
|
459 |
my $transfer = Koha::Item::Transfer->new( |
462 |
my $transfer = Koha::Item::Transfer->new( |
460 |
{ |
463 |
{ |
461 |
itemnumber => $self->itemnumber, |
464 |
itemnumber => $self->itemnumber, |
Lines 467-475
sub request_transfer {
Link Here
|
467 |
} |
470 |
} |
468 |
)->store(); |
471 |
)->store(); |
469 |
|
472 |
|
470 |
$request->cancel( { reason => $params->{reason}, force => 1, replace => 1 } ) |
|
|
471 |
if ( defined($request) && $params->{replace} ); |
472 |
|
473 |
return $transfer; |
473 |
return $transfer; |
474 |
} |
474 |
} |
475 |
|
475 |
|
476 |
- |
|
|