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

(-)a/circ/circulation.pl (-1 / +9 lines)
Lines 712-723 my $view = Link Here
712
712
713
my @relatives;
713
my @relatives;
714
if ($patron) {
714
if ($patron) {
715
    if ( my @guarantors = $patron->guarantor_relationships()->guarantors->as_list ) {
715
    my @guarantors = $patron->guarantor_relationships()->guarantors->as_list;
716
    if ( scalar @guarantors ) {
716
        push( @relatives, $_->id ) for @guarantors;
717
        push( @relatives, $_->id ) for @guarantors;
717
        push( @relatives, $_->id ) for $patron->siblings->as_list;
718
        push( @relatives, $_->id ) for $patron->siblings->as_list;
718
    } else {
719
    } else {
719
        push( @relatives, $_->id ) for $patron->guarantee_relationships()->guarantees->as_list;
720
        push( @relatives, $_->id ) for $patron->guarantee_relationships()->guarantees->as_list;
720
    }
721
    }
722
    if (    C4::Context->preference('ChildNeedsGuarantor')
723
        and ( $patron->is_child or $patron->category->can_be_guarantee )
724
        and $patron->contactname eq ""
725
        and !@guarantors )
726
    {
727
        $template->param( missing_guarantor => 1 );
728
    }
721
}
729
}
722
my $relatives_issues_count =
730
my $relatives_issues_count =
723
    Koha::Database->new()->schema()->resultset('Issue')->count( { borrowernumber => \@relatives } );
731
    Koha::Database->new()->schema()->resultset('Issue')->count( { borrowernumber => \@relatives } );
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt (+3 lines)
Lines 96-101 Link Here
96
                    [% IF alert.RETURNED_FROM_ANOTHER %]
96
                    [% IF alert.RETURNED_FROM_ANOTHER %]
97
                        <div class="alert alert-warning">Item was checked out to [% INCLUDE 'patron-title.inc' patron = alert.RETURNED_FROM_ANOTHER.patron %] and was returned automatically.</div>
97
                        <div class="alert alert-warning">Item was checked out to [% INCLUDE 'patron-title.inc' patron = alert.RETURNED_FROM_ANOTHER.patron %] and was returned automatically.</div>
98
                    [% END %]
98
                    [% END %]
99
                    [% IF missing_guarantor %]
100
                        <div class="alert alert-warning">System preference 'ChildNeedsGuarantor' is enabled and this patron does not have a guarantor.</div>
101
                    [% END %]
99
102
100
                    [% IF alert.BOOKED %]
103
                    [% IF alert.BOOKED %]
101
                        <div class="alert alert-warning">Item is booked by this user</div>
104
                        <div class="alert alert-warning">Item is booked by this user</div>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt (+3 lines)
Lines 61-66 Link Here
61
61
62
                    [% IF ( error ) %]
62
                    [% IF ( error ) %]
63
                        <div class="alert alert-warning">
63
                        <div class="alert alert-warning">
64
                            [% IF missing_guarantor %]
65
                                <div class="alert alert-warning">System preference 'ChildNeedsGuarantor' is enabled and this patron does not have a guarantor.</div>
66
                            [% END %]
64
                            [% IF ( error == 'CANT_DELETE_STAFF' ) %]
67
                            [% IF ( error == 'CANT_DELETE_STAFF' ) %]
65
                                <h3>Unable to delete staff user</h3>
68
                                <h3>Unable to delete staff user</h3>
66
                                <p>Insufficient privileges.</p>
69
                                <p>Insufficient privileges.</p>
(-)a/members/moremember.pl (-2 / +9 lines)
Lines 74-80 my $patron = Koha::Patrons->find( $borrowernumber ); Link Here
74
my $logged_in_user = Koha::Patrons->find( $loggedinuser );
74
my $logged_in_user = Koha::Patrons->find( $loggedinuser );
75
output_and_exit_if_error( $input, $cookie, $template, { module => 'members', logged_in_user => $logged_in_user, current_patron => $patron } );
75
output_and_exit_if_error( $input, $cookie, $template, { module => 'members', logged_in_user => $logged_in_user, current_patron => $patron } );
76
76
77
my $category_type = $patron->category->category_type;
77
my $category      = $patron->category;
78
my $category_type = $category->category_type;
78
79
79
if ( $patron->borrowernumber eq C4::Context->preference("AnonymousPatron") ) {
80
if ( $patron->borrowernumber eq C4::Context->preference("AnonymousPatron") ) {
80
    $template->param( is_anonymous => 1 );
81
    $template->param( is_anonymous => 1 );
Lines 117-122 $template->param( Link Here
117
    guarantor_relationships => $guarantor_relationships,
118
    guarantor_relationships => $guarantor_relationships,
118
    guarantees              => \@guarantees,
119
    guarantees              => \@guarantees,
119
);
120
);
121
if (    C4::Context->preference('ChildNeedsGuarantor')
122
    and ( $patron->is_child or $category->can_be_guarantee )
123
    and $patron->contactname eq ""
124
    and !@guarantors )
125
{
126
    $template->param( missing_guarantor => 1 );
127
}
120
128
121
my $relatives_issues_count =
129
my $relatives_issues_count =
122
    Koha::Checkouts->count({ borrowernumber => \@relatives });
130
    Koha::Checkouts->count({ borrowernumber => \@relatives });
123
- 

Return to bug 39180