Bug 15260: (follow-up) Fix misnamed variable
authorAndrew Isherwood <andrew.isherwood@ptfs-europe.com>
Fri, 12 Apr 2019 11:31:31 +0000 (12:31 +0100)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Thu, 31 Oct 2019 11:52:59 +0000 (11:52 +0000)
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 <wizzyrea@gmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Koha/Calendar.pm

index 9781f69..25299c1 100644 (file)
@@ -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);