(bug #2937) use check_date in C4::Serials::hassubscriptionexpired
This patch change the date check in hassubscriptionexpired to use Date_Calc::check_date
This commit is contained in:
parent
e6c43b0e56
commit
bc8eba30c1
|
|
@ -1798,9 +1798,7 @@ sub HasSubscriptionExpired {
|
|||
my ($res) = $sth->fetchrow ;
|
||||
my @res=split (/-/,$res);
|
||||
my @endofsubscriptiondate=split(/-/,$expirationdate);
|
||||
foreach (@res,@endofsubscriptiondate){
|
||||
return 2 unless $_ ;
|
||||
}
|
||||
return 2 if (not check_date(@res) || not check_date(@endofsubscriptiondate));
|
||||
return 1 if ( (@endofsubscriptiondate && Delta_Days($res[0],$res[1],$res[2],
|
||||
$endofsubscriptiondate[0],$endofsubscriptiondate[1],$endofsubscriptiondate[2]) <= 0)
|
||||
|| (!$res));
|
||||
|
|
|
|||
Loading…
Reference in New Issue