|
Lines 484-489
sub holds {
Link Here
|
| 484 |
return Koha::Holds->_new_from_dbic( $holds_rs ); |
484 |
return Koha::Holds->_new_from_dbic( $holds_rs ); |
| 485 |
} |
485 |
} |
| 486 |
|
486 |
|
|
|
487 |
=head3 holds_control_library |
| 488 |
|
| 489 |
my $control_library = $item->holds_control_library( $patron ); |
| 490 |
|
| 491 |
Given a I<Koha::Patron> object, this method returns a library id, for |
| 492 |
the library that is to be used for calculating circulation rules. It relies |
| 493 |
on the B<ReservesControlBranch> system preference. |
| 494 |
|
| 495 |
=cut |
| 496 |
|
| 497 |
sub holds_control_library { |
| 498 |
my ( $self, $patron ) = @_; |
| 499 |
|
| 500 |
return ( |
| 501 |
C4::Context->preference('ReservesControlBranch') eq 'ItemHomeLibrary' ) |
| 502 |
? $self->homebranch |
| 503 |
: $patron->branchcode; |
| 504 |
} |
| 505 |
|
| 487 |
=head3 request_transfer |
506 |
=head3 request_transfer |
| 488 |
|
507 |
|
| 489 |
my $transfer = $item->request_transfer( |
508 |
my $transfer = $item->request_transfer( |
|
Lines 751-758
sub pickup_locations {
Link Here
|
| 751 |
|
770 |
|
| 752 |
my $patron = $params->{patron}; |
771 |
my $patron = $params->{patron}; |
| 753 |
|
772 |
|
| 754 |
my $circ_control_branch = |
773 |
my $circ_control_branch = $self->holds_control_library( $patron ); |
| 755 |
C4::Reserves::GetReservesControlBranch( $self->unblessed(), $patron->unblessed ); |
|
|
| 756 |
my $branchitemrule = |
774 |
my $branchitemrule = |
| 757 |
C4::Circulation::GetBranchItemRule( $circ_control_branch, $self->itype ); |
775 |
C4::Circulation::GetBranchItemRule( $circ_control_branch, $self->itype ); |
| 758 |
|
776 |
|
| 759 |
- |
|
|