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?
These versions are too old now to provide a fix, marking WONTFIX. But as I can't test there is a possibility it was fixed elsewhere.