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

(-)a/circ/circulation.pl (-1 / +9 lines)
Lines 720-731 my $view = Link Here
720
720
721
my @relatives;
721
my @relatives;
722
if ($patron) {
722
if ($patron) {
723
    if ( my @guarantors = $patron->guarantor_relationships()->guarantors->as_list ) {
723
    my @guarantors = $patron->guarantor_relationships()->guarantors->as_list;
724
    if ( scalar @guarantors ) {
724
        push( @relatives, $_->id ) for @guarantors;
725
        push( @relatives, $_->id ) for @guarantors;
725
        push( @relatives, $_->id ) for $patron->siblings->as_list;
726
        push( @relatives, $_->id ) for $patron->siblings->as_list;
726
    } else {
727
    } else {
727
        push( @relatives, $_->id ) for $patron->guarantee_relationships()->guarantees->as_list;
728
        push( @relatives, $_->id ) for $patron->guarantee_relationships()->guarantees->as_list;
728
    }
729
    }
730
    if (    C4::Context->preference('ChildNeedsGuarantor')
731
        and ( $patron->is_child or $patron->category->can_be_guarantee )
732
        and $patron->contactname eq ""
733
        and !@guarantors )
734
    {
735
        $template->param( missing_guarantor => 1 );
736
    }
729
}
737
}
730
my $relatives_issues_count =
738
my $relatives_issues_count =
731
    Koha::Database->new()->schema()->resultset('Issue')->count( { borrowernumber => \@relatives } );
739
    Koha::Database->new()->schema()->resultset('Issue')->count( { borrowernumber => \@relatives } );
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt (+4 lines)
Lines 134-139 Link Here
134
        <div class="alert alert-warning">This is the anonymous patron, so circulation is disabled.</div>
134
        <div class="alert alert-warning">This is the anonymous patron, so circulation is disabled.</div>
135
    [% END %]
135
    [% END %]
136
136
137
    [% IF missing_guarantor %]
138
        <div class="alert alert-warning">System preference 'ChildNeedsGuarantor' is enabled and this patron does not have a guarantor.</div>
139
    [% END %]
140
137
    [% IF ( NEEDSCONFIRMATION ) %]
141
    [% IF ( NEEDSCONFIRMATION ) %]
138
        <div id="circ_needsconfirmation" class="alert alert-warning audio-alert-action focus" tabindex="-1">
142
        <div id="circ_needsconfirmation" class="alert alert-warning audio-alert-action focus" tabindex="-1">
139
            [% IF CAN_user_circulate_force_checkout or ADDITIONAL_MATERIALS %]
143
            [% IF CAN_user_circulate_force_checkout or ADDITIONAL_MATERIALS %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt (+4 lines)
Lines 54-59 Link Here
54
        <div class="alert alert-warning">This is the anonymous patron.</div>
54
        <div class="alert alert-warning">This is the anonymous patron.</div>
55
    [% END %]
55
    [% END %]
56
56
57
    [% IF missing_guarantor %]
58
        <div class="alert alert-warning">System preference 'ChildNeedsGuarantor' is enabled and this patron does not have a guarantor.</div>
59
    [% END %]
60
57
    [% IF ( error ) %]
61
    [% IF ( error ) %]
58
        <div class="alert alert-warning">
62
        <div class="alert alert-warning">
59
            [% IF ( error == 'CANT_DELETE_STAFF' ) %]
63
            [% IF ( error == 'CANT_DELETE_STAFF' ) %]
(-)a/members/moremember.pl (-2 / +9 lines)
Lines 76-82 output_and_exit_if_error( Link Here
76
    { module => 'members', logged_in_user => $logged_in_user, current_patron => $patron }
76
    { module => 'members', logged_in_user => $logged_in_user, current_patron => $patron }
77
);
77
);
78
78
79
my $category_type = $patron->category->category_type;
79
my $category      = $patron->category;
80
my $category_type = $category->category_type;
80
81
81
if ( $patron->borrowernumber eq C4::Context->preference("AnonymousPatron") ) {
82
if ( $patron->borrowernumber eq C4::Context->preference("AnonymousPatron") ) {
82
    $template->param( is_anonymous => 1 );
83
    $template->param( is_anonymous => 1 );
Lines 116-121 $template->param( Link Here
116
    guarantor_relationships => $guarantor_relationships,
117
    guarantor_relationships => $guarantor_relationships,
117
    guarantees              => \@guarantees,
118
    guarantees              => \@guarantees,
118
);
119
);
120
if (    C4::Context->preference('ChildNeedsGuarantor')
121
    and ( $patron->is_child or $category->can_be_guarantee )
122
    and $patron->contactname eq ""
123
    and !@guarantors )
124
{
125
    $template->param( missing_guarantor => 1 );
126
}
119
127
120
my $relatives_issues_count = Koha::Checkouts->count( { borrowernumber => \@relatives } );
128
my $relatives_issues_count = Koha::Checkouts->count( { borrowernumber => \@relatives } );
121
129
122
- 

Return to bug 39180