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

(-)a/Koha/Patron.pm (+16 lines)
Lines 39-44 use Koha::Holds; Link Here
39
use Koha::Old::Checkouts;
39
use Koha::Old::Checkouts;
40
use Koha::Patron::Attributes;
40
use Koha::Patron::Attributes;
41
use Koha::Patron::Categories;
41
use Koha::Patron::Categories;
42
use Koha::Patron::Discharge;
42
use Koha::Patron::HouseboundProfile;
43
use Koha::Patron::HouseboundProfile;
43
use Koha::Patron::HouseboundRole;
44
use Koha::Patron::HouseboundRole;
44
use Koha::Patron::Images;
45
use Koha::Patron::Images;
Lines 693-698 sub is_going_to_expire { Link Here
693
    return 0;
694
    return 0;
694
}
695
}
695
696
697
=head3 is_discharged
698
699
my $is_discharged = $patron->is_discharged;
700
701
Returns if the patron is currently discharged (1) or not (0).
702
703
=cut
704
705
sub is_discharged {
706
    my ($self) = @_;
707
708
    my $is_discharged = Koha::Patron::Discharge->is_discharged( { borrowernumber => $self->borrowernumber } );
709
    return $is_discharged;
710
}
711
696
=head3 set_password
712
=head3 set_password
697
713
698
    $patron->set_password({ password => $plain_text_password [, skip_validation => 1 ] });
714
    $patron->set_password({ password => $plain_text_password [, skip_validation => 1 ] });
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/usermenu.inc (-2 / +5 lines)
Lines 119-125 Link Here
119
                [% ELSE %]
119
                [% ELSE %]
120
                    <li>
120
                    <li>
121
                [% END %]
121
                [% END %]
122
                <a href="/cgi-bin/koha/opac-discharge.pl">ask for a discharge</a></li>
122
                [% IF ( logged_in_user.is_discharged ) %]
123
                    <a href="/cgi-bin/koha/opac-discharge.pl">download discharge confirmation</a></li>
124
                [% ELSE %]
125
                    <a href="/cgi-bin/koha/opac-discharge.pl">ask for a discharge</a></li>
126
                [% END %]
123
            [% END %]
127
            [% END %]
124
128
125
            [% IF Koha.Preference( 'ILLModule' ) == 1 %]
129
            [% IF Koha.Preference( 'ILLModule' ) == 1 %]
126
- 

Return to bug 14262