Lines 997-1006
sub pickup_locations {
Link Here
|
997 |
my $branchitemrule = |
997 |
my $branchitemrule = |
998 |
C4::Circulation::GetBranchItemRule( $circ_control_branch, $self->itype ); |
998 |
C4::Circulation::GetBranchItemRule( $circ_control_branch, $self->itype ); |
999 |
|
999 |
|
1000 |
return Koha::Libraries->new()->empty if $branchitemrule->{holdallowed} eq 'from_local_hold_group' && !$self->home_branch->validate_hold_sibling( {branchcode => $patron->branchcode} ); |
1000 |
if ( |
1001 |
return Koha::Libraries->new()->empty if $branchitemrule->{holdallowed} eq 'from_home_library' && $self->home_branch->branchcode ne $patron->branchcode; |
1001 |
$branchitemrule->{holdallowed} eq 'from_local_hold_group' && |
|
|
1002 |
!$self->home_branch->validate_hold_sibling( {branchcode => $patron->branchcode} ) || |
1003 |
$branchitemrule->{holdallowed} eq 'from_home_library' && |
1004 |
$self->home_branch->branchcode ne $patron->branchcode |
1005 |
) { |
1006 |
return Koha::Libraries->new()->empty; |
1007 |
} |
1002 |
|
1008 |
|
1003 |
my $pickup_libraries = Koha::Libraries->search(); |
1009 |
my $pickup_libraries; |
1004 |
if ($branchitemrule->{hold_fulfillment_policy} eq 'holdgroup') { |
1010 |
if ($branchitemrule->{hold_fulfillment_policy} eq 'holdgroup') { |
1005 |
$pickup_libraries = $self->home_branch->get_hold_libraries; |
1011 |
$pickup_libraries = $self->home_branch->get_hold_libraries; |
1006 |
} elsif ($branchitemrule->{hold_fulfillment_policy} eq 'patrongroup') { |
1012 |
} elsif ($branchitemrule->{hold_fulfillment_policy} eq 'patrongroup') { |
Lines 1010-1016
sub pickup_locations {
Link Here
|
1010 |
$pickup_libraries = Koha::Libraries->search({ branchcode => $self->homebranch }); |
1016 |
$pickup_libraries = Koha::Libraries->search({ branchcode => $self->homebranch }); |
1011 |
} elsif ($branchitemrule->{hold_fulfillment_policy} eq 'holdingbranch') { |
1017 |
} elsif ($branchitemrule->{hold_fulfillment_policy} eq 'holdingbranch') { |
1012 |
$pickup_libraries = Koha::Libraries->search({ branchcode => $self->holdingbranch }); |
1018 |
$pickup_libraries = Koha::Libraries->search({ branchcode => $self->holdingbranch }); |
1013 |
}; |
1019 |
} else { |
|
|
1020 |
$pickup_libraries = Koha::Libraries->search(); |
1021 |
} |
1014 |
|
1022 |
|
1015 |
return $pickup_libraries->search( |
1023 |
return $pickup_libraries->search( |
1016 |
{ |
1024 |
{ |
Lines 1022-1028
sub pickup_locations {
Link Here
|
1022 |
) unless C4::Context->preference('UseBranchTransferLimits'); |
1030 |
) unless C4::Context->preference('UseBranchTransferLimits'); |
1023 |
|
1031 |
|
1024 |
my $limittype = C4::Context->preference('BranchTransferLimitsType'); |
1032 |
my $limittype = C4::Context->preference('BranchTransferLimitsType'); |
1025 |
my ($ccode, $itype) = (undef, undef); |
1033 |
my $ccode; |
|
|
1034 |
my $itype; |
1026 |
if( $limittype eq 'ccode' ){ |
1035 |
if( $limittype eq 'ccode' ){ |
1027 |
$ccode = $self->ccode; |
1036 |
$ccode = $self->ccode; |
1028 |
} else { |
1037 |
} else { |
1029 |
- |
|
|