Bug 23415: (follow-up) Fallback to 'days' in 'get_chargeable_units'

Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Sponsored-by: OpenFifth <https://openfifth.co.uk/>
This commit is contained in:
Tomás Cohen Arazi 2026-03-25 13:45:56 +01:00
parent c4c21afa6c
commit 9e8eceb1a7
No known key found for this signature in database
GPG Key ID: 0A272EA1B2F3C15F
1 changed files with 3 additions and 0 deletions

View File

@ -346,6 +346,9 @@ sub get_chargeable_units {
my $charge_units = 0;
my $charge_duration;
$unit //= 'days';
if ( $unit eq 'hours' ) {
if ( C4::Context->preference('finesCalendar') eq 'noFinesWhenClosed' ) {
my $calendar = Koha::Calendar->new( branchcode => $branchcode );