]> git.koha-community.org Git - koha.git/commit
Bug 27971: Update void method to use double entry accounting
authorMartin Renvoize <martin.renvoize@ptfs-europe.com>
Wed, 17 Mar 2021 09:10:17 +0000 (09:10 +0000)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 23 Apr 2021 09:58:49 +0000 (11:58 +0200)
commit35d1c7c41c93e9419ca39ad3d710c64202c309d3
tree661f0b5b583101a08e086e6ae238b5429926cc53
parent91775dc298e38c4b992f07ba9a6469534ae5edca
Bug 27971: Update void method to use double entry accounting

This patch adds double-entry accounting to the Koha::Account::Line->void method.

This results in the addition of a VOID debit type line that is offset
against the original credit type line that is being voided. This allows
us to accurately record when the void took place, at what branch and by
whome the void was triggered.

Test plan
1/ Apply the database update
2/ Add some debts to a borrower account
3/ Pay those debts
4/ Void the payment
5/ A new 'VOID' line should appear on the account for the full amount of
the original payment.
6/ Payments should have all been reversed
7/ t/db_dependent/Koha/Account/Line.t should still pass
8/ Signoff

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Koha/Account/Line.pm
Koha/Item.pm
installer/data/mysql/atomicupdate/bug_27971.perl [new file with mode: 0644]
installer/data/mysql/mandatory/account_debit_types.sql
installer/data/mysql/mandatory/account_offset_types.sql
members/boraccount.pl
t/db_dependent/Koha/Account/Line.t