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

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-discharge.tt (-1 / +6 lines)
Lines 44-50 Link Here
44
                        <h2>What is a discharge?</h2>
44
                        <h2>What is a discharge?</h2>
45
                        <p>This document certifies that you have returned all borrowed items. It is sometimes asked during a file transfer from a school to another. The discharge is sent by us to your school. You will also find it available on your reader account.</p>
45
                        <p>This document certifies that you have returned all borrowed items. It is sometimes asked during a file transfer from a school to another. The discharge is sent by us to your school. You will also find it available on your reader account.</p>
46
                        <p><strong>Warning</strong>: This request is only valid if you are in good standing with the library. Once the application is made, you can not borrow library materials.</p>
46
                        <p><strong>Warning</strong>: This request is only valid if you are in good standing with the library. Once the application is made, you can not borrow library materials.</p>
47
                        <a href="/cgi-bin/koha/opac-discharge.pl?op=request">Ask for a discharge</a>
47
                        [% IF has_checkouts %]
48
                            <div class="dialog alert">You cannot be discharged, you have checked out items. Please return items before asking for a discharge.</div>
49
                        [% ELSE %]
50
                            <a href="/cgi-bin/koha/opac-discharge.pl?op=request">Ask for a discharge</a>
51
                        [% END %]
52
48
                    [% END %]
53
                    [% END %]
49
                </div> <!-- / #discharge -->
54
                </div> <!-- / #discharge -->
50
            </div> <!-- / .span10 -->
55
            </div> <!-- / .span10 -->
(-)a/opac/opac-discharge.pl (-1 / +5 lines)
Lines 47-52 my ( $template, $loggedinuser, $cookie ) = get_template_and_user({ Link Here
47
    debug         => 1,
47
    debug         => 1,
48
});
48
});
49
49
50
my $can_be_discharged = Koha::Patron::Discharge::can_be_discharged({ borrowernumber => $loggedinuser });
51
if ($can_be_discharged == 0) {
52
    $template->param( has_checkouts => 1 );
53
}
54
50
if ( $op eq 'request' ) {
55
if ( $op eq 'request' ) {
51
    my $success = Koha::Patron::Discharge::request({
56
    my $success = Koha::Patron::Discharge::request({
52
        borrowernumber => $loggedinuser,
57
        borrowernumber => $loggedinuser,
53
- 

Return to bug 16463