Skip to content
Snippets Groups Projects
Commit 8e055896 authored by Henri Queneau's avatar Henri Queneau
Browse files

FIX #2953 when you use the webservicen the process date limit is calculated...

FIX #2953 when you use the webservicen the process date limit is calculated with the type of calendar, calendar or workingday
parent 5867b27e
No related branches found
No related tags found
No related merge requests found
......@@ -60,7 +60,10 @@ class alert_engine extends Database
* @param boolean $isMinus
*/
public function WhenOpenDay($Date, $Delta, $isMinus = false, $calendarType = 'workingDay')
{
{
if ($calendarType <> 'calendar' && $calendarType <> 'workingDay') {
$calendarType = 'workingDay';
}
if($calendarType == 'calendar'){
if ($isMinus) {
return date('Y-m-d H:i:s', $Date + (86400*-$Delta));
......@@ -129,9 +132,9 @@ class alert_engine extends Database
}
}
if ($isMinus) {
return date('Y-m-d', $Date + (86400*-$Delta));
return date('Y-m-d H:i:s', $Date + (86400*-$Delta));
} else {
return date('Y-m-d', $Date + (86400*$Delta));
return date('Y-m-d H:i:s', $Date + (86400*$Delta));
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment