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("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 ' | '; 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 ' |
| '.$langs->trans("Location").' | '.$act->location.' | ||
| '.$langs->trans("Company").' | '.($act->societe->id?$act->societe->getNomUrl(1):$langs->trans("None")).' | '; + 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 " ".dolibarr_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 " ".dolibarr_print_phone($act->contact->phone_pro); + } + } } else { |