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

(-)a/circ/circulation.pl (-6 / +3 lines)
Lines 561-572 my $view = $batch Link Here
561
561
562
my @relatives;
562
my @relatives;
563
if ( $patron ) {
563
if ( $patron ) {
564
    if ( my @guarantors = $patron->guarantor_relationships()->guarantors->as_list ) {
564
    my @guarantors = $patron->guarantor_relationships()->guarantors->as_list;
565
        push( @relatives, $_->id ) for @guarantors;
565
    my @guarantees = $patron->guarantee_relationships()->guarantees->as_list;
566
        push( @relatives, $_->id ) for $patron->siblings->as_list;
566
    @relatives = map { $_->id } (@guarantors, $patron->siblings->as_list, @guarantees);
567
    } else {
568
        push( @relatives, $_->id ) for $patron->guarantee_relationships()->guarantees->as_list;
569
    }
570
}
567
}
571
my $relatives_issues_count =
568
my $relatives_issues_count =
572
  Koha::Database->new()->schema()->resultset('Issue')
569
  Koha::Database->new()->schema()->resultset('Issue')
(-)a/members/moremember.pl (-9 / +1 lines)
Lines 96-112 if ( $patron->is_debarred ) { Link Here
96
96
97
$template->param( flagged => 1 ) if $patron->account_locked;
97
$template->param( flagged => 1 ) if $patron->account_locked;
98
98
99
my @relatives;
100
my $guarantor_relationships = $patron->guarantor_relationships;
99
my $guarantor_relationships = $patron->guarantor_relationships;
101
my @guarantees              = $patron->guarantee_relationships->guarantees->as_list;
100
my @guarantees              = $patron->guarantee_relationships->guarantees->as_list;
102
my @guarantors              = $guarantor_relationships->guarantors->as_list;
101
my @guarantors              = $guarantor_relationships->guarantors->as_list;
103
if (@guarantors) {
102
my @relatives = map { $_->id } (@guarantors, $patron->siblings->as_list, @guarantees);
104
    push( @relatives, $_->id ) for @guarantors;
105
    push( @relatives, $_->id ) for $patron->siblings->as_list;
106
}
107
else {
108
    push( @relatives, $_->id ) for @guarantees;
109
}
110
$template->param(
103
$template->param(
111
    guarantor_relationships => $guarantor_relationships,
104
    guarantor_relationships => $guarantor_relationships,
112
    guarantees              => \@guarantees,
105
    guarantees              => \@guarantees,
113
- 

Return to bug 32980