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

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/accounts.inc (-4 / +4 lines)
Lines 1-16 Link Here
1
[%- BLOCK account_type_description -%]
1
[%- BLOCK account_type_description -%]
2
    <span>
2
    <span>
3
    [%- IF account.credit_type_code -%]
3
    [%- IF account.credit_type_code -%]
4
        [%- PROCESS credit_type_description credit_type_code = account.credit_type_code -%]
4
        [%- PROCESS credit_type_description credit_type_code = account.credit_type -%]
5
    [%- ELSIF account.debit_type_code -%]
5
    [%- ELSIF account.debit_type_code -%]
6
        [%- PROCESS debit_type_description debit_type_code = account.debit_type_code -%]
6
        [%- PROCESS debit_type_description debit_type_code = account.debit_type -%]
7
    [%- END -%]
7
    [%- END -%]
8
    [%- PROCESS account_status_description account=account -%]
8
    [%- PROCESS account_status_description account=account -%]
9
    </span>
9
    </span>
10
[%- END -%]
10
[%- END -%]
11
11
12
[%- BLOCK debit_type_description -%]
12
[%- BLOCK debit_type_description -%]
13
    [%- SWITCH debit_type_code -%]
13
    [%- SWITCH debit_type.code -%]
14
        [%- CASE 'ACCOUNT'          -%]Account creation fee
14
        [%- CASE 'ACCOUNT'          -%]Account creation fee
15
        [%- CASE 'ACCOUNT_RENEW'    -%]Account renewal fee
15
        [%- CASE 'ACCOUNT_RENEW'    -%]Account renewal fee
16
        [%- CASE 'LOST'             -%]Lost item
16
        [%- CASE 'LOST'             -%]Lost item
Lines 30-36 Link Here
30
[%- END -%]
30
[%- END -%]
31
31
32
[%- BLOCK credit_type_description -%]
32
[%- BLOCK credit_type_description -%]
33
    [%- SWITCH credit_type_code -%]
33
    [%- SWITCH credit_type.code -%]
34
        [%- CASE 'PAYMENT'      -%]Payment
34
        [%- CASE 'PAYMENT'      -%]Payment
35
        [%- CASE 'WRITEOFF'     -%]Writeoff
35
        [%- CASE 'WRITEOFF'     -%]Writeoff
36
        [%- CASE 'FORGIVEN'     -%]Forgiven
36
        [%- CASE 'FORGIVEN'     -%]Forgiven
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/cash_register_stats.tt (-2 / +1 lines)
Lines 16-22 Link Here
16
<body id="cash_register_stats" class="rep">
16
<body id="cash_register_stats" class="rep">
17
[% INCLUDE 'header.inc' %]
17
[% INCLUDE 'header.inc' %]
18
[% INCLUDE 'cat-search.inc' %]
18
[% INCLUDE 'cat-search.inc' %]
19
[% INCLUDE 'accounts.inc' %]
20
19
21
<nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
20
<nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
22
    <ol>
21
    <ol>
Lines 179-185 Link Here
179
                <td>[% loopresul.branchname | html %]</td>
178
                <td>[% loopresul.branchname | html %]</td>
180
                <td>[% loopresul.date | $KohaDates %]</td>
179
                <td>[% loopresul.date | $KohaDates %]</td>
181
                <td>[% loopresul.timestamp | $KohaDates with_hours = 1 %]</td>
180
                <td>[% loopresul.timestamp | $KohaDates with_hours = 1 %]</td>
182
                <td>[% PROCESS account_type_description account=loopresul %]</td>
181
                <td>[% loopresul.type_description | html %]</td>
183
                <td>[% loopresul.note | html %]</td>
182
                <td>[% loopresul.note | html %]</td>
184
                <td style="text-align:right;">[% loopresul.amount | $Price %]</td>
183
                <td style="text-align:right;">[% loopresul.amount | $Price %]</td>
185
                <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% loopresul.biblionumber | uri %]">[% loopresul.title | html %]</a></td>
184
                <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% loopresul.biblionumber | uri %]">[% loopresul.title | html %]</a></td>
(-)a/reports/cash_register_stats.pl (-4 / +5 lines)
Lines 100-109 if ($do_it) { Link Here
100
    }
100
    }
101
101
102
    my $query = "
102
    my $query = "
103
    SELECT round(amount,2) AS amount, description,
103
    SELECT round(amount,2) AS amount, al.description,
104
        bo.surname AS bsurname, bo.firstname AS bfirstname, m.surname AS msurname, m.firstname AS mfirstname,
104
        bo.surname AS bsurname, bo.firstname AS bfirstname, m.surname AS msurname, m.firstname AS mfirstname,
105
        bo.cardnumber, br.branchname, bo.borrowernumber,
105
        bo.cardnumber, br.branchname, bo.borrowernumber,
106
        al.borrowernumber, DATE(al.date) as date, al.credit_type_code, al.debit_type_code, al.amountoutstanding, al.note, al.timestamp,
106
        al.borrowernumber, DATE(al.date) as date, al.credit_type_code, al.debit_type_code, COALESCE(act.description,al.credit_type_code,adt.description,al.debit_type_code) AS type_description, al.amountoutstanding, al.note, al.timestamp,
107
        bi.title, bi.biblionumber, i.barcode, i.itype
107
        bi.title, bi.biblionumber, i.barcode, i.itype
108
        FROM accountlines al
108
        FROM accountlines al
109
        LEFT JOIN borrowers bo ON (al.borrowernumber = bo.borrowernumber)
109
        LEFT JOIN borrowers bo ON (al.borrowernumber = bo.borrowernumber)
Lines 111-116 if ($do_it) { Link Here
111
        LEFT JOIN branches br ON (br.branchcode = m.branchcode )
111
        LEFT JOIN branches br ON (br.branchcode = m.branchcode )
112
        LEFT JOIN items i ON (i.itemnumber = al.itemnumber)
112
        LEFT JOIN items i ON (i.itemnumber = al.itemnumber)
113
        LEFT JOIN biblio bi ON (bi.biblionumber = i.biblionumber)
113
        LEFT JOIN biblio bi ON (bi.biblionumber = i.biblionumber)
114
        LEFT JOIN account_credit_types act ON (al.credit_type_code = act.code)
115
        LEFT JOIN account_debit_types adt ON (al.debit_type_code = adt.code)
114
        WHERE CAST(al.date AS DATE) BETWEEN ? AND ?
116
        WHERE CAST(al.date AS DATE) BETWEEN ? AND ?
115
        $whereTType
117
        $whereTType
116
        $whereBranchCode
118
        $whereBranchCode
Lines 164-170 if ($do_it) { Link Here
164
                        $row->{branchname},
166
                        $row->{branchname},
165
                        $row->{date},
167
                        $row->{date},
166
                        $row->{timestamp},
168
                        $row->{timestamp},
167
                        $row->{credit_type_code} || $row->{debit_type_code},
169
                        $row->{type_description},
168
                        $row->{note},
170
                        $row->{note},
169
                        $row->{amount},
171
                        $row->{amount},
170
                        $row->{title},
172
                        $row->{title},
171
- 

Return to bug 29271