diff --git a/htdocs/comm/action/actioncomm.class.php b/htdocs/comm/action/actioncomm.class.php index fa910d70ac1..b49c6a6600a 100644 --- a/htdocs/comm/action/actioncomm.class.php +++ b/htdocs/comm/action/actioncomm.class.php @@ -232,7 +232,7 @@ class ActionComm $sql.= " c.id as type_id, c.code as type_code, c.libelle,"; $sql.= " s.nom as socname,"; $sql.= " u.firstname, u.name"; - $sql.= " FROM (".MAIN_DB_PREFIX."actioncomm as a, ".MAIN_DB_PREFIX."c_actioncomm as c)"; + $sql.= " FROM (".MAIN_DB_PREFIX."c_actioncomm as c, ".MAIN_DB_PREFIX."actioncomm as a)"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."user as u on u.rowid = a.fk_user_author"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s on s.rowid = a.fk_soc"; $sql.= " WHERE a.id=".$id." AND a.fk_action=c.id"; diff --git a/htdocs/comm/action/document.php b/htdocs/comm/action/document.php index 95837799558..c7b7a76ef31 100755 --- a/htdocs/comm/action/document.php +++ b/htdocs/comm/action/document.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2009 Laurent Destailleur + * Copyright (C) 2004-2010 Laurent Destailleur * Copyright (C) 2005 Marc Barilley / Ocebo * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2005 Simon TOSSER @@ -115,7 +115,8 @@ if ($_GET["action"] == 'delete') * View */ -llxHeader(); +$help_url='EN:Module_Agenda_En|FR:Module_Agenda|ES:M&omodulodulo_Agenda'; +llxHeader('',$langs->trans("Agenda"),$help_url); if ($objectid > 0) @@ -149,16 +150,34 @@ if ($objectid > 0) // Type print ''.$langs->trans("Type").''.$act->type.''; - // Libelle + // Title print ''.$langs->trans("Title").''.$act->label.''; + // Location + print ''.$langs->trans("Location").''.$act->location.''; + // Societe - contact - print ''.$langs->trans("Company").''.$act->societe->getNomUrl(1).''; + print ''.$langs->trans("Company").''.($act->societe->id?$act->societe->getNomUrl(1):$langs->trans("None")); + if ($act->societe->id && $act->type_code == 'AC_TEL') + { + if ($act->societe->fetch($act->societe->id)) + { + print "
".dol_print_phone($act->societe->tel); + } + } + print ''; print ''.$langs->trans("Contact").''; print ''; if ($act->contact->id > 0) { print $act->contact->getNomUrl(1); + if ($act->contact->id && $act->type_code == 'AC_TEL') + { + if ($act->contact->fetch($act->contact->id)) + { + print "
".dol_print_phone($act->contact->phone_pro); + } + } } else { @@ -167,6 +186,21 @@ if ($objectid > 0) print ''; + // Project + if ($conf->projet->enabled) + { + print ''.$langs->trans("Project").''; + if ($act->fk_project) + { + $project=new Project($db); + $project->fetch($act->fk_project); + print $project->getNomUrl(1); + } + print ''; + } + + print '
'; + // Construit liste des fichiers $filearray=dol_dir_list($upload_dir,"files",0,'','\.meta$',$sortfield,(strtolower($sortorder)=='desc'?SORT_ASC:SORT_DESC),1); $totalsize=0; @@ -176,7 +210,7 @@ if ($objectid > 0) } - print ''; + print ''; print ''; print '
'.$langs->trans("NbOfAttachedFiles").''.sizeof($filearray).'
'.$langs->trans("NbOfAttachedFiles").''.sizeof($filearray).'
'.$langs->trans("TotalSizeOfAttachedFiles").''.$totalsize.' '.$langs->trans("bytes").'
'; diff --git a/htdocs/comm/action/fiche.php b/htdocs/comm/action/fiche.php index 11652613242..87c79b65877 100644 --- a/htdocs/comm/action/fiche.php +++ b/htdocs/comm/action/fiche.php @@ -606,7 +606,11 @@ if ($_GET["id"]) $act = new ActionComm($db); $result=$act->fetch($_GET["id"]); - if ($result < 0) dol_print_error($db,$act->error); + if ($result < 0) + { + dol_print_error($db,$act->error); + exit; + } $societe = new Societe($db); if ($act->societe->id) diff --git a/htdocs/comm/action/info.php b/htdocs/comm/action/info.php index a8b069799a3..d80adc650de 100644 --- a/htdocs/comm/action/info.php +++ b/htdocs/comm/action/info.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2009 Laurent Destailleur + * Copyright (C) 2004-2010 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -46,7 +46,8 @@ if ($user->societe_id > 0) * View */ -llxHeader(); +$help_url='EN:Module_Agenda_En|FR:Module_Agenda|ES:M&omodulodulo_Agenda'; +llxHeader('',$langs->trans("Agenda"),$help_url); $act = new ActionComm($db); $act->fetch($_GET["id"]);