Exemple #1
0
function getSubTaskxTask($idTask)
{
    $sql = "SELECT t.*, nc.*, ";
    $sql .= "CONCAT_WS(' ',u.first_name,u.last_name) as assigned_user_name ";
    $sql .= "FROM notes t , notes_cstm nc, users u WHERE t.id = nc.id_c AND nc.estado_c != 'Completed' AND t.deleted = '0' ";
    $sql .= "AND t.assigned_user_id = u.id ";
    $sql .= "AND t.parent_type='Tasks' ";
    $sql .= "AND t.parent_id='{$idTask}'";
    return getInfoFromBD($sql);
}
Exemple #2
0
function getNotesxSubTask($idTask)
{
    $sql = "SELECT a.*, ar.notes_adm_notas_1notes_ida as parent_id,";
    $sql .= "CONCAT_WS(' ',u.first_name,u.last_name) as assigned_user_name ";
    $sql .= "FROM adm_notas a,  notes_adm_notas_1_c ar, users u ";
    $sql .= "WHERE a.id = ar.notes_adm_notas_1adm_notas_idb AND a.status_id != 'Completed' AND a.deleted = '0' AND ar.deleted = '0' ";
    $sql .= "AND a.assigned_user_id = u.id ";
    $sql .= "AND ar.notes_adm_notas_1notes_ida = '{$idTask}' AND ar.notes_adm_notas_1notes_ida != ''";
    return getInfoFromBD($sql);
}
Exemple #3
0
function getTaskxContact($idContact)
{
    $sql = "SELECT t.id,t.name,t.date_entered,t.date_modified,t.modified_user_id,t.created_by,t.description,t.deleted,t.assigned_user_id,t.status,t.date_due_flag\n,t.date_due,t.date_start_flag,t.date_start,t.parent_type,t.parent_id,t.contact_id,t.priority,tc.id_c,tc.aviso_c,tc.trabajo_estimado_c,tc.ejecuted_date_c,CONCAT_WS(' ',u.first_name,u.last_name) as assigned_user_name\nFROM tasks t LEFT JOIN tasks_cstm tc\nON t.id = tc.id_c\nJOIN users u ON t.assigned_user_id = u.id\nWHERE t.deleted= '0' AND t.contact_id = '{$idContact}' \nAND t.parent_type='Accounts' \nAND t.status != 'Completed'";
    return getInfoFromBD($sql);
}