From dad33de660724bc31684f64c7719afe48a7c3022 Mon Sep 17 00:00:00 2001 From: Andrew Isherwood Date: Fri, 12 Apr 2019 12:31:31 +0100 Subject: [PATCH] Bug 15260: (follow-up) Fix misnamed variable This was causing the amount to push by to be incorrectly calculated Sponsored-by: Cheshire West and Chester Council Sponsored-by: Cheshire East Council Sponsored-by: Newcastle City Council Sponsored-by: Sefton Council Signed-off-by: Liz Rea Signed-off-by: Josef Moravec Signed-off-by: Martin Renvoize --- Koha/Calendar.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Koha/Calendar.pm b/Koha/Calendar.pm index 9781f69178..25299c1c53 100644 --- a/Koha/Calendar.pm +++ b/Koha/Calendar.pm @@ -218,7 +218,7 @@ sub addDays { my $dow = $base_date->day_of_week; my $days = $days_duration->in_units('days'); # Is it a period based on weeks - my $push_amt = $days_duration % 7 == 0 ? + my $push_amt = $days % 7 == 0 ? $self->get_push_amt($base_date) : 1; if ( $days_duration->is_negative() ) { $base_date = $self->prev_open_days($base_date, $push_amt); -- 2.39.5