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 (-3 / +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
<div id="breadcrumbs">
20
<div id="breadcrumbs">
22
    <a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/reports/reports-home.pl">Reports</a>
21
    <a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/reports/reports-home.pl">Reports</a>
Lines 159-166 Link Here
159
                <td>[% loopresul.bfirstname | html %] [% loopresul.bsurname | html %]</td>
158
                <td>[% loopresul.bfirstname | html %] [% loopresul.bsurname | html %]</td>
160
                <td>[% loopresul.branchname | html %]</td>
159
                <td>[% loopresul.branchname | html %]</td>
161
                <td>[% loopresul.date | $KohaDates %]</td>
160
                <td>[% loopresul.date | $KohaDates %]</td>
162
                <td>[% loopresul.timestamp | $KohaDates with_hours = 1 %]</td>
161
                <td>[% loopresul.type_description | html %]</td>
163
                <td>[% PROCESS account_type_description account=loopresul %]</td>
164
                <td>[% loopresul.note | html %]</td>
162
                <td>[% loopresul.note | html %]</td>
165
                <td style="text-align:right;">[% loopresul.amount | $Price %]</td>
163
                <td style="text-align:right;">[% loopresul.amount | $Price %]</td>
166
                <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% loopresul.biblionumber | uri %]">[% loopresul.title | html %]</a></td>
164
                <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% loopresul.biblionumber | uri %]">[% loopresul.title | html %]</a></td>
(-)a/reports/cash_register_stats.pl (-5 / +6 lines)
Lines 103-112 if ($do_it) { Link Here
103
    }
103
    }
104
104
105
    my $query = "
105
    my $query = "
106
    SELECT round(amount,2) AS amount, description,
106
    SELECT round(amount,2) AS amount, al.description,
107
        bo.surname AS bsurname, bo.firstname AS bfirstname, m.surname AS msurname, m.firstname AS mfirstname,
107
        bo.surname AS bsurname, bo.firstname AS bfirstname, m.surname AS msurname, m.firstname AS mfirstname,
108
        bo.cardnumber, br.branchname, bo.borrowernumber,
108
        bo.cardnumber, br.branchname, bo.borrowernumber,
109
        al.borrowernumber, DATE(al.date) as date, al.credit_type_code, al.debit_type_code, al.amountoutstanding, al.note,
109
        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,
110
        bi.title, bi.biblionumber, i.barcode, i.itype
110
        bi.title, bi.biblionumber, i.barcode, i.itype
111
        FROM accountlines al
111
        FROM accountlines al
112
        LEFT JOIN borrowers bo ON (al.borrowernumber = bo.borrowernumber)
112
        LEFT JOIN borrowers bo ON (al.borrowernumber = bo.borrowernumber)
Lines 114-119 if ($do_it) { Link Here
114
        LEFT JOIN branches br ON (br.branchcode = m.branchcode )
114
        LEFT JOIN branches br ON (br.branchcode = m.branchcode )
115
        LEFT JOIN items i ON (i.itemnumber = al.itemnumber)
115
        LEFT JOIN items i ON (i.itemnumber = al.itemnumber)
116
        LEFT JOIN biblio bi ON (bi.biblionumber = i.biblionumber)
116
        LEFT JOIN biblio bi ON (bi.biblionumber = i.biblionumber)
117
        LEFT JOIN account_credit_types act ON (al.credit_type_code = act.code)
118
        LEFT JOIN account_debit_types adt ON (al.debit_type_code = adt.code)
117
        WHERE CAST(al.date AS DATE) BETWEEN ? AND ?
119
        WHERE CAST(al.date AS DATE) BETWEEN ? AND ?
118
        $whereTType
120
        $whereTType
119
        $whereBranchCode
121
        $whereBranchCode
Lines 166-172 if ($do_it) { Link Here
166
                        $row->{bfirstname} . ' ' . $row->{bsurname},
168
                        $row->{bfirstname} . ' ' . $row->{bsurname},
167
                        $row->{branchname},
169
                        $row->{branchname},
168
                        $row->{date},
170
                        $row->{date},
169
                        $row->{credit_type_code} || $row->{debit_type_code},
171
                        $row->{type_description},
170
                        $row->{note},
172
                        $row->{note},
171
                        $row->{amount},
173
                        $row->{amount},
172
                        $row->{title},
174
                        $row->{title},
Lines 175-181 if ($do_it) { Link Here
175
                    push (@rows, \@rowValues) ;
177
                    push (@rows, \@rowValues) ;
176
                }
178
                }
177
                my @total;
179
                my @total;
178
                for (1..7){push(@total,"")};
180
                for (1..6){push(@total,"")};
179
                push(@total, $grantotal);
181
                push(@total, $grantotal);
180
        print $input->header(
182
        print $input->header(
181
            -type       => 'text/csv',
183
            -type       => 'text/csv',
182
- 

Return to bug 29271