Bugzilla – Attachment 98104 Details for
Bug 21791
Add payment type on Cash register report (cash_register_stats.pl)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
UNTESTED patch
Bug-21791-Add-payment-type-on-Cash-register-report-c.patch (text/plain), 4.71 KB, created by
Eric Phetteplace
on 2020-01-29 23:46:58 UTC
(
hide
)
Description:
UNTESTED patch
Filename:
MIME Type:
Creator:
Eric Phetteplace
Created:
2020-01-29 23:46:58 UTC
Size:
4.71 KB
patch
obsolete
>From bdb709263b4ecf28bf0d03319cf5ea6a990c33c5 Mon Sep 17 00:00:00 2001 >From: phette23 <phette23@gmail.com> >Date: Wed, 29 Jan 2020 15:45:09 -0800 >Subject: [PATCH] Bug #21791 - Add payment type on Cash register report > (cash_register_stats.pl) > >To test: >- create some accountlines transactions, some of which specify a payment_type > + will need patron accounts to charge fines too etc. >- view the cash register report under Reports > Statistics wizard >- no payment type is listed >- apply patch >- run the report again, payment type column appears alongside transaction type >- export results to CSV, payment type column is included >--- > .../en/includes/csv_headers/reports/cash_register_stats.tt | 2 +- > .../prog/en/modules/reports/cash_register_stats.tt | 4 +++- > reports/cash_register_stats.pl | 4 +++- > 3 files changed, 7 insertions(+), 3 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/csv_headers/reports/cash_register_stats.tt b/koha-tmpl/intranet-tmpl/prog/en/includes/csv_headers/reports/cash_register_stats.tt >index a475c76d6c..3b87704911 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/csv_headers/reports/cash_register_stats.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/csv_headers/reports/cash_register_stats.tt >@@ -1 +1 @@ >-[%- BLOCK -%]Manager name[% sep | html %]Patron cardnumber[% sep | html %]Patron name[% sep | html %]Transaction library[% sep | html %]Transaction date[% sep | html %]Transaction type[% sep |html %]Notes[% sep | html %]Amount[% sep | html %]Title[% sep | html %]Barcode[% sep | html %]Item type[%- END -%] >+[%- BLOCK -%]Manager name[% sep | html %]Patron cardnumber[% sep | html %]Patron name[% sep | html %]Transaction library[% sep | html %]Transaction date[% sep | html %]Transaction type[% sep |html %]Payment type[% sep | html %]Notes[% sep | html %]Amount[% sep | html %]Title[% sep | html %]Barcode[% sep | html %]Item type[%- END -%] >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 cbcc27a056..46e88e629a 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 >@@ -74,7 +74,7 @@ > <option value="[% debit_type.code | html %]">[% debit_type.description | html %]</option> > [% END %] > [% END %] >- >+ > [% FOREACH credit_type IN credit_types %] > [% IF transaction_type == credit_type.code %] > <option value="[% credit_type.code | html %]" selected="selected">[% credit_type.description | html %]</option> >@@ -134,6 +134,7 @@ > <th>Transaction library</th> > <th>Transaction date</th> > <th>Transaction type</th> >+ <th>Payment Type</th> > <th>Notes</th> > <th>Amount</th> > <th>Bibliographic record title</th> >@@ -155,6 +156,7 @@ > [%- PROCESS account_type_description account=loopresul -%] > [% END %] > </td> >+ <td>[% loopresul.payment_type | 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 6fbbbfbf9b..f9d0659e53 100755 >--- a/reports/cash_register_stats.pl >+++ b/reports/cash_register_stats.pl >@@ -99,7 +99,8 @@ if ($do_it) { > SELECT round(amount,2) AS amount, 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.borrowernumber, DATE(al.date) as date, al.credit_type_code, al.debit_type_code, >+ al.payment_type, al.amountoutstanding, al.note, > bi.title, bi.biblionumber, i.barcode, i.itype > FROM accountlines al > LEFT JOIN borrowers bo ON (al.borrowernumber = bo.borrowernumber) >@@ -160,6 +161,7 @@ if ($do_it) { > $row->{date}, > $row->{credit_type}, > $row->{debit_type}, >+ $row->{payment_type}, > $row->{note}, > $row->{amount}, > $row->{title}, >-- >2.25.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 21791
: 98104