Skip to content
  • joubu's avatar
    Bug 19204: Make the debarment date calculation depends on finesCalendar · 8d3eba6a
    joubu authored
    
    
    This patchs adds the ability to calculate the end of the suspension date
    (debarment date) using the finesCalendar syspref.
    Prior to this patch it was never calculating without taking into account
    the calendar.
    
    calculated without taking holidays into account.
    This was a problem because the restriction could end in the middle of a
    period the library is closed.
    
    Test plan:
    - Set finescalendar to 'not including days the library is closed'
    - Set a circulation condition with no fine/maxfine, but fine days and
    max fine days instead
    - Check out an item with a due date in the past
    - Check the item in and verify the restriction date
    - Clean the restriction
    
    - Add holidays to your calendar on the calculated restriction date
    - Check the item out again with the same due date in the past
    - Check in the item again
    - Verify the calculated restriction end date has changed, it's set to the day
    after the holiday.
    
    Fines in days restriction calculation is correctly taking calendar
    into account.
    
    Sponsored-by: Goethe-Institut
    
    Signed-off-by: default avatarClaire Gravely <claire.gravely@bsz-bw.de>
    
    Signed-off-by: default avatarKatrin Fischer <katrin.fischer.83@web.de>
    Signed-off-by: Tomas Cohen Arazi's avatarTomas Cohen Arazi <tomascohen@theke.io>
    
    Signed-off-by: default avatarJonathan Druart <jonathan.druart@bugs.koha-community.org>
    8d3eba6a