]> 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)
committerKyle Hall <kyle@bywatersolutions.com>
Fri, 22 Oct 2021 15:27:40 +0000 (11:27 -0400)
commite76bf769945ff391820b212308ac2404ba2b925d
treeed4bbd0a8b5822d5f7939c459f87a1d4d2367c9c
parente559c868dcbde7dac52dcda2bd73a4124770691c
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: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
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