PM-4474

PM-4474

PM-4474

PM-4474
This commit is contained in:
Paula V. Quispe
2015-12-18 15:59:47 -04:00
parent 2a64b4b77e
commit eec7ec3327
2 changed files with 9 additions and 1 deletions

View File

@@ -4176,7 +4176,6 @@ class Cases
public function pauseCase($sApplicationUID, $iDelegation, $sUserUID, $sUnpauseDate = null) public function pauseCase($sApplicationUID, $iDelegation, $sUserUID, $sUnpauseDate = null)
{ {
$this->CloseCurrentDelegation($sApplicationUID, $iDelegation);
$oApplication = new Application(); $oApplication = new Application();
$aFields = $oApplication->Load($sApplicationUID); $aFields = $oApplication->Load($sApplicationUID);
//get the appthread row id ( APP_THREAD_INDEX' ) //get the appthread row id ( APP_THREAD_INDEX' )
@@ -4194,6 +4193,7 @@ class Cases
throw new Exception(G::LoadTranslation("ID_CASE_STOPPED_TRIGGER")); throw new Exception(G::LoadTranslation("ID_CASE_STOPPED_TRIGGER"));
} }
$this->CloseCurrentDelegation($sApplicationUID, $iDelegation);
//now create a row in APP_DELAY with type PAUSE //now create a row in APP_DELAY with type PAUSE
$aData['PRO_UID'] = $aFields['PRO_UID']; $aData['PRO_UID'] = $aFields['PRO_UID'];
$aData['APP_UID'] = $sApplicationUID; $aData['APP_UID'] = $sApplicationUID;

View File

@@ -3140,6 +3140,14 @@ class wsBase
return $result; 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 = new Cases();
$case->cancelCase( $caseUid, $delIndex, $userUid ); $case->cancelCase( $caseUid, $delIndex, $userUid );