Bug 14826 - Resurrect account offsets table
Summary: Resurrect account offsets table
Status: Signed Off
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement with 22 votes (vote)
Assignee: Kyle M Hall
QA Contact: Testopia
URL:
Whiteboard:
Keywords:
: 16902 (view as bug list)
Depends on: 15894
Blocks: 14825 15273 15985 18786 19036
  Show dependency treegraph
 
Reported: 2015-09-15 15:09 UTC by Kyle M Hall
Modified: 2017-08-11 19:13 UTC (History)
12 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Bug 14826 - Update database (3.46 KB, patch)
2016-07-12 16:37 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 14826 - Update table schema (8.05 KB, patch)
2016-07-12 16:37 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 14826 - Add Koha modules for offsets (3.08 KB, patch)
2016-07-12 16:37 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 14826 - Resurrect account offsets table (20.04 KB, patch)
2016-07-12 16:37 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 14826 - Resurrect account offsets table (26.65 KB, patch)
2016-07-12 17:37 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 14826 - Resurrect account offsets table (27.44 KB, patch)
2016-07-12 17:46 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 14826 - Update database (3.46 KB, patch)
2016-07-21 18:45 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 14826 - Update table schema (8.05 KB, patch)
2016-07-21 18:45 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 14826 - Add Koha modules for offsets (3.08 KB, patch)
2016-07-21 18:45 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 14826 - Resurrect account offsets table (28.58 KB, patch)
2016-07-21 18:45 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 14826 - Unit Tests (16.81 KB, patch)
2016-07-21 18:45 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 14826 - Unit Tests (5.27 KB, patch)
2016-07-21 19:04 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 14826 - Update database (3.46 KB, patch)
2017-01-19 14:43 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 14826 - Add Koha modules for offsets (3.08 KB, patch)
2017-01-19 14:43 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 14826 - Resurrect account offsets table (23.54 KB, patch)
2017-01-19 14:43 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 14826 - Unit Tests (5.40 KB, patch)
2017-01-19 14:43 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 14826 - Update table schemas (6.97 KB, patch)
2017-01-19 14:44 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 14826 - Update database (3.46 KB, patch)
2017-02-15 16:25 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 14826 - Add Koha modules for offsets (3.08 KB, patch)
2017-02-15 16:25 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 14826 - Resurrect account offsets table (23.53 KB, patch)
2017-02-15 16:25 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 14826 - Unit Tests (5.40 KB, patch)
2017-02-15 16:25 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 14826 - Remove old offset table schema file (2.62 KB, patch)
2017-02-15 16:25 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 14826 - Add new offset table schema file (3.14 KB, patch)
2017-02-15 16:25 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 14826 - Update existing schema files (2.86 KB, patch)
2017-02-15 16:25 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 14826 - Add offset for rental fees (1.95 KB, patch)
2017-02-15 16:25 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 14826 - Add offset for rental fees (1.95 KB, patch)
2017-02-15 16:29 UTC, Kyle M Hall
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 14826 - Update database (3.52 KB, patch)
2017-02-19 21:01 UTC, Josef Moravec
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 14826 - Add Koha modules for offsets (3.15 KB, patch)
2017-02-19 21:01 UTC, Josef Moravec
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 14826 - Resurrect account offsets table (23.60 KB, patch)
2017-02-19 21:01 UTC, Josef Moravec
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 14826 - Unit Tests (5.46 KB, patch)
2017-02-19 21:01 UTC, Josef Moravec
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 14826 - Remove old offset table schema file (2.68 KB, patch)
2017-02-19 21:02 UTC, Josef Moravec
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 14826 - Add new offset table schema file (3.21 KB, patch)
2017-02-19 21:02 UTC, Josef Moravec
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 14826 - Update existing schema files (2.93 KB, patch)
2017-02-19 21:02 UTC, Josef Moravec
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 14826 - Add offset for rental fees (2.02 KB, patch)
2017-02-19 21:02 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 14826 - Update database (3.51 KB, patch)
2017-06-06 13:36 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 14826 - Add Koha modules for offsets (3.14 KB, patch)
2017-06-06 13:37 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 14826 - Resurrect account offsets table (23.59 KB, patch)
2017-06-06 13:37 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 14826 - Unit Tests (5.41 KB, patch)
2017-06-06 13:37 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 14826 - Remove old offset table schema file (2.67 KB, patch)
2017-06-06 13:37 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 14826 - Add new offset table schema file (3.20 KB, patch)
2017-06-06 13:37 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 14826 - Add offset for rental fees (2.01 KB, patch)
2017-06-06 13:37 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 14826 - Add unit tests for _FixAccountForLostAndReturned and _FixOverduesOnReturn (5.40 KB, patch)
2017-06-06 13:37 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 14826 - Update existing schema files (2.86 KB, patch)
2017-06-06 13:37 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 14826 - Update database (3.51 KB, patch)
2017-06-12 16:59 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 14826 - Add Koha modules for offsets (3.14 KB, patch)
2017-06-12 16:59 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 14826 - Resurrect account offsets table (23.60 KB, patch)
2017-06-12 16:59 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 14826 - Unit Tests (5.41 KB, patch)
2017-06-12 16:59 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 14826 - Remove old offset table schema file (2.67 KB, patch)
2017-06-12 17:00 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 14826 - Add new offset table schema file (3.20 KB, patch)
2017-06-12 17:00 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 14826 - Add offset for rental fees (2.01 KB, patch)
2017-06-12 17:00 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 14826 - Add unit tests for _FixAccountForLostAndReturned and _FixOverduesOnReturn (5.40 KB, patch)
2017-06-12 17:00 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 14826 - Update existing schema files (2.86 KB, patch)
2017-06-12 17:00 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 14826 - Update database (3.51 KB, patch)
2017-08-03 14:04 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 14826 - Add Koha modules for offsets (3.14 KB, patch)
2017-08-03 14:04 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 14826 - Resurrect account offsets table (23.61 KB, patch)
2017-08-03 14:04 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 14826 - Unit Tests (5.41 KB, patch)
2017-08-03 14:04 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 14826 - Remove old offset table schema file (2.67 KB, patch)
2017-08-03 14:04 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 14826 - Add new offset table schema file (3.20 KB, patch)
2017-08-03 14:04 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 14826 - Add offset for rental fees (2.01 KB, patch)
2017-08-03 14:04 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 14826 - Add unit tests for _FixAccountForLostAndReturned and _FixOverduesOnReturn (5.83 KB, patch)
2017-08-03 14:04 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 14826 - Update existing schema files (2.86 KB, patch)
2017-08-03 14:04 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 14826 - Update database (3.51 KB, patch)
2017-08-08 14:38 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 14826 - Add Koha modules for offsets (3.14 KB, patch)
2017-08-08 14:38 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 14826 - Resurrect account offsets table (23.61 KB, patch)
2017-08-08 14:39 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 14826 - Unit Tests (5.29 KB, patch)
2017-08-08 14:39 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 14826 - Remove old offset table schema file (2.67 KB, patch)
2017-08-08 14:39 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 14826 - Add new offset table schema file (3.20 KB, patch)
2017-08-08 14:39 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 14826 - Add offset for rental fees (2.01 KB, patch)
2017-08-08 14:39 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 14826 - Add unit tests for _FixAccountForLostAndReturned and _FixOverduesOnReturn (5.83 KB, patch)
2017-08-08 14:39 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 14826 - Update existing schema files (2.86 KB, patch)
2017-08-08 14:39 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 14826 [QA Followup] - Fix minor issues with unit tests (1.40 KB, patch)
2017-08-08 14:39 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 14826 [QA Followup] - Only use plural modules in other modules (1.95 KB, patch)
2017-08-08 14:39 UTC, Kyle M Hall
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Kyle M Hall 2015-09-15 15:09:04 UTC
The account offsets table should be used to track increments and decrements of fines via payments and credits, as well as fine accruals. It should be able to match fees to payments and visa versa, so we can know which fee was paid by a given payment, and which payments applied to a given fee.
Comment 1 Claudio 2015-12-03 13:00:21 UTC
Resolve this bug opens many oportunities of enhancements that are being waiting by the librarian communitiy.
Comment 2 Kyle M Hall 2016-07-12 13:26:08 UTC
*** Bug 16902 has been marked as a duplicate of this bug. ***
Comment 3 Kyle M Hall 2016-07-12 16:37:35 UTC Comment hidden (obsolete)
Comment 4 Kyle M Hall 2016-07-12 16:37:42 UTC Comment hidden (obsolete)
Comment 5 Kyle M Hall 2016-07-12 16:37:44 UTC Comment hidden (obsolete)
Comment 6 Kyle M Hall 2016-07-12 16:37:47 UTC Comment hidden (obsolete)
Comment 7 Kyle M Hall 2016-07-12 17:37:17 UTC Comment hidden (obsolete)
Comment 8 Kyle M Hall 2016-07-12 17:46:14 UTC Comment hidden (obsolete)
Comment 9 Kyle M Hall 2016-07-12 17:47:22 UTC
Setting back to assigned until I can write some unit tests.
Comment 10 Kyle M Hall 2016-07-21 18:45:12 UTC
Created attachment 53602 [details] [review]
Bug 14826 - Update database
Comment 11 Kyle M Hall 2016-07-21 18:45:21 UTC
Created attachment 53603 [details] [review]
Bug 14826 - Update table schema
Comment 12 Kyle M Hall 2016-07-21 18:45:23 UTC
Created attachment 53604 [details] [review]
Bug 14826 - Add Koha modules for offsets
Comment 13 Kyle M Hall 2016-07-21 18:45:26 UTC
Created attachment 53605 [details] [review]
Bug 14826 - Resurrect account offsets table

The account offsets table should be used to track increments and
decrements of fines via payments and credits, as well as fine accruals.
It should be able to match fees to payments and visa versa, so we can
know which fee was paid by a given payment, and which payments applied
to a given fee.

Test Plan:
1) Apply this patch
2) Run updatedatabase
3) Note the table accountoffsets has been renamed to account_offsets
4) Ensure fine generation creates offsets
5) Ensure creating a manual invoice creates an offset
6) Ensure a lost item charge creates an offset
7) Ensure Reverse Payment creates an offset
8) Ensure a payment creates an offset
9) Ensure a payment for multiple fees creates an offset for each
10) Ensure writeoffs create offsets
Comment 14 Kyle M Hall 2016-07-21 18:45:28 UTC Comment hidden (obsolete)
Comment 15 Kyle M Hall 2016-07-21 19:04:46 UTC
Created attachment 53607 [details] [review]
Bug 14826 - Unit Tests
Comment 16 Aleisha Amohia 2016-08-23 03:05:54 UTC
fatal: sha1 information is lacking or useless (C4/Accounts.pm)
Comment 17 Kyle M Hall 2017-01-19 14:43:42 UTC
Created attachment 59254 [details] [review]
Bug 14826 - Update database
Comment 18 Kyle M Hall 2017-01-19 14:43:50 UTC
Created attachment 59255 [details] [review]
Bug 14826 - Add Koha modules for offsets
Comment 19 Kyle M Hall 2017-01-19 14:43:53 UTC
Created attachment 59256 [details] [review]
Bug 14826 - Resurrect account offsets table

The account offsets table should be used to track increments and
decrements of fines via payments and credits, as well as fine accruals.
It should be able to match fees to payments and visa versa, so we can
know which fee was paid by a given payment, and which payments applied
to a given fee.

Test Plan:
1) Apply this patch
2) Run updatedatabase
3) Note the table accountoffsets has been renamed to account_offsets
4) Ensure fine generation creates offsets
5) Ensure creating a manual invoice creates an offset
6) Ensure a lost item charge creates an offset
7) Ensure Reverse Payment creates an offset
8) Ensure a payment creates an offset
9) Ensure a payment for multiple fees creates an offset for each
10) Ensure writeoffs create offsets
Comment 20 Kyle M Hall 2017-01-19 14:43:56 UTC
Created attachment 59257 [details] [review]
Bug 14826 - Unit Tests
Comment 21 Kyle M Hall 2017-01-19 14:44:00 UTC
Created attachment 59258 [details] [review]
Bug 14826 - Update table schemas
Comment 22 Josef Moravec 2017-01-23 21:32:17 UTC
Looks good, just when I check out an item with type with defined charge, this charge doesn't make line in acount_offsets.
Comment 23 Kyle M Hall 2017-02-15 16:25:08 UTC
Created attachment 60270 [details] [review]
Bug 14826 - Update database
Comment 24 Kyle M Hall 2017-02-15 16:25:17 UTC
Created attachment 60271 [details] [review]
Bug 14826 - Add Koha modules for offsets
Comment 25 Kyle M Hall 2017-02-15 16:25:20 UTC
Created attachment 60272 [details] [review]
Bug 14826 - Resurrect account offsets table

The account offsets table should be used to track increments and
decrements of fines via payments and credits, as well as fine accruals.
It should be able to match fees to payments and visa versa, so we can
know which fee was paid by a given payment, and which payments applied
to a given fee.

Test Plan:
1) Apply this patch
2) Run updatedatabase
3) Note the table accountoffsets has been renamed to account_offsets
4) Ensure fine generation creates offsets
5) Ensure creating a manual invoice creates an offset
6) Ensure a lost item charge creates an offset
7) Ensure Reverse Payment creates an offset
8) Ensure a payment creates an offset
9) Ensure a payment for multiple fees creates an offset for each
10) Ensure writeoffs create offsets
Comment 26 Kyle M Hall 2017-02-15 16:25:24 UTC
Created attachment 60273 [details] [review]
Bug 14826 - Unit Tests
Comment 27 Kyle M Hall 2017-02-15 16:25:28 UTC
Created attachment 60274 [details] [review]
Bug 14826 - Remove old offset table schema file
Comment 28 Kyle M Hall 2017-02-15 16:25:31 UTC
Created attachment 60275 [details] [review]
Bug 14826 - Add new offset table schema file
Comment 29 Kyle M Hall 2017-02-15 16:25:35 UTC
Created attachment 60276 [details] [review]
Bug 14826 - Update existing schema files
Comment 30 Kyle M Hall 2017-02-15 16:25:39 UTC
Created attachment 60277 [details] [review]
Bug 14826 - Add offset for rental fees
Comment 31 Kyle M Hall 2017-02-15 16:29:50 UTC
Created attachment 60278 [details] [review]
Bug 14826 - Add offset for rental fees
Comment 32 Josef Moravec 2017-02-19 21:01:25 UTC
Created attachment 60439 [details] [review]
[SIGNED-OFF] Bug 14826 - Update database

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 33 Josef Moravec 2017-02-19 21:01:32 UTC
Created attachment 60440 [details] [review]
[SIGNED-OFF] Bug 14826 - Add Koha modules for offsets

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 34 Josef Moravec 2017-02-19 21:01:46 UTC
Created attachment 60441 [details] [review]
[SIGNED-OFF] Bug 14826 - Resurrect account offsets table

The account offsets table should be used to track increments and
decrements of fines via payments and credits, as well as fine accruals.
It should be able to match fees to payments and visa versa, so we can
know which fee was paid by a given payment, and which payments applied
to a given fee.

Test Plan:
1) Apply this patch
2) Run updatedatabase
3) Note the table accountoffsets has been renamed to account_offsets
4) Ensure fine generation creates offsets
5) Ensure creating a manual invoice creates an offset
6) Ensure a lost item charge creates an offset
7) Ensure Reverse Payment creates an offset
8) Ensure a payment creates an offset
9) Ensure a payment for multiple fees creates an offset for each
10) Ensure writeoffs create offsets

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 35 Josef Moravec 2017-02-19 21:01:54 UTC
Created attachment 60442 [details] [review]
[SIGNED-OFF] Bug 14826 - Unit Tests

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 36 Josef Moravec 2017-02-19 21:02:01 UTC
Created attachment 60443 [details] [review]
[SIGNED-OFF] Bug 14826 - Remove old offset table schema file

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 37 Josef Moravec 2017-02-19 21:02:08 UTC
Created attachment 60444 [details] [review]
[SIGNED-OFF] Bug 14826 - Add new offset table schema file

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 38 Josef Moravec 2017-02-19 21:02:14 UTC
Created attachment 60445 [details] [review]
[SIGNED-OFF] Bug 14826 - Update existing schema files

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 39 Josef Moravec 2017-02-19 21:02:22 UTC
Created attachment 60446 [details] [review]
[SIGNED-OFF] Bug 14826 - Add offset for rental fees

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 40 Jonathan Druart 2017-03-30 19:25:02 UTC
What would be a test plan for the 2 calls to _FixAccountForLostAndReturned in AddIssue and AddReturn?
It would be good to have tests to cover these 2 changes.

Same for _FixOverduesOnReturn
Comment 41 Kyle M Hall 2017-06-06 13:36:57 UTC
Created attachment 64051 [details] [review]
Bug 14826 - Update database

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 42 Kyle M Hall 2017-06-06 13:37:07 UTC
Created attachment 64052 [details] [review]
Bug 14826 - Add Koha modules for offsets

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 43 Kyle M Hall 2017-06-06 13:37:12 UTC
Created attachment 64053 [details] [review]
Bug 14826 - Resurrect account offsets table

The account offsets table should be used to track increments and
decrements of fines via payments and credits, as well as fine accruals.
It should be able to match fees to payments and visa versa, so we can
know which fee was paid by a given payment, and which payments applied
to a given fee.

Test Plan:
1) Apply this patch
2) Run updatedatabase
3) Note the table accountoffsets has been renamed to account_offsets
4) Ensure fine generation creates offsets
5) Ensure creating a manual invoice creates an offset
6) Ensure a lost item charge creates an offset
7) Ensure Reverse Payment creates an offset
8) Ensure a payment creates an offset
9) Ensure a payment for multiple fees creates an offset for each
10) Ensure writeoffs create offsets

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 44 Kyle M Hall 2017-06-06 13:37:16 UTC
Created attachment 64054 [details] [review]
Bug 14826 - Unit Tests

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 45 Kyle M Hall 2017-06-06 13:37:20 UTC
Created attachment 64055 [details] [review]
Bug 14826 - Remove old offset table schema file

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 46 Kyle M Hall 2017-06-06 13:37:24 UTC
Created attachment 64056 [details] [review]
Bug 14826 - Add new offset table schema file

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 47 Kyle M Hall 2017-06-06 13:37:28 UTC
Created attachment 64057 [details] [review]
Bug 14826 - Add offset for rental fees

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 48 Kyle M Hall 2017-06-06 13:37:32 UTC
Created attachment 64058 [details] [review]
Bug 14826 - Add unit tests for _FixAccountForLostAndReturned and _FixOverduesOnReturn
Comment 49 Kyle M Hall 2017-06-06 13:37:36 UTC
Created attachment 64059 [details] [review]
Bug 14826 - Update existing schema files
Comment 50 Kyle M Hall 2017-06-06 13:38:38 UTC
Good idea, here they are!

(In reply to Jonathan Druart from comment #40)
> What would be a test plan for the 2 calls to _FixAccountForLostAndReturned
> in AddIssue and AddReturn?
> It would be good to have tests to cover these 2 changes.
> 
> Same for _FixOverduesOnReturn
Comment 51 Kyle M Hall 2017-06-12 16:59:39 UTC
Created attachment 64217 [details] [review]
Bug 14826 - Update database

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 52 Kyle M Hall 2017-06-12 16:59:48 UTC
Created attachment 64220 [details] [review]
Bug 14826 - Add Koha modules for offsets

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 53 Kyle M Hall 2017-06-12 16:59:52 UTC
Created attachment 64222 [details] [review]
Bug 14826 - Resurrect account offsets table

The account offsets table should be used to track increments and
decrements of fines via payments and credits, as well as fine accruals.
It should be able to match fees to payments and visa versa, so we can
know which fee was paid by a given payment, and which payments applied
to a given fee.

Test Plan:
1) Apply this patch
2) Run updatedatabase
3) Note the table accountoffsets has been renamed to account_offsets
4) Ensure fine generation creates offsets
5) Ensure creating a manual invoice creates an offset
6) Ensure a lost item charge creates an offset
7) Ensure Reverse Payment creates an offset
8) Ensure a payment creates an offset
9) Ensure a payment for multiple fees creates an offset for each
10) Ensure writeoffs create offsets

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 54 Kyle M Hall 2017-06-12 16:59:56 UTC
Created attachment 64223 [details] [review]
Bug 14826 - Unit Tests

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 55 Kyle M Hall 2017-06-12 17:00:01 UTC
Created attachment 64224 [details] [review]
Bug 14826 - Remove old offset table schema file

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 56 Kyle M Hall 2017-06-12 17:00:06 UTC
Created attachment 64225 [details] [review]
Bug 14826 - Add new offset table schema file

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 57 Kyle M Hall 2017-06-12 17:00:10 UTC
Created attachment 64226 [details] [review]
Bug 14826 - Add offset for rental fees

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 58 Kyle M Hall 2017-06-12 17:00:16 UTC
Created attachment 64227 [details] [review]
Bug 14826 - Add unit tests for _FixAccountForLostAndReturned and _FixOverduesOnReturn
Comment 59 Kyle M Hall 2017-06-12 17:00:20 UTC
Created attachment 64228 [details] [review]
Bug 14826 - Update existing schema files
Comment 60 Kyle M Hall 2017-08-03 14:04:04 UTC
Created attachment 65459 [details] [review]
Bug 14826 - Update database

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 61 Kyle M Hall 2017-08-03 14:04:13 UTC
Created attachment 65460 [details] [review]
Bug 14826 - Add Koha modules for offsets

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 62 Kyle M Hall 2017-08-03 14:04:18 UTC
Created attachment 65461 [details] [review]
Bug 14826 - Resurrect account offsets table

The account offsets table should be used to track increments and
decrements of fines via payments and credits, as well as fine accruals.
It should be able to match fees to payments and visa versa, so we can
know which fee was paid by a given payment, and which payments applied
to a given fee.

Test Plan:
1) Apply this patch
2) Run updatedatabase
3) Note the table accountoffsets has been renamed to account_offsets
4) Ensure fine generation creates offsets
5) Ensure creating a manual invoice creates an offset
6) Ensure a lost item charge creates an offset
7) Ensure Reverse Payment creates an offset
8) Ensure a payment creates an offset
9) Ensure a payment for multiple fees creates an offset for each
10) Ensure writeoffs create offsets

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 63 Kyle M Hall 2017-08-03 14:04:22 UTC
Created attachment 65462 [details] [review]
Bug 14826 - Unit Tests

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 64 Kyle M Hall 2017-08-03 14:04:26 UTC
Created attachment 65463 [details] [review]
Bug 14826 - Remove old offset table schema file

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 65 Kyle M Hall 2017-08-03 14:04:31 UTC
Created attachment 65464 [details] [review]
Bug 14826 - Add new offset table schema file

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 66 Kyle M Hall 2017-08-03 14:04:35 UTC
Created attachment 65465 [details] [review]
Bug 14826 - Add offset for rental fees

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 67 Kyle M Hall 2017-08-03 14:04:39 UTC
Created attachment 65466 [details] [review]
Bug 14826 - Add unit tests for _FixAccountForLostAndReturned and _FixOverduesOnReturn
Comment 68 Kyle M Hall 2017-08-03 14:04:43 UTC
Created attachment 65467 [details] [review]
Bug 14826 - Update existing schema files
Comment 69 Kyle M Hall 2017-08-08 14:38:45 UTC
Created attachment 65642 [details] [review]
Bug 14826 - Update database

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 70 Kyle M Hall 2017-08-08 14:38:55 UTC
Created attachment 65643 [details] [review]
Bug 14826 - Add Koha modules for offsets

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 71 Kyle M Hall 2017-08-08 14:39:00 UTC
Created attachment 65644 [details] [review]
Bug 14826 - Resurrect account offsets table

The account offsets table should be used to track increments and
decrements of fines via payments and credits, as well as fine accruals.
It should be able to match fees to payments and visa versa, so we can
know which fee was paid by a given payment, and which payments applied
to a given fee.

Test Plan:
1) Apply this patch
2) Run updatedatabase
3) Note the table accountoffsets has been renamed to account_offsets
4) Ensure fine generation creates offsets
5) Ensure creating a manual invoice creates an offset
6) Ensure a lost item charge creates an offset
7) Ensure Reverse Payment creates an offset
8) Ensure a payment creates an offset
9) Ensure a payment for multiple fees creates an offset for each
10) Ensure writeoffs create offsets

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 72 Kyle M Hall 2017-08-08 14:39:05 UTC
Created attachment 65645 [details] [review]
Bug 14826 - Unit Tests

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 73 Kyle M Hall 2017-08-08 14:39:10 UTC
Created attachment 65646 [details] [review]
Bug 14826 - Remove old offset table schema file

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 74 Kyle M Hall 2017-08-08 14:39:15 UTC
Created attachment 65647 [details] [review]
Bug 14826 - Add new offset table schema file

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 75 Kyle M Hall 2017-08-08 14:39:19 UTC
Created attachment 65648 [details] [review]
Bug 14826 - Add offset for rental fees

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 76 Kyle M Hall 2017-08-08 14:39:24 UTC
Created attachment 65649 [details] [review]
Bug 14826 - Add unit tests for _FixAccountForLostAndReturned and _FixOverduesOnReturn
Comment 77 Kyle M Hall 2017-08-08 14:39:29 UTC
Created attachment 65650 [details] [review]
Bug 14826 - Update existing schema files
Comment 78 Kyle M Hall 2017-08-08 14:39:33 UTC
Created attachment 65651 [details] [review]
Bug 14826 [QA Followup] - Fix minor issues with unit tests
Comment 79 Kyle M Hall 2017-08-08 14:39:38 UTC
Created attachment 65652 [details] [review]
Bug 14826 [QA Followup] - Only use plural modules in other modules