From 59d699382122f55a414d121622e97b71b509bf20 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 13 Nov 2015 11:43:36 +0000 Subject: [PATCH] [SIGNED-OFF]Bug 15185: Remove Check*Holidays subroutines in C4::Circulation These 3 subroutines are not used anymore: - CheckRepeatableHolidays - CheckSpecialHolidays - CheckRepeatableSpecialHolidays Moreover we have subroutines in Koha::Calendar to do this job. Test plan: git grep CheckRepeatableHolidays git grep CheckSpecialHolidays git grep CheckRepeatableSpecialHolidays should not return any results. Signed-off-by: Hector Castro Subroutines removed --- C4/Circulation.pm | 86 ----------------------------------------------------- 1 file changed, 86 deletions(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 18cc9d5..e75ec5e 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -3531,92 +3531,6 @@ sub CalcDateDue { } -=head2 CheckRepeatableHolidays - - $countrepeatable = CheckRepeatableHoliday($itemnumber,$week_day,$branchcode); - -This function checks if the date due is a repeatable holiday - -C<$date_due> = returndate calculate with no day check -C<$itemnumber> = itemnumber -C<$branchcode> = localisation of issue - -=cut - -sub CheckRepeatableHolidays{ -my($itemnumber,$week_day,$branchcode)=@_; -my $dbh = C4::Context->dbh; -my $query = qq|SELECT count(*) - FROM repeatable_holidays - WHERE branchcode=? - AND weekday=?|; -my $sth = $dbh->prepare($query); -$sth->execute($branchcode,$week_day); -my $result=$sth->fetchrow; -return $result; -} - - -=head2 CheckSpecialHolidays - - $countspecial = CheckSpecialHolidays($years,$month,$day,$itemnumber,$branchcode); - -This function check if the date is a special holiday - -C<$years> = the years of datedue -C<$month> = the month of datedue -C<$day> = the day of datedue -C<$itemnumber> = itemnumber -C<$branchcode> = localisation of issue - -=cut - -sub CheckSpecialHolidays{ -my ($years,$month,$day,$itemnumber,$branchcode) = @_; -my $dbh = C4::Context->dbh; -my $query=qq|SELECT count(*) - FROM `special_holidays` - WHERE year=? - AND month=? - AND day=? - AND branchcode=? - |; -my $sth = $dbh->prepare($query); -$sth->execute($years,$month,$day,$branchcode); -my $countspecial=$sth->fetchrow ; -return $countspecial; -} - -=head2 CheckRepeatableSpecialHolidays - - $countspecial = CheckRepeatableSpecialHolidays($month,$day,$itemnumber,$branchcode); - -This function check if the date is a repeatble special holidays - -C<$month> = the month of datedue -C<$day> = the day of datedue -C<$itemnumber> = itemnumber -C<$branchcode> = localisation of issue - -=cut - -sub CheckRepeatableSpecialHolidays{ -my ($month,$day,$itemnumber,$branchcode) = @_; -my $dbh = C4::Context->dbh; -my $query=qq|SELECT count(*) - FROM `repeatable_holidays` - WHERE month=? - AND day=? - AND branchcode=? - |; -my $sth = $dbh->prepare($query); -$sth->execute($month,$day,$branchcode); -my $countspecial=$sth->fetchrow ; -return $countspecial; -} - - - sub CheckValidBarcode{ my ($barcode) = @_; my $dbh = C4::Context->dbh; -- 1.7.10.4