getNow()->get("+1 day")->asDb(); $ListView = new ListView(); $seedTasks = BeanFactory::newBean('Tasks'); $where = "tasks.assigned_user_id='". $current_user->id ."' and (tasks.status is NULL or (tasks.status!='Completed' and tasks.status!='Deferred')) "; $where .= "and (tasks.date_start is NULL or "; $where .= $seedTasks->db->convert( $seedTasks->db->convert("tasks.date_start", "date_format", '%Y-%m-%d'), "CONCAT", array("' '", $seedTasks->db->convert("tasks.time_start", "time_format")) ). " <= ".$seedTasks->db->quoted($tomorrow); $ListView->initNewXTemplate('modules/Tasks/MyTasks.html', $current_module_strings); $header_text = ''; if (is_admin($current_user) && $_REQUEST['module'] != 'DynamicLayout' && !empty($_SESSION['editinplace'])) { $header_text = " ".SugarThemeRegistry::current()->getImage("EditLayout", "border='0' align='bottom'", null, null, '.gif', $mod_strings['LBL_EDITLAYOUT']).""; } $ListView->setHeaderTitle($current_module_strings['LBL_LIST_MY_TASKS'].$header_text); $ListView->setQuery($where, "", "date_due,priority desc", "TASK"); $ListView->processListView($seedTasks, "main", "TASK");