View | Details | Raw Unified | Return to bug 36362
Collapse All | Expand All

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

Return to bug 36362