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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/account.tt (+6 lines)
Lines 13-18 Link Here
13
<script type="text/javascript">
13
<script type="text/javascript">
14
//<![CDATA[
14
//<![CDATA[
15
$(document).ready(function() {
15
$(document).ready(function() {
16
    [% IF credit_id %]
17
        accountPrint( 'credit', [% credit_id %] );
18
    [% ELSIF debit_id %]
19
        accountPrint( 'debit', [% debit_id %] );
20
    [% END %]
21
16
    $('#account-credits').hide();
22
    $('#account-credits').hide();
17
    $('#account-debits-switcher').click(function() {
23
    $('#account-debits-switcher').click(function() {
18
         $('#account-debits').slideUp();
24
         $('#account-debits').slideUp();
(-)a/members/account.pl (+4 lines)
Lines 61-66 $template->param( Link Here
61
    debits   => \@debits,
61
    debits   => \@debits,
62
    credits  => \@credits,
62
    credits  => \@credits,
63
    borrower => $borrower,
63
    borrower => $borrower,
64
65
    # IDs for automatic receipt printing
66
    debit_id  => $cgi->param('debit_id')  || undef,
67
    credit_id => $cgi->param('credit_id') || undef,
64
);
68
);
65
69
66
# Standard /members/ borrower details data
70
# Standard /members/ borrower details data
(-)a/members/account_debit_do.pl (-1 / +1 lines)
Lines 65-69 if ( checkauth( $cgi, 0, { borrowers => 1 }, 'intranet' ) ) { Link Here
65
    my $debit_id = $debit->debit_id();
65
    my $debit_id = $debit->debit_id();
66
66
67
    print $cgi->redirect(
67
    print $cgi->redirect(
68
        "/cgi-bin/koha/members/account.pl?borrowernumber=$borrowernumber");
68
        "/cgi-bin/koha/members/account.pl?borrowernumber=$borrowernumber&debit_id=$debit_id");
69
}
69
}
(-)a/members/account_payment_do.pl (-3 / +4 lines)
Lines 47-53 if ( checkauth( $cgi, 0, { borrowers => 1 }, 'intranet' ) ) { Link Here
47
    $amount_received ||= $amount_to_pay
47
    $amount_received ||= $amount_to_pay
48
      if $type eq Koha::Accounts::CreditTypes::Payment();
48
      if $type eq Koha::Accounts::CreditTypes::Payment();
49
49
50
    my $debit = AddCredit(
50
    my $credit = AddCredit(
51
        {
51
        {
52
            borrower        => $borrower,
52
            borrower        => $borrower,
53
            amount_received => $amount_received,
53
            amount_received => $amount_received,
Lines 59-64 if ( checkauth( $cgi, 0, { borrowers => 1 }, 'intranet' ) ) { Link Here
59
        }
59
        }
60
    );
60
    );
61
61
62
    my $credit_id = $credit->credit_id();
63
62
    print $cgi->redirect(
64
    print $cgi->redirect(
63
        "/cgi-bin/koha/members/account.pl?borrowernumber=$borrowernumber");
65
        "/cgi-bin/koha/members/account.pl?borrowernumber=$borrowernumber&credit_id=$credit_id");
64
}
66
}
65
- 

Return to bug 6427