Bug 22090: Add missing information to cash register CSV file
authorKatrin Fischer <katrin.fischer.83@web.de>
Sun, 7 Apr 2019 18:23:32 +0000 (18:23 +0000)
committerLucas Gass <lucas@bywatersolutions.com>
Fri, 10 May 2019 20:02:04 +0000 (20:02 +0000)
Some information was missing from the CSV export file
of the Cash register report: manager surname, patron surname
and payment notes.

Also pretties up the column headers a bit and makes the
sequence between GUI and CSV export match.

To test:
- Make sure you have some fines and fees and payments in
  your system
- Make a search with the Cash register report
- Export results as CSV
- Proof read hader line and make sure contents match headings
- Verify first name and surname are shown for manager and patron
- Verify notes show up

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 1a2572915b4bf4a11b3a65c3a65e506610263a03)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 5469ae4eea46416410bddaef4934aa1db6e767f9)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

koha-tmpl/intranet-tmpl/prog/en/includes/csv_headers/reports/cash_register_stats.tt
koha-tmpl/intranet-tmpl/prog/en/modules/reports/cash_register_stats.tt
reports/cash_register_stats.pl

index 11ec56b..a475c76 100644 (file)
@@ -1 +1 @@
-[%- BLOCK -%]mfirstname[% sep %]card number[% sep %]firstname[% sep %]branchname[% sep %]date[% sep %]accounttype[% sep %]amount[% sep %]title[% sep %]barcode[% sep %]itype[%- 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 %]Notes[% sep | html %]Amount[% sep | html %]Title[% sep | html %]Barcode[% sep | html %]Item type[%- END -%]
index d38df2f..6a00741 100644 (file)
                     </select>
                 </li>
                 <li>
-                    <label>Transaction branch</label>
+                    <label>Transaction library</label>
                     <select name="branch" id="branch">
                         <option value="ALL">All</option>
                         [% FOREACH branchloo IN branchloop %]
index 0a1ff54..b030f66 100755 (executable)
@@ -143,17 +143,17 @@ if ($do_it) {
         my $format = 'csv';
         my $reportname = $input->param('basename');
         my $reportfilename = $reportname ? "$reportname.$format" : "reportresults.$format" ;
-        #my $reportfilename = "$reportname.html" ;
         my $delimiter = C4::Context->preference('delimiter') || ',';
             my @rows;
             foreach my $row (@loopresult) {
                 my @rowValues;
-                push @rowValues, $row->{mfirstname},
+                push @rowValues, $row->{mfirstname}. ' ' . $row->{msurname},
                         $row->{cardnumber},
-                        $row->{bfirstname},
+                        $row->{bfirstname} . ' ' . $row->{bsurname},
                         $row->{branchname},
                         $row->{date},
                         $row->{accounttype},
+                        $row->{note},
                         $row->{amount},
                         $row->{title},
                         $row->{barcode},