[Koha-bugs] [Bug 6427] Rewrite of the accounts system

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Sep 19 18:44:19 CEST 2014


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6427

Kyle M Hall <kyle at bywatersolutions.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #31477|0                           |1
        is obsolete|                            |
  Attachment #31478|0                           |1
        is obsolete|                            |
  Attachment #31479|0                           |1
        is obsolete|                            |
  Attachment #31480|0                           |1
        is obsolete|                            |
  Attachment #31481|0                           |1
        is obsolete|                            |
  Attachment #31482|0                           |1
        is obsolete|                            |
  Attachment #31483|0                           |1
        is obsolete|                            |
  Attachment #31484|0                           |1
        is obsolete|                            |
  Attachment #31485|0                           |1
        is obsolete|                            |
  Attachment #31486|0                           |1
        is obsolete|                            |
  Attachment #31487|0                           |1
        is obsolete|                            |
  Attachment #31488|0                           |1
        is obsolete|                            |

--- Comment #498 from Kyle M Hall <kyle at bywatersolutions.com> ---
Created attachment 31754
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=31754&action=edit
Bug 6427 - Update database

This patch set re-engineers Koha's accounting system to be faster, more
stable, and have a better historical accounting of fees and payments
while also unifying much of the payment logic and simplifying the code
behind it.

Three new tables have been created:
account_debits stores fines and fees owed by the patron.

account_credits stores payments, write-offs, and other line items that
reduce the amount owed by a patron.

account_offsets stores data about changes to debits and credits,
including which credits paid which debits.

borrowers.account_balance stores the current balance of the
patron, so it does not have to be calculated each time it needs to be
displayed.

issues.issue_id has been added so that individual fines can be directly
linked to the issue that caused them without ambiguity.

The various accounting code strings ( F, FU, Rent, etc ), some of which
have little or no documentation have been replaced by what enumerated
data types which are documented via POD.
There are three, one for each of Debits ( fees/fines ), Credits ( payments ),
and Offsets.

The system continues to allow custom fee types ( moving MANUAL_INV to
MANUAL_DEBIT )
while additionally allowing custom payment types ( MANUAL_CREDIT ).

The system also allows for overpayment, the the outstanding credit being
applied to future fees as they are created.

The system also allows for a librarian to accept a different amount of
money than what is to be paid, and will calculate the change to be
given.

Test Plan:
1) Apply this patch
2) Create some manual fees
3) Test the fee payments
   * Pay one fee
   * Pay multiple fees
   * Make a partial payment
   * Write off a fee
4) View the fees/payments, verify they are correct
5) Check out some items as overdue that should have fines
6) Run fines.pl, verify fines were generated
7) Pay on an accruing fine
8) Run fines.pl again, verify the fine hasn't changed
9) Increase the daily fine in issuing rules
10) Run fines.pl again, verify the fine has increased
11) Decrease the daily fine in issuing rules
12) Run fines.pl again, verify the fine has decreased
13) Test dropbox mode
14) Test WhenLostChargeReplacementFee both ways
15) Test RefundLostItemFeeOnReturn both ways
16) Test WhenLostForgiveFine both ways
17) Test CalculateFinesOnReturn both ways

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are watching all bug changes.


More information about the Koha-bugs mailing list