[Koha-bugs] [Bug 14486] New: C4/Accountlines.pm needs better documentation and removal of stale code

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Jul 2 14:29:52 CEST 2015


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14486

            Bug ID: 14486
           Summary: C4/Accountlines.pm needs better documentation and
                    removal of stale code
 Change sponsored?: ---
           Product: Koha
           Version: master
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P5 - low
         Component: Circulation
          Assignee: koha-bugs at lists.koha-community.org
          Reporter: barton at bywatersolutions.com
        QA Contact: testopia at bugs.koha-community.org
                CC: gmcharlt at gmail.com, kyle.m.hall at gmail.com

The documentation in C4/Accountlines.pm is confusing. There is no clear
statement of what the module is for, and some poor programmer has sprinkled the
code with 'FIXME' comments to the effect of "I don't understand what this
function does."

The intent and proper use of these functions should be documented, and the
FIXME comments should be removed.

fixaccounts() is entirely commented out. This should be removed.

The following functions are not documented:

chargelostitem()

getcharges()

ModNote()

getcredits()

getrefunds()

ReversePayment()

makepartialpayment()

These should have at least minimal documentation saying "It does what you think
it does", and any functions which modify the accountlines need a complete
explanation of what they're changing in the database and why. 

The weakness of the accountlines table is that there is no link between fines
and issues/old_issues which is a perennial source of bugs. This needs to be
explicitly documented as a gotcha.

Obviously work on documentation will be obsoleted by Bug 6427 - Rewrite of the
accounts system, but in some sense, because the re-write is supposed to work
with legacy code, I feel that the lack of clear documentation in the old code
is an impediment to the testing of the new.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.


More information about the Koha-bugs mailing list