[Koha-bugs] [Bug 28051] New: On upgrade to 19.11, per-item Writeoff got confused with Lost

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Mar 30 12:31:39 CEST 2021


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28051

            Bug ID: 28051
           Summary: On upgrade to 19.11, per-item Writeoff got confused
                    with Lost
 Change sponsored?: ---
           Product: Koha
           Version: 19.11
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P5 - low
         Component: Fines and fees
          Assignee: koha-bugs at lists.koha-community.org
          Reporter: pongtawat at punsarn.asia
        QA Contact: testopia at bugs.koha-community.org

During upgrade to 19.11, database upgrade script introduced by Bug #22563
(convert "lost" handling) also handle case of normal per-item writeoff like
those writeoff generated from lost. So, all patron with normal per-item
writeoff will now see additional account line of 'LOST' type. 

This is due to the following code in updatedatabase.pl:

    # Find and correct pathalogical cases of L having been converted to W
    $sth = $dbh->prepare( "SELECT accountlines_id, issue_id, borrowernumber,
itemnumber, amount, manager_id FROM accountlines WHERE accounttype = 'W' AND
itemnumber IS NOT NULL" );
...

Step to reproduce:

1. Start with Koha 18.05.
2. Create overdue fine on item X for patron A, amount=100.
3. Per-item write-off amount=50 on item X for patron A. This will create 'W'
line in accountlines with amount=50 and item=X
4. Upgrade to Koha 19.11 or later (in our case 20.05)
5. Patron A now has an additional 'LOST' with amount=50 and item=X in their
accountlines.

This additional 'LOST' line is incorrect in this case.

Also, I notice that this per-item writeoff is in debit side (red). I don't know
if this is correct or not, but shouldn't writeoff be on credit side?

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


More information about the Koha-bugs mailing list