@@ -4176,7 +4176,6 @@ class Cases
|
||||
|
||||
public function pauseCase($sApplicationUID, $iDelegation, $sUserUID, $sUnpauseDate = null)
|
||||
{
|
||||
$this->CloseCurrentDelegation($sApplicationUID, $iDelegation);
|
||||
$oApplication = new Application();
|
||||
$aFields = $oApplication->Load($sApplicationUID);
|
||||
//get the appthread row id ( APP_THREAD_INDEX' )
|
||||
@@ -4194,6 +4193,7 @@ class Cases
|
||||
throw new Exception(G::LoadTranslation("ID_CASE_STOPPED_TRIGGER"));
|
||||
}
|
||||
|
||||
$this->CloseCurrentDelegation($sApplicationUID, $iDelegation);
|
||||
//now create a row in APP_DELAY with type PAUSE
|
||||
$aData['PRO_UID'] = $aFields['PRO_UID'];
|
||||
$aData['APP_UID'] = $sApplicationUID;
|
||||
|
||||
@@ -3140,6 +3140,14 @@ class wsBase
|
||||
return $result;
|
||||
}
|
||||
|
||||
$oApplication = new Application();
|
||||
$aFields = $oApplication->load($caseUid);
|
||||
if($aFields['APP_STATUS'] == 'DRAFT'){
|
||||
$result = new wsResponse( 100, G::LoadTranslation( "ID_CASE_IN_STATUS" ). " DRAFT" );
|
||||
$g->sessionVarRestore();
|
||||
return $result;
|
||||
}
|
||||
|
||||
$case = new Cases();
|
||||
$case->cancelCase( $caseUid, $delIndex, $userUid );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user