Bug 22512 - accountlines.accountype mixes 'state' and 'type'
Summary: accountlines.accountype mixes 'state' and 'type'
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Martin Renvoize
QA Contact: Tomás Cohen Arazi
URL:
Keywords:
Depends on: 22518
Blocks: 8338 22600
  Show dependency treegraph
 
Reported: 2019-03-14 11:13 UTC by Martin Renvoize
Modified: 2019-07-19 09:25 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:
19.05.00


Attachments
Bug 22512: Add status field to accountlines (1.83 KB, patch)
2019-03-15 13:55 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 22512: Add status field to accountlines (1.90 KB, patch)
2019-03-15 17:56 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 22512: Add status field to accountlines (1.94 KB, patch)
2019-03-22 14:11 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Renvoize 2019-03-14 11:13:48 UTC
Currently the accountlines.accounttype field is used to denote both the 'type' of a credit or debit and often mixes in it's 'state'. This is bad design and leads to superflous 'types' in reality.

Examples:
* 'FU' (fine "updating") becomes 'F' (fine) once it's 'fixed'.
* 'FU' (fine "updating") may become 'FFOR' (fine "forgiven").
* 'L' (lost item) may become 'LR' (lost returned).
* 'Rep' (replaced?) may become 'LR' (lost returned).
* 'W' (writeoff) may become 'LR' (lost returned).


These type+state mixes can lead to confusion in both code and end user facing messages.
Comment 1 Martin Renvoize 2019-03-14 11:30:32 UTC
As bug 22511 also highlights.. this state mixing is also present for all the 'credit' types as they can go from any type to 'VOID'
Comment 2 Martin Renvoize 2019-03-15 13:55:24 UTC
Created attachment 86673 [details] [review]
Bug 22512: Add status field to accountlines

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 3 Martin Renvoize 2019-03-15 14:52:16 UTC
*** Bug 22510 has been marked as a duplicate of this bug. ***
Comment 4 Kyle M Hall 2019-03-15 17:56:46 UTC
Created attachment 86684 [details] [review]
Bug 22512: Add status field to accountlines

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 5 Tomás Cohen Arazi 2019-03-22 14:11:16 UTC
Created attachment 86910 [details] [review]
Bug 22512: Add status field to accountlines

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 6 Nick Clemens 2019-04-10 20:14:00 UTC
Awesome work all!

Pushed to master for 19.05
Comment 7 Martin Renvoize 2019-04-15 10:55:49 UTC
Enhancement will not be backported to 18.11.x series.
Comment 8 Martin Renvoize 2019-07-19 09:24:09 UTC
*** Bug 22510 has been marked as a duplicate of this bug. ***