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

Michael Hafen <michael.ha...@washk12.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |michael.ha...@washk12.org

--- Comment #3 from Michael Hafen <michael.ha...@washk12.org> ---
I seem to have run into this also.  I'm running a modified 21.05.05.
I have, since noticing the duplicates, deleted all the duplicates, and changed
my systems crontab so that daily tasks will run before circulation starts.

I've looked at the code in cronjobs/fines.pl and circ/returns.pl.  It seems
that AddReturn calls _FixOverduesOnReturn which flips the status to 'RETURNED'.
 Then fines.pl calls UpdateFine, which can't find the fine because the status
has been flipped, so it add a new one.

I'm think the best course of action would be to have UpdateFine return if the
fine has been flipped to 'RETURNED' and 'CalculateFinesOnReturn' is on, since
AddReturn will have already updated the fine in that case.

Though that still doesn't over the edge-case of 'CalculateFinesOnReturn' being
off, since AddReturn still calls _FixOverduesOnReturn either way.  With
'CalculateFinesOnReturn' off, when the book gets returned before fines.pl gets
to it, UpdateFine still won't find it because _FixOverduesOnReturn flipped the
status, but AddReturn didn't call _CalculateAndUpdateFine.  The duplicate will
get added, but the amount on the original fine wasn't updated.

So maybe the best course of action is to have UpdateFine not care about status
when looking for the fine, and then only adjust the fine is it's 'UNRETURNED'
or 'CalculateFinesOnReturn' is off. (In addition to the check for amount
changing.)

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to