From 6bd65e052ad4c330ff5804381965158b8571f7f4 Mon Sep 17 00:00:00 2001 From: Marco Antonio Nina Date: Fri, 6 Jul 2012 15:02:37 -0400 Subject: [PATCH] BUG 9304 Notice al derivar un caso que esta configurado con... SOLVED - In the single application out notice. - were validated the data to to avoid these notice. --- workflow/engine/controllers/home.php | 67 +++++++++++++++------------- 1 file changed, 35 insertions(+), 32 deletions(-) diff --git a/workflow/engine/controllers/home.php b/workflow/engine/controllers/home.php index bd04ed24c..3e9f932f2 100755 --- a/workflow/engine/controllers/home.php +++ b/workflow/engine/controllers/home.php @@ -222,46 +222,49 @@ class Home extends Controller $this->render(); } - public function getAppsData($type, $start=null, $limit=null) - { - require_once ( "classes/model/AppNotes.php" ); - G::LoadClass('applications'); + public function getAppsData($type, $start=null, $limit=null) + { + require_once ( "classes/model/AppNotes.php" ); + G::LoadClass('applications'); - $apps = new Applications(); - $appNotes = new AppNotes(); + $apps = new Applications(); + $appNotes = new AppNotes(); - $start = empty($start) ? $this->appListStart : $start; - $limit = empty($limit) ? $this->appListLimit : $limit; + $start = empty($start) ? $this->appListStart : $start; + $limit = empty($limit) ? $this->appListLimit : $limit; - $notesStart = 0; - $notesLimit = 4; + $notesStart = 0; + $notesLimit = 4; - $cases = $apps->getAll($this->userID, $start, $limit, $type); - //g::pr($cases['data']); die; + $cases = $apps->getAll($this->userID, $start, $limit, $type); + //g::pr($cases['data']); die; - // formating & complitting apps data with 'Notes' - foreach ($cases['data'] as $i => $row) { - // Formatting - $appTitle = str_replace('#', '', $row['APP_TITLE']); + // formating & complitting apps data with 'Notes' + foreach ($cases['data'] as $i => $row) { + // Formatting + $appTitle = str_replace('#', '', $row['APP_TITLE']); - if (is_numeric($appTitle)) { - $cases['data'][$i]['APP_TITLE'] = G::LoadTranslation('ID_CASE'). ' ' . $appTitle; - } + if (is_numeric($appTitle)) { + $cases['data'][$i]['APP_TITLE'] = G::LoadTranslation('ID_CASE'). ' ' . $appTitle; + } - $cases['data'][$i]['DEL_DELEGATE_DATE'] = G::getformatedDate($row['DEL_DELEGATE_DATE'], 'M d, yyyy - h:i:s'); - $cases['data'][$i]['APP_DEL_PREVIOUS_USER'] = ucwords($row['APP_DEL_PREVIOUS_USER']); - - // Completting with Notes - $notes = $appNotes->getNotesList($row['APP_UID'], '', $notesStart, $notesLimit); - $notes = $notes['array']; - - $cases['data'][$i]['NOTES_COUNT'] = $notes['totalCount']; - $cases['data'][$i]['NOTES_LIST'] = $notes['notes']; + if (isset($row['DEL_DELEGATE_DATE'])) { + $cases['data'][$i]['DEL_DELEGATE_DATE'] = G::getformatedDate($row['DEL_DELEGATE_DATE'], + 'M d, yyyy - h:i:s'); + } + if (isset($row['APP_DEL_PREVIOUS_USER'])) { + $cases['data'][$i]['APP_DEL_PREVIOUS_USER'] = ucwords($row['APP_DEL_PREVIOUS_USER']); + } + // Completting with Notes + $notes = $appNotes->getNotesList($row['APP_UID'], '', $notesStart, $notesLimit); + $notes = $notes['array']; + + $cases['data'][$i]['NOTES_COUNT'] = $notes['totalCount']; + $cases['data'][$i]['NOTES_LIST'] = $notes['notes']; + } + return $cases; } - return $cases; - } - public function startCase($httpData) { G::LoadClass('case'); @@ -296,4 +299,4 @@ class Home extends Controller $this->setView($tpl); $this->render(); } -} \ No newline at end of file +}