Bug 22510 - 'accountlines.accounttype' should never be set directly, rather is should be changed via Koha::Account et al.
Summary: 'accountlines.accounttype' should never be set directly, rather is should be ...
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: Testopia
URL:
Keywords:
Depends on: 22394
Blocks: 14825
  Show dependency treegraph
 
Reported: 2019-03-14 08:55 UTC by Martin Renvoize
Modified: 2023-09-23 21:07 UTC (History)
0 users

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.