Lines 36-41
use Koha::Biblio::ItemGroups;
Link Here
|
36 |
use Koha::Checkouts; |
36 |
use Koha::Checkouts; |
37 |
use Koha::CirculationRules; |
37 |
use Koha::CirculationRules; |
38 |
use Koha::CoverImages; |
38 |
use Koha::CoverImages; |
|
|
39 |
use Koha::Exceptions; |
39 |
use Koha::Exceptions::Checkin; |
40 |
use Koha::Exceptions::Checkin; |
40 |
use Koha::Exceptions::Item::Bundle; |
41 |
use Koha::Exceptions::Item::Bundle; |
41 |
use Koha::Exceptions::Item::Transfer; |
42 |
use Koha::Exceptions::Item::Transfer; |
Lines 734-753
sub can_be_transferred {
Link Here
|
734 |
|
735 |
|
735 |
=head3 pickup_locations |
736 |
=head3 pickup_locations |
736 |
|
737 |
|
737 |
$pickup_locations = $item->pickup_locations( {patron => $patron } ) |
738 |
my $pickup_locations = $item->pickup_locations({ patron => $patron }) |
738 |
|
739 |
|
739 |
Returns possible pickup locations for this item, according to patron's home library |
740 |
Returns possible pickup locations for this item, according to patron's home library |
740 |
and if item can be transferred to each pickup location. |
741 |
and if item can be transferred to each pickup location. |
741 |
|
742 |
|
742 |
Patron parameter is required. |
743 |
Throws a I<Koha::Exceptions::MissingParameter> exception if the B<mandatory> parameter I<patron> |
|
|
744 |
is not passed. |
743 |
|
745 |
|
744 |
=cut |
746 |
=cut |
745 |
|
747 |
|
746 |
sub pickup_locations { |
748 |
sub pickup_locations { |
747 |
my ($self, $params) = @_; |
749 |
my ($self, $params) = @_; |
748 |
|
750 |
|
|
|
751 |
Koha::Exceptions::MissingParameter->throw( parameter => 'patron' ) |
752 |
unless exists $params->{patron}; |
753 |
|
749 |
my $patron = $params->{patron}; |
754 |
my $patron = $params->{patron}; |
750 |
# FIXME We should throw an exception if not passed |
|
|
751 |
|
755 |
|
752 |
my $circ_control_branch = |
756 |
my $circ_control_branch = |
753 |
C4::Reserves::GetReservesControlBranch( $self->unblessed(), $patron->unblessed ); |
757 |
C4::Reserves::GetReservesControlBranch( $self->unblessed(), $patron->unblessed ); |