This commit is contained in:
Paula Quispe
2017-04-17 10:34:30 -04:00
parent 266be585ea
commit e722fa19db
3 changed files with 137 additions and 187 deletions

View File

@@ -112,5 +112,26 @@ class AppDelay extends BaseAppDelay
return false;
}
}
/**
* Verify if the case is Paused or cancelled
*
* @param $appUid string
* @return $oDataset array
*/
public function getCasesCancelOrPaused($appUid)
{
$oCriteria = new Criteria( 'workflow' );
$oCriteria->addSelectColumn( AppDelayPeer::APP_UID );
$oCriteria->addSelectColumn( AppDelayPeer::APP_DEL_INDEX );
$oCriteria->add( AppDelayPeer::APP_TYPE, '' );
$oCriteria->add( AppDelayPeer::APP_UID, $appUid );
$oCriteria->add( $oCriteria->getNewCriterion( AppDelayPeer::APP_TYPE, 'PAUSE' )->addOr( $oCriteria->getNewCriterion( AppDelayPeer::APP_TYPE, 'CANCEL' ) ) );
$oCriteria->addAscendingOrderByColumn( AppDelayPeer::APP_ENABLE_ACTION_DATE );
$oDataset = AppDelayPeer::doSelectRS( $oCriteria );
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
$oDataset->next();
return $oDataset->getRow();
}
}