]> git.koha-community.org Git - koha.git/commit
Bug 20980: (follow-up) Only use UpdateStats for 'payment' and 'writeoff'
authorTomas Cohen Arazi <tomascohen@theke.io>
Fri, 22 Jun 2018 15:24:33 +0000 (12:24 -0300)
committerNick Clemens <nick@bywatersolutions.com>
Fri, 6 Jul 2018 12:50:07 +0000 (12:50 +0000)
commit7b6c242d972e3edf5b4d75d6023a0ae1dc9d1f9d
treecc6b8916eef711fb09aeba309e36c4983df92a8e
parentcc30dc39bf3c8f627865c1a4891fac534266dc03
Bug 20980: (follow-up) Only use UpdateStats for 'payment' and 'writeoff'

This patch makes Koha::Account::add_credit record statistics logs
(through C4::Stats::UpdateStats) only for the 'payment' and 'writeoff'
credit types.

Both credit types are whitelisted in UpdateStats, so we keep the current
behaviour. Another option would've been to add new account types to the
white list, but with the account offsets it seems that using the
statistics table for account changes won't be useful for too long, as
offsets contain the same (and more) information.

To test:
- Apply the patch
- Run:
  $ kshell
 k$ prove t/db_dependent/Koha/Account.t
=> SUCCESS: Tests pass!
- Sign off :-D

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Koha/Account.pm
t/db_dependent/Koha/Account.t