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 <hector.hecaxmmx@gmail.com>
Subroutines removed

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Jonathan Druart 2015-11-13 11:43:36 +00:00 committed by Tomas Cohen Arazi
parent 16213187d9
commit b7c4ff5bf9

View file

@ -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;