From 490338984bcc21067c794c0be2924fb11f72a17b Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Mon, 18 Jun 2012 08:15:59 -0400 Subject: [PATCH] 8110 - Fines accruing on closed days - Fix Day/Month Holidays Bug Content-Type: text/plain; charset="utf-8" This patch fixes a bug in which day/month holidays are stored in the Koha::Calendar internal hash not by month/day but incorrectly by day/month. To test: 1) Apply 'Holidays Test Plan - DB Dependent' patch, create MPL holidays for Sunday, New Years Day, and Christmas. 2) Run test plan, only Christmas should fail ( New Years does not because 1-1 means the day and month position do not matter ). 3) Apply this patch 4) Run test plan again Signed-off-by: Liz Rea Test plan works as advertised. Signed-off-by: Tomas Cohen Arazi Test runs flawlessly. I originaly missed to set the expected branchcode --- Koha/Calendar.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Koha/Calendar.pm b/Koha/Calendar.pm index f63e7eb..9a4c13a 100644 --- a/Koha/Calendar.pm +++ b/Koha/Calendar.pm @@ -45,7 +45,7 @@ sub _init { $repeat_sth->execute( $branch, 1 ); $self->{day_month_closed_days} = {}; while ( my $tuple = $repeat_sth->fetchrow_hashref ) { - $self->{day_month_closed_days}->{ $tuple->{day} }->{ $tuple->{month} } = + $self->{day_month_closed_days}->{ $tuple->{month} }->{ $tuple->{day} } = 1; } my $special = $dbh->prepare( -- 1.7.9.5