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

(-)a/Koha/Patron.pm (+13 lines)
Lines 569-574 sub guarantee_relationships { Link Here
569
    );
569
    );
570
}
570
}
571
571
572
573
=head3 is_guarantor
574
575
Returns true if the patron is a guarantor.
576
577
=cut
578
579
sub is_guarantor {
580
    my ($self) = @_;
581
    return $self->guarantee_relationships()->count()
582
}
583
584
572
=head3 relationships_debt
585
=head3 relationships_debt
573
586
574
Returns the amount owed by the patron's guarantors *and* the other guarantees of those guarantors
587
Returns the amount owed by the patron's guarantors *and* the other guarantees of those 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 ) || $guarantor->is_guarantee)  {
288
    if ( ( $op eq 'cud-save' || $op eq 'cud-insert' ) && ($guarantor->is_child ) || $guarantor->is_guarantee || $patron->is_guarantor)  {
289
        push @errors, 'ERROR_guarantor_is_guarantee';
289
        push @errors, 'ERROR_guarantor_is_guarantee';
290
    }
290
    }
291
}
291
}
292
- 

Return to bug 37892