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

(-)a/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss (-1 / +7 lines)
Lines 333-338 td { Link Here
333
    background-color: #FFF;
333
    background-color: #FFF;
334
}
334
}
335
335
336
tr {
337
    &.outstanding {
338
        font-style: italic;
339
    }
340
}
341
336
td {
342
td {
337
    img {
343
    img {
338
        max-width: none;
344
        max-width: none;
Lines 342-348 td { Link Here
342
        color: #CC3333;
348
        color: #CC3333;
343
    }
349
    }
344
350
345
    .sum {
351
    &.sum {
346
        background-color: #FFFFE5;
352
        background-color: #FFFFE5;
347
        font-weight: bold;
353
        font-weight: bold;
348
    }
354
    }
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/account-table.inc (-2 / +48 lines)
Lines 9-22 Link Here
9
                <th class="title-string">Date</th>
9
                <th class="title-string">Date</th>
10
                <th>Type</th>
10
                <th>Type</th>
11
                <th>Description</th>
11
                <th>Description</th>
12
                <th>Fine amount</th>
12
                <th>Amount</th>
13
                <th>Amount outstanding</th>
13
                <th>Amount outstanding</th>
14
            </tr>
14
            </tr>
15
        </thead>
15
        </thead>
16
16
17
        <tbody>
17
        <tbody>
18
            [% FOREACH ACCOUNT_LINE IN ACCOUNT_LINES %]
18
            [% FOREACH ACCOUNT_LINE IN ACCOUNT_LINES %]
19
                <tr>
19
                <tr [% IF ACCOUNT_LINE.amountoutstanding > 0 || ACCOUNT_LINE.amountoutstanding < 0 %]class="outstanding"[% END%]>
20
                    [% IF ENABLE_OPAC_PAYMENTS %]
20
                    [% IF ENABLE_OPAC_PAYMENTS %]
21
                        <td>
21
                        <td>
22
                            [% IF ACCOUNT_LINE.amountoutstanding > 0 %]
22
                            [% IF ACCOUNT_LINE.amountoutstanding > 0 %]
Lines 75-80 Link Here
75
                <th class="sum" colspan="[% COLSPAN | html %]">Total due</th>
75
                <th class="sum" colspan="[% COLSPAN | html %]">Total due</th>
76
                <td class="sum">[% total | $Price %]</td>
76
                <td class="sum">[% total | $Price %]</td>
77
            </tr>
77
            </tr>
78
            [% IF outstanding_credits.total_outstanding < 0 %]
79
            [% FOREACH outstanding_credit IN outstanding_credits %]
80
                <tr [% IF outstanding_credit.amountoutstanding < 0 %]class="outstanding"[% END%]>
81
                    [% IF ENABLE_OPAC_PAYMENTS %]<td></td>[% END %]
82
                    <td><span title="[% outstanding_credit.date | html %]">[% outstanding_credit.date | $KohaDates %]</span></td>
83
                    <td>
84
                        [% SWITCH outstanding_credit.accounttype %]
85
                        [% CASE 'Pay' %]Payment
86
                        [% CASE 'Pay00' %]Payment (cash via SIP2)
87
                        [% CASE 'Pay01' %]Payment (VISA via SIP2)
88
                        [% CASE 'Pay02' %]Payment (credit card via SIP2)
89
                        [% CASE 'VOID' %]Voided
90
                        [% CASE 'N' %]New card
91
                        [% CASE 'OVERDUE' %]Fine
92
                        [% CASE 'A' %]Account management fee
93
                        [% CASE 'M' %]Sundry
94
                        [% CASE 'L' %]Lost item
95
                        [% CASE 'W' %]Writeoff
96
                        [% CASE 'HE' %]Hold waiting too long
97
                        [% CASE 'Rent' %]Rental fee
98
                        [% CASE 'FOR' %]Forgiven
99
                        [% CASE 'LR' %]Lost item fee refund
100
                        [% CASE 'PF' %]Lost item processing fee
101
                        [% CASE 'PAY' %]Payment
102
                        [% CASE 'WO' %]Writeoff
103
                        [% CASE 'C' %]Credit
104
                        [% CASE 'CR' %]Credit
105
                        [%-CASE 'Res' %]Hold fee
106
                        [% CASE %][% outstanding_credit.accounttype | html %]
107
                        [%- END -%]
108
                        [%- PROCESS account_status_description account=outstanding_credit -%]
109
                    </td>
110
                    <td>
111
                        [%- IF outstanding_credit.payment_type %][% AuthorisedValues.GetByCode('PAYMENT_TYPE', outstanding_credit.payment_type, 1) | html %][% END %]
112
                        [%- IF outstanding_credit.description %][% outstanding_credit.description | html %][% END %]
113
                        [% IF outstanding_credit.itemnumber %]([% outstanding_credit.item.biblio.title | html %])[% END %]
114
                    </td>
115
                    <td class="credit">[% outstanding_credit.amount * -1 | $Price %]</td>
116
                    <td class="credit">[% outstanding_credit.amountoutstanding * -1 | $Price %]</td>
117
                </tr>
118
            [% END %]
119
            <tr>
120
                <th class="sum" colspan="[% COLSPAN | html %]">Total due if credit(s) applied:</th>
121
                <td class="sum">[% total + outstanding_credits.total_outstanding | $Price %]</td>
122
            </tr>
123
            [% END %]
78
        </tfoot>
124
        </tfoot>
79
125
80
    </table>
126
    </table>
(-)a/opac/opac-account.pl (-10 / +11 lines)
Lines 41-57 my ( $template, $borrowernumber, $cookie ) = get_template_and_user( Link Here
41
41
42
my $patron = Koha::Patrons->find( $borrowernumber );
42
my $patron = Koha::Patrons->find( $borrowernumber );
43
my $account = $patron->account;
43
my $account = $patron->account;
44
my $total = $account->balance;
44
my $accountlines = $account->lines->search({ amountoutstanding => { '>=' => 0 }});
45
my $accountlines = $account->lines;
45
my $total_outstanding = $accountlines->total_outstanding;
46
my $outstanding_credits = $account->outstanding_credits;
46
47
47
$template->param(
48
$template->param(
48
    ACCOUNT_LINES => $accountlines,
49
    ACCOUNT_LINES       => $accountlines,
49
    total         => $total,
50
    total               => $total_outstanding,
50
    accountview   => 1,
51
    outstanding_credits => $outstanding_credits,
51
    message       => scalar $query->param('message') || q{},
52
    accountview         => 1,
52
    message_value => scalar $query->param('message_value') || q{},
53
    message             => scalar $query->param('message') || q{},
53
    payment       => scalar $query->param('payment') || q{},
54
    message_value       => scalar $query->param('message_value') || q{},
54
    payment_error => scalar $query->param('payment-error') || q{},
55
    payment             => scalar $query->param('payment') || q{},
56
    payment_error       => scalar $query->param('payment-error') || q{},
55
);
57
);
56
58
57
my $plugins_enabled = C4::Context->preference('UseKohaPlugins') && C4::Context->config("enable_plugins");
59
my $plugins_enabled = C4::Context->preference('UseKohaPlugins') && C4::Context->config("enable_plugins");
58
- 

Return to bug 23115