Lines 402-413
sub holds {
Link Here
|
402 |
=head3 request_transfer |
402 |
=head3 request_transfer |
403 |
|
403 |
|
404 |
my $transfer = $item->request_transfer( |
404 |
my $transfer = $item->request_transfer( |
405 |
{ to => $to_library, reason => $reason, force => 0 } ); |
405 |
{ to => $to_library, reason => $reason, ignore_limits => 0 } ); |
406 |
|
406 |
|
407 |
Add a transfer request for this item to the given branch for the given reason. |
407 |
Add a transfer request for this item to the given branch for the given reason. |
408 |
|
408 |
|
409 |
An exception will be thrown if the BranchTransferLimits would prevent the requested |
409 |
An exception will be thrown if the BranchTransferLimits would prevent the requested |
410 |
transfer, unless 'force' is passed to override the limits. |
410 |
transfer, unless 'ignore_limits' is passed to override the limits. |
411 |
|
411 |
|
412 |
Note: At this time, only one active transfer (i.e pending arrival date) may exist |
412 |
Note: At this time, only one active transfer (i.e pending arrival date) may exist |
413 |
at a time for any given item. An exception will be thrown should you attempt to |
413 |
at a time for any given item. An exception will be thrown should you attempt to |
Lines 431-440
sub request_transfer {
Link Here
|
431 |
my $request; |
431 |
my $request; |
432 |
Koha::Exceptions::Item::Transfer::Found->throw( transfer => $request ) |
432 |
Koha::Exceptions::Item::Transfer::Found->throw( transfer => $request ) |
433 |
if ( $request = $self->get_transfer ); |
433 |
if ( $request = $self->get_transfer ); |
434 |
# FIXME: Add override functionality to allow for queing transfers |
|
|
435 |
|
434 |
|
436 |
Koha::Exceptions::Item::Transfer::Limit->throw() |
435 |
Koha::Exceptions::Item::Transfer::Limit->throw() |
437 |
unless ( $params->{force} || $self->can_be_transferred( { to => $params->{to} } ) ); |
436 |
unless ( $params->{ignore_limits} |
|
|
437 |
|| $self->can_be_transferred( { to => $params->{to} } ) ); |
438 |
|
438 |
|
439 |
my $transfer = Koha::Item::Transfer->new( |
439 |
my $transfer = Koha::Item::Transfer->new( |
440 |
{ |
440 |
{ |
441 |
- |
|
|