HOR-132 "Necesitamos que se pueda utilizar la variable APP_NUMBER" SOLVED
Issue:
Necesitamos que se pueda utilizar la variable APP_NUMBER
Cause:
La variable no existe
Solution:
Se define la variable al momento de crear el caso
This commit is contained in:
@@ -60,7 +60,7 @@ class Application extends BaseApplication
|
|||||||
if (!$oApplication->exists($this->getAppUid())) {
|
if (!$oApplication->exists($this->getAppUid())) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->getAppUid() == '') {
|
if ($this->getAppUid() == '') {
|
||||||
throw (new Exception( "Error in getAppTitle, the APP_UID can't be blank"));
|
throw (new Exception( "Error in getAppTitle, the APP_UID can't be blank"));
|
||||||
}
|
}
|
||||||
@@ -373,7 +373,6 @@ class Application extends BaseApplication
|
|||||||
$this->setAppUpdateDate('now');
|
$this->setAppUpdateDate('now');
|
||||||
|
|
||||||
$pin = G::generateCode(4, 'ALPHANUMERIC');
|
$pin = G::generateCode(4, 'ALPHANUMERIC');
|
||||||
$this->setAppData(serialize(array('PIN' => $pin)));
|
|
||||||
$this->setAppPin(G::encryptOld($pin));
|
$this->setAppPin(G::encryptOld($pin));
|
||||||
|
|
||||||
$c = new Criteria();
|
$c = new Criteria();
|
||||||
@@ -385,6 +384,8 @@ class Application extends BaseApplication
|
|||||||
$maxNumber = $oSequences->getSequeceNumber("APP_NUMBER");
|
$maxNumber = $oSequences->getSequeceNumber("APP_NUMBER");
|
||||||
|
|
||||||
$this->setAppNumber($maxNumber);
|
$this->setAppNumber($maxNumber);
|
||||||
|
$this->setAppData(serialize(['APP_NUMBER' => $maxNumber, 'PIN' => $pin]));
|
||||||
|
|
||||||
$oSequences->changeSequence('APP_NUMBER', $maxNumber);
|
$oSequences->changeSequence('APP_NUMBER', $maxNumber);
|
||||||
$oSequences->unlockSequenceTable();
|
$oSequences->unlockSequenceTable();
|
||||||
|
|
||||||
@@ -591,7 +592,7 @@ class Application extends BaseApplication
|
|||||||
}
|
}
|
||||||
|
|
||||||
$calendar = new calendar();
|
$calendar = new calendar();
|
||||||
|
|
||||||
$c = new Criteria( 'workflow' );
|
$c = new Criteria( 'workflow' );
|
||||||
$c->clearSelectColumns();
|
$c->clearSelectColumns();
|
||||||
$c->addSelectColumn( ApplicationPeer::APP_UID );
|
$c->addSelectColumn( ApplicationPeer::APP_UID );
|
||||||
@@ -616,7 +617,7 @@ class Application extends BaseApplication
|
|||||||
$rs->next();
|
$rs->next();
|
||||||
$row = $rs->getRow();
|
$row = $rs->getRow();
|
||||||
$i = 0;
|
$i = 0;
|
||||||
|
|
||||||
$now = strtotime( 'now' );
|
$now = strtotime( 'now' );
|
||||||
while (is_array( $row )) {
|
while (is_array( $row )) {
|
||||||
$appNumber = $row['APP_NUMBER'];
|
$appNumber = $row['APP_NUMBER'];
|
||||||
@@ -634,7 +635,7 @@ class Application extends BaseApplication
|
|||||||
|
|
||||||
//get the object,
|
//get the object,
|
||||||
$oApp = ApplicationPeer::retrieveByPk( $row['APP_UID'] );
|
$oApp = ApplicationPeer::retrieveByPk( $row['APP_UID'] );
|
||||||
|
|
||||||
//getting the calendar
|
//getting the calendar
|
||||||
$calendar->getCalendar(null, $proUid);
|
$calendar->getCalendar(null, $proUid);
|
||||||
$calData = $calendar->getCalendarData();
|
$calData = $calendar->getCalendarData();
|
||||||
@@ -648,8 +649,8 @@ class Application extends BaseApplication
|
|||||||
if($appFinishDate == null){//When the process didnt finish yet.
|
if($appFinishDate == null){//When the process didnt finish yet.
|
||||||
//Duration
|
//Duration
|
||||||
$appDuration = $calendar->dashCalculateDurationWithCalendar($appInitDate, date("Y-m-d H:i:s"), $calData );
|
$appDuration = $calendar->dashCalculateDurationWithCalendar($appInitDate, date("Y-m-d H:i:s"), $calData );
|
||||||
|
|
||||||
|
|
||||||
$appDuration = $appDuration / (24 * 60 * 60); //Saving the proDuration in days. The calculateDurationWithCalendar func returns segs.
|
$appDuration = $appDuration / (24 * 60 * 60); //Saving the proDuration in days. The calculateDurationWithCalendar func returns segs.
|
||||||
$oApp->setAppDuration( $appDuration );
|
$oApp->setAppDuration( $appDuration );
|
||||||
|
|
||||||
@@ -662,7 +663,7 @@ class Application extends BaseApplication
|
|||||||
$appDuration = $calendar->dashCalculateDurationWithCalendar($appInitDate, $appFinishDate, $calData );
|
$appDuration = $calendar->dashCalculateDurationWithCalendar($appInitDate, $appFinishDate, $calData );
|
||||||
$appDuration = $appDuration / (24 * 60 * 60); //Saving the proDuration in days. The calculateDurationWithCalendar func returns mins.
|
$appDuration = $appDuration / (24 * 60 * 60); //Saving the proDuration in days. The calculateDurationWithCalendar func returns mins.
|
||||||
$oApp->setAppDuration( $appDuration );
|
$oApp->setAppDuration( $appDuration );
|
||||||
|
|
||||||
//Delay Duration
|
//Delay Duration
|
||||||
$delayDuration = $calendar->dashCalculateDurationWithCalendar( $proDueDate, $appFinishDate, $calData );
|
$delayDuration = $calendar->dashCalculateDurationWithCalendar( $proDueDate, $appFinishDate, $calData );
|
||||||
$delayDuration = $delayDuration / (24 * 60 * 60); //Days
|
$delayDuration = $delayDuration / (24 * 60 * 60); //Days
|
||||||
@@ -674,7 +675,7 @@ class Application extends BaseApplication
|
|||||||
$rs->next();
|
$rs->next();
|
||||||
$row = $rs->getRow();
|
$row = $rs->getRow();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($cron == 1) {
|
if ($cron == 1) {
|
||||||
$arrayCron = unserialize( trim( @file_get_contents( PATH_DATA . "cron" ) ) );
|
$arrayCron = unserialize( trim( @file_get_contents( PATH_DATA . "cron" ) ) );
|
||||||
$arrayCron["processcTimeStart"] = time();
|
$arrayCron["processcTimeStart"] = time();
|
||||||
@@ -683,7 +684,7 @@ class Application extends BaseApplication
|
|||||||
} catch (Exception $oError) {
|
} catch (Exception $oError) {
|
||||||
error_log( $oError->getMessage() );
|
error_log( $oError->getMessage() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*----------------------------------********---------------------------------*/
|
/*----------------------------------********---------------------------------*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user