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

(-)a/Koha/Patron.pm (+12 lines)
Lines 533-538 sub guarantor_relationships { Link Here
533
    return Koha::Patron::Relationships->search( { guarantee_id => $self->id } );
533
    return Koha::Patron::Relationships->search( { guarantee_id => $self->id } );
534
}
534
}
535
535
536
=head3 is_guarantee
537
538
Returns true if the patron has a guarantor.
539
540
=cut
541
542
sub is_guarantee {
543
    my ($self) = @_;
544
    return $self->guarantor_relationships()->count()
545
}
546
547
536
=head3 guarantee_relationships
548
=head3 guarantee_relationships
537
549
538
Returns Koha::Patron::Relationships object for this patron's guarantors
550
Returns Koha::Patron::Relationships object for this patron's guarantors
(-)a/members/memberentry.pl (-2 / +1 lines)
Lines 285-291 if ( ( $op eq 'cud-save' || $op eq 'cud-insert' ) Link Here
285
}
285
}
286
286
287
foreach my $guarantor (@guarantors) {
287
foreach my $guarantor (@guarantors) {
288
    if ( ( $op eq 'cud-save' || $op eq 'cud-insert' ) && $guarantor->is_child ) {
288
    if ( ( $op eq 'cud-save' || $op eq 'cud-insert' ) && ($guarantor->is_child ) || $guarantor->is_guarantee)  {
289
        push @errors, 'ERROR_guarantor_is_guarantee';
289
        push @errors, 'ERROR_guarantor_is_guarantee';
290
    }
290
    }
291
}
291
}
292
- 

Return to bug 37892