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

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

Return to bug 32980