Summary: | Hourly loan fines are not working | ||
---|---|---|---|
Product: | Koha | Reporter: | Elliott Davis <tdavis> |
Component: | Circulation | Assignee: | Kyle M Hall <kyle.m.hall> |
Status: | CLOSED FIXED | QA Contact: | Ian Walls <koha.sekjal> |
Severity: | major | ||
Priority: | P1 - high | CC: | gmcharlt, paul.poulain |
Version: | 3.8 | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Bug Depends on: | |||
Bug Blocks: | 7849 | ||
Attachments: |
Add private function to calculate chargeable units and reconfigure Koha/Calendar.pm to use this function.
Fix fines for large durations - from Colin Rebased fines to master [Signed-Off] Use hour or day deltas to calculate overdue durations [PASSED QA] Use hour or day deltas to calculate overdue durations |
Description
Elliott Davis
2012-03-30 00:35:09 UTC
Created attachment 8702 [details] [review] Add private function to calculate chargeable units and reconfigure Koha/Calendar.pm to use this function. To test: Check out an hourly item, manipulate the database to backdate the checkin or let the item go overdue whilst enjoying a sandwich. After the Item is overdue Check the item back in and wait for the fines cron job to run (or run it yourself). You should see a fine assessed for this item. Created attachment 8779 [details] [review] Fix fines for large durations - from Colin Created attachment 8780 [details] [review] Rebased fines to master Created attachment 8782 [details] [review] [Signed-Off] Use hour or day deltas to calculate overdue durations If durations are calculated by subtraction they will use units larger than those we care about and these are not convertable to the smaller units we are attempting to enumerate Use the appropriate delta methods to calculate theee fines Adds a separate hours_between method to calendar This should strictly be checking opening hours (of which closed days are a special case) of the relevant branch These need adding to branches http://bugs.koha-community.org/show_bug.cgi?id=7852 Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Created attachment 8816 [details] [review] [PASSED QA] Use hour or day deltas to calculate overdue durations If durations are calculated by subtraction they will use units larger than those we care about and these are not convertable to the smaller units we are attempting to enumerate Use the appropriate delta methods to calculate theee fines Adds a separate hours_between method to calendar This should strictly be checking opening hours (of which closed days are a special case) of the relevant branch These need adding to branches http://bugs.koha-community.org/show_bug.cgi?id=7852 Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Ian Walls <koha.sekjal@gmail.com> QA comment: renamed "days_minus_grace" variable to "units_minus_grace" Also added POD to _get_chargeable_units There have been no further reports of problems so I am marking this bug resolved. |