[Koha-bugs] [Bug 14390] Fine not updated from 'FU' to 'F' on renewal

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Aug 24 14:10:07 CEST 2016


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

--- Comment #71 from Kyle M Hall <kyle at bywatersolutions.com> ---
For what it's worth, it's pretty trivial to clean up any checked in fines with
a status of FU Katrin.

-- Close out any accruing fines with no current issue
UPDATE accountlines LEFT JOIN issues USING ( itemnumber, borrowernumber ) SET
accounttype = 'F' WHERE accounttype = 'FU' and issues.issue_id IS NULL;

-- Close out any extra not really accruing fines, keep only the latest accruing
fine
UPDATE accountlines SET accounttype = 'F' WHERE accountlines_id NOT IN ( SELECT
accountlines_id FROM ( SELECT * FROM accountlines WHERE accounttype = 'FU'
ORDER BY accountlines_id DESC ) a2 GROUP BY borrowernumber, itemnumber );

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


More information about the Koha-bugs mailing list