|
Lines 957-966
sub pickup_locations {
Link Here
|
| 957 |
my $branchitemrule = |
957 |
my $branchitemrule = |
| 958 |
C4::Circulation::GetBranchItemRule( $circ_control_branch, $self->itype ); |
958 |
C4::Circulation::GetBranchItemRule( $circ_control_branch, $self->itype ); |
| 959 |
|
959 |
|
| 960 |
return Koha::Libraries->new()->empty if $branchitemrule->{holdallowed} eq 'from_local_hold_group' && !$self->home_branch->validate_hold_sibling( {branchcode => $patron->branchcode} ); |
960 |
if ( |
| 961 |
return Koha::Libraries->new()->empty if $branchitemrule->{holdallowed} eq 'from_home_library' && $self->home_branch->branchcode ne $patron->branchcode; |
961 |
$branchitemrule->{holdallowed} eq 'from_local_hold_group' && |
|
|
962 |
!$self->home_branch->validate_hold_sibling( {branchcode => $patron->branchcode} ) || |
| 963 |
$branchitemrule->{holdallowed} eq 'from_home_library' && |
| 964 |
$self->home_branch->branchcode ne $patron->branchcode |
| 965 |
) { |
| 966 |
return Koha::Libraries->new()->empty; |
| 967 |
} |
| 962 |
|
968 |
|
| 963 |
my $pickup_libraries = Koha::Libraries->search(); |
969 |
my $pickup_libraries; |
| 964 |
if ($branchitemrule->{hold_fulfillment_policy} eq 'holdgroup') { |
970 |
if ($branchitemrule->{hold_fulfillment_policy} eq 'holdgroup') { |
| 965 |
$pickup_libraries = $self->home_branch->get_hold_libraries; |
971 |
$pickup_libraries = $self->home_branch->get_hold_libraries; |
| 966 |
} elsif ($branchitemrule->{hold_fulfillment_policy} eq 'patrongroup') { |
972 |
} elsif ($branchitemrule->{hold_fulfillment_policy} eq 'patrongroup') { |
|
Lines 970-976
sub pickup_locations {
Link Here
|
| 970 |
$pickup_libraries = Koha::Libraries->search({ branchcode => $self->homebranch }); |
976 |
$pickup_libraries = Koha::Libraries->search({ branchcode => $self->homebranch }); |
| 971 |
} elsif ($branchitemrule->{hold_fulfillment_policy} eq 'holdingbranch') { |
977 |
} elsif ($branchitemrule->{hold_fulfillment_policy} eq 'holdingbranch') { |
| 972 |
$pickup_libraries = Koha::Libraries->search({ branchcode => $self->holdingbranch }); |
978 |
$pickup_libraries = Koha::Libraries->search({ branchcode => $self->holdingbranch }); |
| 973 |
}; |
979 |
} else { |
|
|
980 |
$pickup_libraries = Koha::Libraries->search(); |
| 981 |
} |
| 974 |
|
982 |
|
| 975 |
return $pickup_libraries->search( |
983 |
return $pickup_libraries->search( |
| 976 |
{ |
984 |
{ |
|
Lines 982-988
sub pickup_locations {
Link Here
|
| 982 |
) unless C4::Context->preference('UseBranchTransferLimits'); |
990 |
) unless C4::Context->preference('UseBranchTransferLimits'); |
| 983 |
|
991 |
|
| 984 |
my $limittype = C4::Context->preference('BranchTransferLimitsType'); |
992 |
my $limittype = C4::Context->preference('BranchTransferLimitsType'); |
| 985 |
my ($ccode, $itype) = (undef, undef); |
993 |
my $ccode; |
|
|
994 |
my $itype; |
| 995 |
|
| 986 |
if( $limittype eq 'ccode' ){ |
996 |
if( $limittype eq 'ccode' ){ |
| 987 |
$ccode = $self->ccode; |
997 |
$ccode = $self->ccode; |
| 988 |
} else { |
998 |
} else { |
| 989 |
- |
|
|