return Koha::Patron::Relationships->search( { guarantee_id => $self->id } );
}
=head3 is_guarantee
Returns true if the patron has a guarantor.
=cut
sub is_guarantee {
my ($self) = @_;
return $self->guarantor_relationships()->count()
=head3 guarantee_relationships
Returns Koha::Patron::Relationships object for this patron's guarantors
foreach my $guarantor (@guarantors) {
if ( ( $op eq 'cud-save' || $op eq 'cud-insert' ) && $guarantor->is_child ) {
if ( ( $op eq 'cud-save' || $op eq 'cud-insert' ) && ($guarantor->is_child ) || $guarantor->is_guarantee) {
push @errors, 'ERROR_guarantor_is_guarantee';
-