]> git.koha-community.org Git - koha.git/commit
Bug 29271: Fix cash register report results
authorNick Clemens <nick@bywatersolutions.com>
Tue, 19 Oct 2021 13:03:07 +0000 (13:03 +0000)
committerVictor Grousset/tuxayo <victor@tuxayo.net>
Fri, 6 May 2022 00:18:07 +0000 (02:18 +0200)
commit0d475c1c1c490543cd098bdc64a82d7f0026a84e
treed8c223a4d6a6fa5f4b2fd47e4ec935d92c92b669
parent4dc43730cba4e3a384fcaa3c426d393b66f4776c
Bug 29271: Fix cash register report results

This patch changes accounts.inc to use the credit/debit type codes directly
rather than needlessly fetching the credit_type/debit_type object jsut to get
the code. This allows the BLOCK to work on non-object lines

We also only pass a debit or credit type to csv (accountline cannot be both)

empty-line.inc is also removed in favor of correcting the markup

one more column added to total line

To test:
1 - Add some debits and credits to accounts
2 - Browse to Reports->Cash register
3 - Select transaction type 'All transactions'
4 - Output to screen
5 - Run report
6 - Note transaction types column is empty
7 - Output to a file
8 - Run report
9 - Open file and note:
      amount column is out of place
      extra line before total
10 - Apply patch
11 - Repeat and note display and export are correct

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
koha-tmpl/intranet-tmpl/prog/en/includes/accounts.inc
koha-tmpl/intranet-tmpl/prog/en/modules/reports/cash_register_stats.tt
koha-tmpl/intranet-tmpl/prog/en/modules/reports/csv/cash_register_stats.tt
koha-tmpl/opac-tmpl/bootstrap/en/includes/accounts.inc
reports/cash_register_stats.pl