Bug 22510

Summary: 'accountlines.accounttype' should never be set directly, rather is should be changed via Koha::Account et al.
Product: Koha Reporter: Martin Renvoize <martin.renvoize>
Component: Architecture, internals, and plumbingAssignee: Martin Renvoize <martin.renvoize>
Status: RESOLVED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low    
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14591
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 22394    
Bug Blocks: 14825    

Description Martin Renvoize 2019-03-14 08:55:18 UTC
Koha::Account lists valid value for accounttypes which can be added via the methods add_debit and add_credit. However, we're still setting accounttype in a number of places outside of this module and in many cases the values we're using do not correspond to the enum list in Koha::Account.
Comment 1 Martin Renvoize 2019-03-14 09:43:09 UTC
* C4::Circulation::__FixOverduesOnReturn "FU/U" -> "FFOR/F"
* C4::Circulation::_FixAccountForLostAndReturned "L/Rep/W" -> "LR"

Those are all the cases I can find so far.. looks like at least the first case is already in discussion on other bugs.
Comment 2 Martin Renvoize 2019-03-15 14:52:16 UTC

*** This bug has been marked as a duplicate of bug 22512 ***
Comment 3 Martin Renvoize 2019-03-15 14:54:35 UTC
This is in effect a duplicate of bug 22512 at this point.. I believe once an accountype is 'set' during it's initial creation it should remain static and rather if it's "state" needs to be tracked we should use a specific field to track it as introduced in the above bug.
Comment 4 Martin Renvoize 2019-07-19 09:24:09 UTC

*** This bug has been marked as a duplicate of bug 22512 ***
Comment 5 Katrin Fischer 2023-09-23 21:07:04 UTC
_FixOverduesOnReturn now uses add_credit.
_FixAccountForLostAndReturned does no longer exist.