Bug 22512

Summary: accountlines.accountype mixes 'state' and 'type'
Product: Koha Reporter: Martin Renvoize <martin.renvoize>
Component: Architecture, internals, and plumbingAssignee: Martin Renvoize <martin.renvoize>
Status: CLOSED FIXED QA Contact: Tomás Cohen Arazi <tomascohen>
Severity: enhancement    
Priority: P5 - low CC: josef.moravec, katrin.fischer, kyle, nick, tomascohen
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
19.05.00
Bug Depends on: 22518    
Bug Blocks: 8338, 22600    
Attachments: Bug 22512: Add status field to accountlines
Bug 22512: Add status field to accountlines
Bug 22512: Add status field to accountlines

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. ***