diff --git a/htdocs/comm/action/fiche.php b/htdocs/comm/action/fiche.php index 4dfec000e00..52a1736a71b 100644 --- a/htdocs/comm/action/fiche.php +++ b/htdocs/comm/action/fiche.php @@ -474,7 +474,9 @@ if ($_GET["action"] == 'create') print ''; // Si la societe est imposee, on propose ces contacts - if ($_REQUEST["socid"] > 0) + + // If company is forced propose contacts + if ($_REQUEST["socid"] > 0 && !($_REQUEST['contactid'] > 0)) { print ''.$langs->trans("ActionOnContact").''; $html->select_contacts($_REQUEST["socid"],$_REQUEST['contactid'],'contactid',1,1); @@ -485,12 +487,6 @@ if ($_GET["action"] == 'create') print '
'; print ''; - // Created by - /*print ''; - */ - // Affecte a print ''; print ''; print '
'.$langs->trans("ActionUserAsk").''; - print $user->getNomUrl(); - print '
'.$langs->trans("ActionAffectedTo").''; $html->select_users($_REQUEST["affectedto"]?$_REQUEST["affectedto"]:$actioncomm->usertodo,'affectedto',1); @@ -683,7 +679,7 @@ if ($_GET["id"]) print ''.$langs->trans("Contact").''; - $html->select_array("contactid", $act->societe->contact_array(), $act->contact->id, 1); + $html->select_array("contactid", $act->societe->contact_array(), $act->contact->id, 1); print '

'; @@ -778,12 +774,27 @@ if ($_GET["id"]) print ''; // Societe - contact - print ''; + print ''; print ''; print '
'.$langs->trans("Location").''.$act->location.'
'.$langs->trans("Company").''.($act->societe->id?$act->societe->getNomUrl(1):$langs->trans("None")).'
'.$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 "
".dolibarr_print_phone($act->societe->tel); + } + } + print '
'.$langs->trans("Contact").''; 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 "
".dolibarr_print_phone($act->contact->phone_pro); + } + } } else {