Bugzilla – Attachment 126613 Details for
Bug 29271
Cash register report not displaying or exporting correctly
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29271: (QA follow-up) Fetch and send descriptions to template
Bug-29271-QA-follow-up-Fetch-and-send-descriptions.patch (text/plain), 5.13 KB, created by
Katrin Fischer
on 2021-10-20 20:58:15 UTC
(
hide
)
Description:
Bug 29271: (QA follow-up) Fetch and send descriptions to template
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2021-10-20 20:58:15 UTC
Size:
5.13 KB
patch
obsolete
>From 99361ea16f7981871b58d1b8d39936e08e0b3217 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Wed, 20 Oct 2021 14:06:29 +0000 >Subject: [PATCH] Bug 29271: (QA follow-up) Fetch and send descriptions to > template > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > koha-tmpl/intranet-tmpl/prog/en/includes/accounts.inc | 8 ++++---- > .../intranet-tmpl/prog/en/modules/reports/cash_register_stats.tt | 3 +-- > reports/cash_register_stats.pl | 8 +++++--- > 3 files changed, 10 insertions(+), 9 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/accounts.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/accounts.inc >index ca749fb7c9..8a7d65d0e5 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/accounts.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/accounts.inc >@@ -1,16 +1,16 @@ > [%- BLOCK account_type_description -%] > <span> > [%- IF account.credit_type_code -%] >- [%- PROCESS credit_type_description credit_type_code = account.credit_type_code -%] >+ [%- PROCESS credit_type_description credit_type_code = account.credit_type -%] > [%- ELSIF account.debit_type_code -%] >- [%- PROCESS debit_type_description debit_type_code = account.debit_type_code -%] >+ [%- PROCESS debit_type_description debit_type_code = account.debit_type -%] > [%- END -%] > [%- PROCESS account_status_description account=account -%] > </span> > [%- END -%] > > [%- BLOCK debit_type_description -%] >- [%- SWITCH debit_type_code -%] >+ [%- SWITCH debit_type.code -%] > [%- CASE 'ACCOUNT' -%]Account creation fee > [%- CASE 'ACCOUNT_RENEW' -%]Account renewal fee > [%- CASE 'LOST' -%]Lost item >@@ -30,7 +30,7 @@ > [%- END -%] > > [%- BLOCK credit_type_description -%] >- [%- SWITCH credit_type_code -%] >+ [%- SWITCH credit_type.code -%] > [%- CASE 'PAYMENT' -%]Payment > [%- CASE 'WRITEOFF' -%]Writeoff > [%- CASE 'FORGIVEN' -%]Forgiven >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/cash_register_stats.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/cash_register_stats.tt >index 5efef32043..2e3bc98874 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/cash_register_stats.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/cash_register_stats.tt >@@ -16,7 +16,6 @@ > <body id="cash_register_stats" class="rep"> > [% INCLUDE 'header.inc' %] > [% INCLUDE 'cat-search.inc' %] >-[% INCLUDE 'accounts.inc' %] > > <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb"> > <ol> >@@ -179,7 +178,7 @@ > <td>[% loopresul.branchname | html %]</td> > <td>[% loopresul.date | $KohaDates %]</td> > <td>[% loopresul.timestamp | $KohaDates with_hours = 1 %]</td> >- <td>[% PROCESS account_type_description account=loopresul %]</td> >+ <td>[% loopresul.type_description | html %]</td> > <td>[% loopresul.note | html %]</td> > <td style="text-align:right;">[% loopresul.amount | $Price %]</td> > <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% loopresul.biblionumber | uri %]">[% loopresul.title | html %]</a></td> >diff --git a/reports/cash_register_stats.pl b/reports/cash_register_stats.pl >index 96d3570955..e043044844 100755 >--- a/reports/cash_register_stats.pl >+++ b/reports/cash_register_stats.pl >@@ -100,10 +100,10 @@ if ($do_it) { > } > > my $query = " >- SELECT round(amount,2) AS amount, description, >+ SELECT round(amount,2) AS amount, al.description, > bo.surname AS bsurname, bo.firstname AS bfirstname, m.surname AS msurname, m.firstname AS mfirstname, > bo.cardnumber, br.branchname, bo.borrowernumber, >- al.borrowernumber, DATE(al.date) as date, al.credit_type_code, al.debit_type_code, al.amountoutstanding, al.note, al.timestamp, >+ 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, > bi.title, bi.biblionumber, i.barcode, i.itype > FROM accountlines al > LEFT JOIN borrowers bo ON (al.borrowernumber = bo.borrowernumber) >@@ -111,6 +111,8 @@ if ($do_it) { > LEFT JOIN branches br ON (br.branchcode = m.branchcode ) > LEFT JOIN items i ON (i.itemnumber = al.itemnumber) > LEFT JOIN biblio bi ON (bi.biblionumber = i.biblionumber) >+ LEFT JOIN account_credit_types act ON (al.credit_type_code = act.code) >+ LEFT JOIN account_debit_types adt ON (al.debit_type_code = adt.code) > WHERE CAST(al.date AS DATE) BETWEEN ? AND ? > $whereTType > $whereBranchCode >@@ -164,7 +166,7 @@ if ($do_it) { > $row->{branchname}, > $row->{date}, > $row->{timestamp}, >- $row->{credit_type_code} || $row->{debit_type_code}, >+ $row->{type_description}, > $row->{note}, > $row->{amount}, > $row->{title}, >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 29271
:
126498
|
126505
|
126548
|
126590
|
126611
|
126612
| 126613 |
126655
|
133084
|
133085
|
133086
|
133087