]> 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)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Thu, 2 Aug 2018 15:32:30 +0000 (16:32 +0100)
commit3572fd14045ddf0d5025c932c23380671d623569
tree85f560d1de790e56acb8c5043ef24be832e924ea
parent665faa45e7178d0fe916125246986f81bc8e1103
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>
(cherry picked from commit 7b6c242d972e3edf5b4d75d6023a0ae1dc9d1f9d)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Koha/Account.pm
t/db_dependent/Koha/Account.t