Summary: | The VOID method should be updated to respect double-entry accounting | ||
---|---|---|---|
Product: | Koha | Reporter: | Martin Renvoize (ashimema) <martin.renvoize> |
Component: | Fines and fees | Assignee: | Martin Renvoize (ashimema) <martin.renvoize> |
Status: | CLOSED FIXED | QA Contact: | Tomás Cohen Arazi (tcohen) <tomascohen> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | andrew, fridolin.somers, jonathan.druart, kyle, martin.renvoize, tomascohen |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: |
Prior to this patch, the VOID action would reverse payments and set the original credit to '0'.
With this patch, we bring the void action in line with other actions that can take place on the accounts system. The original credit amount is kept for audit purposes, we add a VOID line to the accountlines and offset it against the original credit (so that the amount outstanding is zero) and we reverse all the original offsets the credit may have been made against and record these reversals.
This all helps in future audits and gives additional detail for Koha's other internal processes (Like automated refunds having to discount void payments - See bug 28421)
|
Version(s) released in: |
21.05.00
|
Circulation function: | |||
Bug Depends on: | 24300 | ||
Bug Blocks: | 28664, 27995, 28421, 28663 | ||
Attachments: |
Bug 27971: Update void method to use double entry accounting
Bug 27971: Update void method to use double entry accounting Bug 27971: Enhance unit tests Bug 27971: Update void method to use double entry accounting Bug 27971: Enhance unit tests Bug 27971: Update void method to use double entry accounting Bug 27971: Enhance unit tests Bug 27971: Update void method to use double entry accounting Bug 27971: Enhance unit tests Bug 27971: Update void method to use double entry accounting Bug 27971: Enhance unit tests Bug 27971: Update void method to use double entry accounting Bug 27971: Enhance unit tests |
Description
Martin Renvoize (ashimema)
2021-03-17 08:38:13 UTC
Created attachment 118358 [details] [review] 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. Created attachment 118419 [details] [review] 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 Created attachment 118420 [details] [review] Bug 27971: Enhance unit tests This patch adds some additional unit tests for extra functionality included with this patchset. Test plan 1/ t/db_dependent/Koha/Account/Line.t should pass Created attachment 118422 [details] [review] 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> Created attachment 118423 [details] [review] Bug 27971: Enhance unit tests This patch adds some additional unit tests for extra functionality included with this patchset. Test plan 1/ t/db_dependent/Koha/Account/Line.t should pass Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Created attachment 118504 [details] [review] 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> Created attachment 118505 [details] [review] Bug 27971: Enhance unit tests This patch adds some additional unit tests for extra functionality included with this patchset. Test plan 1/ t/db_dependent/Koha/Account/Line.t should pass Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Rebased Created attachment 118613 [details] [review] 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> Created attachment 118614 [details] [review] Bug 27971: Enhance unit tests This patch adds some additional unit tests for extra functionality included with this patchset. Test plan 1/ t/db_dependent/Koha/Account/Line.t should pass Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Created attachment 118624 [details] [review] 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> Created attachment 118625 [details] [review] Bug 27971: Enhance unit tests This patch adds some additional unit tests for extra functionality included with this patchset. Test plan 1/ t/db_dependent/Koha/Account/Line.t should pass Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Simple change, works as advertised.. The upgrade works as well. Created attachment 119201 [details] [review] 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> Created attachment 119202 [details] [review] Bug 27971: Enhance unit tests This patch adds some additional unit tests for extra functionality included with this patchset. Test plan 1/ t/db_dependent/Koha/Account/Line.t should pass Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Tree re-arranged slightly to put bugs that need backporting before these enhancements that don't. Rebased to accommodate the above. Blocked by bug 27927. Pushed to master for 21.05, thanks to everybody involved! Enhancement not pushed to 20.11.x |