When using the German language (and maybe other languages) and accessing Koha menu "Reports > Cash register" and exporting the output, the resulting CSV file does not contain the newline character, so all records will be in one line which is incorrect. This problem does not appear when using the English language so using the English interface can be used as a workaround.
This is probably due to the translation tools removing \n new lines. There is also a common fix for this we used for other csv exports.
Confirmed in 20.11
I thik 29271 is the culprit, as it removed the explicit newlines: [%- INCLUDE empty_line.inc -%] They are not needed in English, but very much needed for the translated templates, as the translation process removes any new lines...
This appears to work well: [%- USE ItemTypes -%] [%- INCLUDE csv_headers/reports/cash_register_stats.tt -%] [%- INCLUDE empty_line.inc -%] [%- FOREACH row IN rows -%] [%- FOREACH field IN row; field IF !loop.last; ItemTypes.GetDescription(field) IF loop.last; sep IF !loop.last; END -%] [%- INCLUDE empty_line.inc -%] [%- END -%] TOTAL[%- INCLUDE empty_line.inc -%]
Hm, have to check into the total not getting printed (might be our old version, but in case someone wants to do more work here)
*** Bug 30704 has been marked as a duplicate of this bug. ***
Minor correction for the TOTAL line: [%- USE ItemTypes -%] [%- INCLUDE csv_headers/reports/cash_register_stats.tt -%] [%- INCLUDE empty_line.inc -%] [%- FOREACH row IN rows -%] [%- FOREACH field IN row; field IF !loop.last; ItemTypes.GetDescription(field) IF loop.last; sep IF !loop.last; END -%] [%- INCLUDE empty_line.inc -%] [%- END -%] TOTAL[% sep %][%- FOREACH field IN total; field; sep IF !loop.last; END -%]
+1