[Bug 8939] New: Fines Charged During Grace Period
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8939 Priority: P5 - low Change sponsored?: --- Bug ID: 8939 CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com Assignee: koha-bugs@lists.koha-community.org Summary: Fines Charged During Grace Period Severity: major Classification: Unclassified OS: Linux Reporter: williams@amigos.org Hardware: PC Status: NEW Version: rel_3_8 Component: Circulation Product: Koha When grace period specified in a circulation rule is greater than one day (fines charged daily) and a user returns an item (matching the circ rule) within the grace period, the fine is charged rather than ignored (zero). In one example, with a 14-day grace period, the fines log produced nightly by fines.pl shows: 22903 STU [snipped] 122222 2012-09-29 23:59:00 2 4 22951 STU [snipped] 125741 2012-10-11 23:59:00 -10 1 22965 STU [snipped] 77536 2012-10-14 23:59:00 -13 0.25 The negative numbers indicate how many days of grace period remain (-10 means the item is 4 days overdue); positive numbers shows how many days is overdue after the grace period. The negative values should result in no processing. There appears to be an error in the if condition that determines whether to process/charge a fine on an overdue (negative values result in a TRUE as well as positive values): if ($data->{'chargeperiod'} && $units_minus_grace ) { would work as expected if the second condition is changed: if ($data->{'chargeperiod'} && ($units_minus_grace > 0) ) { I've tested on 3.8.3 (Debian package installation) and the change works for daily accruing fines. I have not yet tested using an hourly fine rule, but after a quick glance it seems it should work as well. I'll try (I'm new to Git) to add/submit a patch next. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8939 --- Comment #1 from Robert Williams <williams@amigos.org> --- Created attachment 12893 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=12893&action=edit Fine calculation condition update Proposed fix for errant grace period fine calculation. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8939 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #12893|0 |1 is obsolete| | --- Comment #2 from Chris Cormack <chris@bigballofwax.co.nz> --- Created attachment 12894 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=12894&action=edit Bug 8939 : Fines being charged during the grace period Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8939 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff CC| |chris@bigballofwax.co.nz --- Comment #3 from Chris Cormack <chris@bigballofwax.co.nz> --- Hi Robert Next time, can you make your patch using git format-patch This one had no commit message, or authorship details, I fixed that when signing off. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8939 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8939 --- Comment #4 from Robert Williams <williams@amigos.org> --- Thanks, Chris. I think I see what I did wrong now. I'll give it a better go next time. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8939 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA CC| |paul.poulain@biblibre.com --- Comment #5 from Paul Poulain <paul.poulain@biblibre.com> --- QA comment: tiny patch, very good test plan, obviously fixing a problem. passed QA Robert, welcome as a contributor, you're 194th ! -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8939 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master QA Contact| |paul.poulain@biblibre.com --- Comment #6 from Paul Poulain <paul.poulain@biblibre.com> --- Patch pushed to master -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8939 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable --- Comment #7 from Chris Cormack <chris@bigballofwax.co.nz> --- Pushed to 3.8.x will be in 3.8.7 -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org