Merged in victorsl/processmaker/PM-832 (pull request #1121)

PM-832 "Comportamiento Case Sheduler del tipo Monthly y Weekly" SOLVED
This commit is contained in:
Julio Cesar Laura Avendaño
2014-10-31 16:11:03 -04:00
2 changed files with 17 additions and 17 deletions

View File

@@ -158,19 +158,19 @@ try {
$sValue = $nStartDay;
break;
}
echo "<br>sOption: " . $sOption;
if (($sOption != '1') && ($sOption != '4') && ($sOption != '5')) {
if ($sStartDay == '') {
$sStartDay = date( 'Y-m-d' );
}
// echo $sOption."*". $sValue."*". $nActualTime."*". $sDaysPerformTask."*". $sWeeks."*". $sStartDay ."*". $sMonths."<br>";
$dCurrentDay = date( "d" );
$dCurrentMonth = date( "m" );
$dCurrentMonth = (int)(date("m"));
$dCurrentDay = (int)(date("d"));
$aStartDay = explode( "|", $aData['SCH_START_DAY'] );
if ($sOption == '3' && $aStartDay[0] == '1') {
$monthsArray = explode( "|", $sMonths );
foreach ($monthsArray as $row) {
if ($dCurrentMonth == $row && $dCurrentDay < $aStartDay[1]) {
if ((int)($row) == $dCurrentMonth && $dCurrentDay <= (int)($aStartDay[1])) {
$startTime = $_POST['form']['SCH_START_TIME'] . ":00";
$aData['SCH_TIME_NEXT_RUN'] = date( 'Y' ) . '-' . $row . '-' . $aStartDay[1] . ' ' . $startTime;
break;
@@ -181,8 +181,6 @@ try {
} else {
$aData['SCH_TIME_NEXT_RUN'] = $oCaseScheduler->updateNextRun( $sOption, $sValue, $nActualTime, $sDaysPerformTask, $sWeeks, $sStartDay, $sMonths, $sDateTmp );
}
// print_r ($aData['SCH_TIME_NEXT_RUN']);
// die;
} else {
if ($sOption == '4') {
$aData['SCH_END_DATE'] = $aData['SCH_START_TIME'];