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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-print.tt (-14 / +15 lines)
Lines 1-6 Link Here
1
[% USE Koha %]
1
[% USE Koha %]
2
[% USE Branches %]
2
[% USE Branches %]
3
[% USE KohaDates %]
3
[% USE KohaDates %]
4
[% USE Price %]
4
[% INCLUDE 'doc-head-open.inc' %]
5
[% INCLUDE 'doc-head-open.inc' %]
5
    <title>Summary for [% firstname %] [% surname %] ([% cardnumber %])</title>
6
    <title>Summary for [% firstname %] [% surname %] ([% cardnumber %])</title>
6
    [% INCLUDE 'doc-head-close.inc' %]
7
    [% INCLUDE 'doc-head-close.inc' %]
Lines 93-100 Link Here
93
            [% END %]
94
            [% END %]
94
        </table>
95
        </table>
95
    [% END %]
96
    [% END %]
96
97
    [% IF accounts && ( totaldue < 0 || totaldue > 0 ) %]
97
    [% IF ( accounts && ( totaldue != '0.00' ) ) %]
98
        <table>
98
        <table>
99
            <caption>Account fines and payments</caption>
99
            <caption>Account fines and payments</caption>
100
            <tr>
100
            <tr>
Lines 105-127 Link Here
105
            </tr>
105
            </tr>
106
106
107
            [% FOREACH account IN accounts %]
107
            [% FOREACH account IN accounts %]
108
                [% NEXT IF account.amountoutstanding == '0.00' %]
108
                [% IF ( account.amountoutstanding < 0 ) || ( account.amountoutstanding > 0 ) %]
109
                <tr>
109
                    <tr>
110
                    <td>
110
                        <td>
111
                        [% IF ( account.itemnumber ) %]<a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% account.biblionumber %]&amp;itemnumber=[% account.itemnumber %]">[% END %]
111
                            [% IF ( account.itemnumber ) %]<a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% account.biblionumber %]&amp;itemnumber=[% account.itemnumber %]">[% END %]
112
                        [% account.description %]&nbsp;[% IF ( account.printtitle ) %] [% account.title |html %][% END %]
112
                            [% account.description %]&nbsp;[% IF ( account.printtitle ) %] [% account.title |html %][% END %]
113
                        [% IF ( account.itemnumber ) %]</a>[% END %]
113
                            [% IF ( account.itemnumber ) %]</a>[% END %]
114
                    </td>
114
                        </td>
115
                    <td>[% account.date | $KohaDates %]</td>
115
                        <td>[% account.date | $KohaDates %]</td>
116
                    <td>[% account.amount %]</td>
116
                        <td style="text-align:right;">[% account.amount | $Price %]</td>
117
                    <td>[% account.amountoutstanding %]</td>
117
                        <td style="text-align:right;">[% account.amountoutstanding | $Price %]</td>
118
                </tr>
118
                    </tr>
119
                [% END %]
119
            [% END %]
120
            [% END %]
120
121
121
            <tfoot>
122
            <tfoot>
122
                <tr>
123
                <tr>
123
                    <td colspan="3">Total due</td>
124
                    <td colspan="3">Total due</td>
124
                    <td colspan="2">[% totaldue %]</td>
125
                    <td colspan="2" style="text-align:right;">[% totaldue | $Price %]</td>
125
                </tr>
126
                </tr>
126
            </tfoot>
127
            </tfoot>
127
        </table>
128
        </table>
(-)a/members/summary-print.pl (-9 / +1 lines)
Lines 46-56 my $data = GetMember( 'borrowernumber' => $borrowernumber ); Link Here
46
46
47
my ( $total, $accts, $numaccts ) = GetMemberAccountRecords($borrowernumber);
47
my ( $total, $accts, $numaccts ) = GetMemberAccountRecords($borrowernumber);
48
foreach my $accountline (@$accts) {
48
foreach my $accountline (@$accts) {
49
    $accountline->{amount} = sprintf( '%.2f', $accountline->{amount} )
50
        if ( $accountline->{amount} ) ;
51
    $accountline->{amountoutstanding} = sprintf( '%.2f', $accountline->{amountoutstanding} )
52
        if ( $accountline->{amountoutstanding} );
53
54
    if (   $accountline->{accounttype} ne 'F'
49
    if (   $accountline->{accounttype} ne 'F'
55
        && $accountline->{accounttype} ne 'FU' )
50
        && $accountline->{accounttype} ne 'FU' )
56
    {
51
    {
Lines 59-66 foreach my $accountline (@$accts) { Link Here
59
}
54
}
60
55
61
our $totalprice = 0;
56
our $totalprice = 0;
62
my $total_format = '';
63
$total_format = sprintf( "%.2f", $total ) if ($total);
64
57
65
my $holds_rs = Koha::Holds->search(
58
my $holds_rs = Koha::Holds->search(
66
    { borrowernumber => $borrowernumber },
59
    { borrowernumber => $borrowernumber },
Lines 72-78 $template->param( Link Here
72
    borrowernumber => $borrowernumber,
65
    borrowernumber => $borrowernumber,
73
66
74
    accounts => $accts,
67
    accounts => $accts,
75
    totaldue => $total_format,
68
    totaldue => $total,
76
69
77
    issues     => build_issue_data( GetPendingIssues($borrowernumber) ),
70
    issues     => build_issue_data( GetPendingIssues($borrowernumber) ),
78
    totalprice => $totalprice,
71
    totalprice => $totalprice,
79
- 

Return to bug 17100