Possibilité de saisir des contacts sans sociétés.
This commit is contained in:
parent
e69032cf8d
commit
5aa7818890
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2002-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2002-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||||
* Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005 Regis Houssin <regis.houssin@cap-networks.com>
|
* Copyright (C) 2005 Regis Houssin <regis.houssin@cap-networks.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -20,7 +20,6 @@
|
|||||||
*
|
*
|
||||||
* $Id$
|
* $Id$
|
||||||
* $Source$
|
* $Source$
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -86,7 +85,10 @@ class Contact
|
|||||||
}
|
}
|
||||||
|
|
||||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."socpeople (datec, fk_soc, name, fk_user)";
|
$sql = "INSERT INTO ".MAIN_DB_PREFIX."socpeople (datec, fk_soc, name, fk_user)";
|
||||||
$sql.= " VALUES (now(),$this->socid,'$this->name',$user->id)";
|
$sql.= " VALUES (now(),";
|
||||||
|
if ($this->socid > 0) $sql.= " $this->socid,";
|
||||||
|
else $sql.= "null,";
|
||||||
|
$sql.= "'$this->name',$user->id)";
|
||||||
|
|
||||||
if ($this->db->query($sql) )
|
if ($this->db->query($sql) )
|
||||||
{
|
{
|
||||||
|
|||||||
@ -79,6 +79,12 @@ if ($contact->socid > 0)
|
|||||||
|
|
||||||
print '<tr><td>'.$langs->trans("Company").'</td><td colspan="3">'.$objsoc->nom_url.'</td></tr>';
|
print '<tr><td>'.$langs->trans("Company").'</td><td colspan="3">'.$objsoc->nom_url.'</td></tr>';
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print '<tr><td>'.$langs->trans("Company").'</td><td colspan="3">';
|
||||||
|
print $langs->trans("ContactNotLinkedToCompany");
|
||||||
|
print '</td></tr>';
|
||||||
|
}
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans("UserTitle").'</td><td colspan="3">';
|
print '<tr><td>'.$langs->trans("UserTitle").'</td><td colspan="3">';
|
||||||
print $contact->civilite_id;
|
print $contact->civilite_id;
|
||||||
|
|||||||
@ -19,7 +19,6 @@
|
|||||||
*
|
*
|
||||||
* $Id$
|
* $Id$
|
||||||
* $Source$
|
* $Source$
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -114,36 +113,36 @@ if ($_POST["action"] == 'confirm_delete' AND $_POST["confirm"] == 'yes')
|
|||||||
|
|
||||||
if ($_POST["action"] == 'update')
|
if ($_POST["action"] == 'update')
|
||||||
{
|
{
|
||||||
$contact = new Contact($db);
|
$contact = new Contact($db);
|
||||||
|
|
||||||
$contact->old_name = $_POST["old_name"];
|
$contact->old_name = $_POST["old_name"];
|
||||||
$contact->old_firstname = $_POST["old_firstname"];
|
$contact->old_firstname = $_POST["old_firstname"];
|
||||||
|
|
||||||
$contact->socid = $_POST["socid"];
|
$contact->socid = $_POST["socid"];
|
||||||
$contact->name = $_POST["name"];
|
$contact->name = $_POST["name"];
|
||||||
$contact->firstname = $_POST["firstname"];
|
$contact->firstname = $_POST["firstname"];
|
||||||
$contact->civilite_id = $_POST["civilite_id"];
|
$contact->civilite_id = $_POST["civilite_id"];
|
||||||
$contact->poste = $_POST["poste"];
|
$contact->poste = $_POST["poste"];
|
||||||
|
|
||||||
$contact->address = $_POST["address"];
|
$contact->address = $_POST["address"];
|
||||||
$contact->cp = $_POST["cp"];
|
$contact->cp = $_POST["cp"];
|
||||||
$contact->ville = $_POST["ville"];
|
$contact->ville = $_POST["ville"];
|
||||||
$contact->fk_pays = $_POST["pays_id"];
|
$contact->fk_pays = $_POST["pays_id"];
|
||||||
|
|
||||||
$contact->email = $_POST["email"];
|
$contact->email = $_POST["email"];
|
||||||
$contact->phone_pro = $_POST["phone_pro"];
|
$contact->phone_pro = $_POST["phone_pro"];
|
||||||
$contact->phone_perso = $_POST["phone_perso"];
|
$contact->phone_perso = $_POST["phone_perso"];
|
||||||
$contact->phone_mobile = $_POST["phone_mobile"];
|
$contact->phone_mobile = $_POST["phone_mobile"];
|
||||||
$contact->fax = $_POST["fax"];
|
$contact->fax = $_POST["fax"];
|
||||||
$contact->jabberid = $_POST["jabberid"];
|
$contact->jabberid = $_POST["jabberid"];
|
||||||
|
|
||||||
$contact->note = $_POST["note"];
|
$contact->note = $_POST["note"];
|
||||||
|
|
||||||
$result = $contact->update($_POST["contactid"], $user);
|
$result = $contact->update($_POST["contactid"], $user);
|
||||||
|
|
||||||
if ($contact->error)
|
if ($contact->error)
|
||||||
{
|
{
|
||||||
$error = $contact->error;
|
$error = $contact->error;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -244,7 +243,8 @@ if ($_GET["action"] == 'create')
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
print '<tr><td>'.$langs->trans("Company").'</td><td colspan="3">';
|
print '<tr><td>'.$langs->trans("Company").'</td><td colspan="3">';
|
||||||
print $form->select_societes('','socid','');
|
//print $form->select_societes('','socid','');
|
||||||
|
print $langs->trans("ContactNotLinkedToCompany");
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -282,7 +282,7 @@ if ($_GET["action"] == 'create')
|
|||||||
print $form->selectyesno("facturation",$contact->facturation);
|
print $form->selectyesno("facturation",$contact->facturation);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print '<tr><td align="center" colspan="4"><input type="submit" value="'.$langs->trans("Add").'"></td></tr>';
|
print '<tr><td align="center" colspan="4"><input type="submit" class="button" value="'.$langs->trans("Add").'"></td></tr>';
|
||||||
print "</table><br>";
|
print "</table><br>";
|
||||||
|
|
||||||
print "</form>";
|
print "</form>";
|
||||||
@ -309,7 +309,12 @@ elseif ($_GET["action"] == 'edit')
|
|||||||
|
|
||||||
print '<tr><td>'.$langs->trans("Company").'</td><td colspan="3">'.$objsoc->nom_url.'</td></tr>';
|
print '<tr><td>'.$langs->trans("Company").'</td><td colspan="3">'.$objsoc->nom_url.'</td></tr>';
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print '<tr><td>'.$langs->trans("Company").'</td><td colspan="3">';
|
||||||
|
print $langs->trans("ContactNotLinkedToCompany");
|
||||||
|
print '</td></tr>';
|
||||||
|
}
|
||||||
print '<tr><td>'.$langs->trans("UserTitle").'</td><td colspan="3">';
|
print '<tr><td>'.$langs->trans("UserTitle").'</td><td colspan="3">';
|
||||||
print $form->select_civilite($contact->civilite_id);
|
print $form->select_civilite($contact->civilite_id);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
@ -347,151 +352,157 @@ elseif ($_GET["action"] == 'edit')
|
|||||||
print $form->selectyesno("facturation",$contact->facturation);
|
print $form->selectyesno("facturation",$contact->facturation);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print '<tr><td colspan="4" align="center"><input type="submit" value="'.$langs->trans("Save").'"></td></tr>';
|
print '<tr><td colspan="4" align="center"><input type="submit" class="button" value="'.$langs->trans("Save").'"></td></tr>';
|
||||||
print "</table><br>";
|
print "</table><br>";
|
||||||
|
|
||||||
print "</form>";
|
print "</form>";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* Visualisation de la fiche
|
* Visualisation de la fiche
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
if ($contact->socid > 0)
|
if ($contact->socid > 0)
|
||||||
{
|
{
|
||||||
$objsoc = new Societe($db);
|
$objsoc = new Societe($db);
|
||||||
$objsoc->fetch($contact->socid);
|
$objsoc->fetch($contact->socid);
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans("Company").'</td><td colspan="3">'.$objsoc->nom_url.'</td></tr>';
|
print '<tr><td>'.$langs->trans("Company").'</td><td colspan="3">'.$objsoc->nom_url.'</td></tr>';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print '<tr><td>'.$langs->trans("Company").'</td><td colspan="3">';
|
||||||
|
print $langs->trans("ContactNotLinkedToCompany");
|
||||||
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans("UserTitle").'</td><td colspan="3">';
|
print '<tr><td>'.$langs->trans("UserTitle").'</td><td colspan="3">';
|
||||||
//TODO Aller chercher le libellé de la civilite a partir de l'id $contact->civilite_id
|
//TODO Aller chercher le libellé de la civilite a partir de l'id $contact->civilite_id
|
||||||
//print '<tr><td valign="top">Titre : '.$contact->civilite."<br>";
|
//print '<tr><td valign="top">Titre : '.$contact->civilite."<br>";
|
||||||
print $contact->civilite_id;
|
print $contact->civilite_id;
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print '<tr><td width="15%">'.$langs->trans("Lastname").'</td><td width="35%">'.$contact->name.'</td>';
|
print '<tr><td width="15%">'.$langs->trans("Lastname").'</td><td width="35%">'.$contact->name.'</td>';
|
||||||
print '<td width="15%">'.$langs->trans("Firstname").'</td><td width="35%">'.$contact->firstname.'</td></tr>';
|
print '<td width="15%">'.$langs->trans("Firstname").'</td><td width="35%">'.$contact->firstname.'</td></tr>';
|
||||||
|
|
||||||
print '<tr><td>Poste/Fonction</td><td colspan="3">'.$contact->poste.'</td>';
|
print '<tr><td>Poste/Fonction</td><td colspan="3">'.$contact->poste.'</td>';
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans("Address").'</td><td colspan="3">'.$contact->address.'</td></tr>';
|
print '<tr><td>'.$langs->trans("Address").'</td><td colspan="3">'.$contact->address.'</td></tr>';
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans("Zip").' / '.$langs->trans("Town").'</td><td colspan="3">'.$contact->cp.' ';
|
print '<tr><td>'.$langs->trans("Zip").' / '.$langs->trans("Town").'</td><td colspan="3">'.$contact->cp.' ';
|
||||||
print $contact->ville.'</td></tr>';
|
print $contact->ville.'</td></tr>';
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans("Country").'</td><td colspan="3">';
|
print '<tr><td>'.$langs->trans("Country").'</td><td colspan="3">';
|
||||||
print $contact->pays;
|
print $contact->pays;
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print '<tr><td>Tel Pro</td><td>'.$contact->phone_pro.'</td>';
|
print '<tr><td>Tel Pro</td><td>'.$contact->phone_pro.'</td>';
|
||||||
print '<td>Tel Perso</td><td>'.$contact->phone_perso.'</td></tr>';
|
print '<td>Tel Perso</td><td>'.$contact->phone_perso.'</td></tr>';
|
||||||
|
|
||||||
print '<td>Portable</td><td>'.$contact->phone_mobile.'</td>';
|
print '<td>Portable</td><td>'.$contact->phone_mobile.'</td>';
|
||||||
print '<td>'.$langs->trans("Fax").'</td><td>'.$contact->fax.'</td></tr>';
|
print '<td>'.$langs->trans("Fax").'</td><td>'.$contact->fax.'</td></tr>';
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans("EMail").'</td><td colspan="3">';
|
print '<tr><td>'.$langs->trans("EMail").'</td><td colspan="3">';
|
||||||
if ($contact->email && ! ValidEmail($contact->email))
|
if ($contact->email && ! ValidEmail($contact->email))
|
||||||
{
|
{
|
||||||
print '<div class="error">'.$langs->trans("ErrorBadEMail",$contact->email)."</div>";
|
print '<div class="error">'.$langs->trans("ErrorBadEMail",$contact->email)."</div>";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print $contact->email;
|
print $contact->email;
|
||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print '<tr><td>Jabberid</td><td colspan="3">'.$contact->jabberid.'</td></tr>';
|
print '<tr><td>Jabberid</td><td colspan="3">'.$contact->jabberid.'</td></tr>';
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans("Note").'</td><td colspan="3">';
|
print '<tr><td>'.$langs->trans("Note").'</td><td colspan="3">';
|
||||||
print nl2br($contact->note);
|
print nl2br($contact->note);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans("BillingContact").'</td><td colspan="3">';
|
print '<tr><td>'.$langs->trans("BillingContact").'</td><td colspan="3">';
|
||||||
print yn($contact->facturation);
|
print yn($contact->facturation);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print "</table>";
|
print "</table>";
|
||||||
|
|
||||||
print "</div>";
|
print "</div>";
|
||||||
|
|
||||||
|
|
||||||
// Barre d'actions
|
// Barre d'actions
|
||||||
if (! $user->societe_id)
|
if (! $user->societe_id)
|
||||||
{
|
{
|
||||||
print '<div class="tabsAction">';
|
print '<div class="tabsAction">';
|
||||||
|
|
||||||
print '<a class="tabAction" href="fiche.php?id='.$contact->id.'&action=edit">'.$langs->trans('Edit').'</a>';
|
print '<a class="tabAction" href="fiche.php?id='.$contact->id.'&action=edit">'.$langs->trans('Edit').'</a>';
|
||||||
|
|
||||||
if (! $contact->user_id && $user->admin)
|
if (! $contact->user_id && $user->admin)
|
||||||
{
|
|
||||||
print '<a class="tabAction" href="fiche.php?id='.$contact->id.'&action=create_user">'.$langs->trans("CreateDolibarrLogin").'</a>';
|
|
||||||
}
|
|
||||||
|
|
||||||
print '<a class="butDelete" href="fiche.php?id='.$contact->id.'&action=delete">'.$langs->trans('Delete').'</a>';
|
|
||||||
|
|
||||||
print "</div><br>";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Historique des actions vers ce contact
|
|
||||||
print_titre ($langs->trans("TasksHistoryForThisContact"));
|
|
||||||
|
|
||||||
print '<table width="100%" class="noborder">';
|
|
||||||
|
|
||||||
print "<tr class=\"liste_titre\">";
|
|
||||||
print "<td>".$langs->trans("Date")."</td><td>".$langs->trans("Actions")."</td>";
|
|
||||||
print "<td>".$langs->trans("CreatedBy")."</td></tr>";
|
|
||||||
|
|
||||||
$sql = "SELECT a.id, ".$db->pdate("a.datea")." as da, c.libelle, u.code, a.propalrowid, a.fk_user_author, fk_contact, u.rowid ";
|
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a, ".MAIN_DB_PREFIX."c_actioncomm as c, ".MAIN_DB_PREFIX."user as u ";
|
|
||||||
$sql .= " WHERE fk_contact = ".$contact->id;
|
|
||||||
$sql .= " AND u.rowid = a.fk_user_author";
|
|
||||||
$sql .= " AND c.id=a.fk_action ";
|
|
||||||
|
|
||||||
if ($contactid)
|
|
||||||
{
|
|
||||||
$sql .= " AND fk_contact = $contactid";
|
|
||||||
}
|
|
||||||
$sql .= " ORDER BY a.datea DESC, a.id DESC";
|
|
||||||
|
|
||||||
$resql=$db->query($sql);
|
|
||||||
if ($resql)
|
|
||||||
{
|
|
||||||
$i = 0 ;
|
|
||||||
$num = $db->num_rows($resql);
|
|
||||||
$var=true;
|
|
||||||
while ($i < $num)
|
|
||||||
{
|
{
|
||||||
$obj = $db->fetch_object($resql);
|
print '<a class="tabAction" href="fiche.php?id='.$contact->id.'&action=create_user">'.$langs->trans("CreateDolibarrLogin").'</a>';
|
||||||
$var=!$var;
|
}
|
||||||
print "<tr $bc[$var]>";
|
|
||||||
|
|
||||||
print "<td>". strftime("%d %b %Y %H:%M", $obj->da) ."</td>";
|
print '<a class="butDelete" href="fiche.php?id='.$contact->id.'&action=delete">'.$langs->trans('Delete').'</a>';
|
||||||
if ($obj->propalrowid)
|
|
||||||
|
print "</div><br>";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Historique des actions vers ce contact
|
||||||
|
print_titre ($langs->trans("TasksHistoryForThisContact"));
|
||||||
|
|
||||||
|
print '<table width="100%" class="noborder">';
|
||||||
|
|
||||||
|
print "<tr class=\"liste_titre\">";
|
||||||
|
print "<td>".$langs->trans("Date")."</td><td>".$langs->trans("Actions")."</td>";
|
||||||
|
print "<td>".$langs->trans("CreatedBy")."</td></tr>";
|
||||||
|
|
||||||
|
$sql = "SELECT a.id, ".$db->pdate("a.datea")." as da, c.libelle, u.code, a.propalrowid, a.fk_user_author, fk_contact, u.rowid ";
|
||||||
|
$sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a, ".MAIN_DB_PREFIX."c_actioncomm as c, ".MAIN_DB_PREFIX."user as u ";
|
||||||
|
$sql .= " WHERE fk_contact = ".$contact->id;
|
||||||
|
$sql .= " AND u.rowid = a.fk_user_author";
|
||||||
|
$sql .= " AND c.id=a.fk_action ";
|
||||||
|
|
||||||
|
if ($contactid)
|
||||||
|
{
|
||||||
|
$sql .= " AND fk_contact = $contactid";
|
||||||
|
}
|
||||||
|
$sql .= " ORDER BY a.datea DESC, a.id DESC";
|
||||||
|
|
||||||
|
$resql=$db->query($sql);
|
||||||
|
if ($resql)
|
||||||
|
{
|
||||||
|
$i = 0 ;
|
||||||
|
$num = $db->num_rows($resql);
|
||||||
|
$var=true;
|
||||||
|
while ($i < $num)
|
||||||
|
{
|
||||||
|
$obj = $db->fetch_object($resql);
|
||||||
|
$var=!$var;
|
||||||
|
print "<tr $bc[$var]>";
|
||||||
|
|
||||||
|
print "<td>". strftime("%d %b %Y %H:%M", $obj->da) ."</td>";
|
||||||
|
if ($obj->propalrowid)
|
||||||
{
|
{
|
||||||
print "<td><a href=\"".DOL_URL_ROOT."/comm/propal.php?propalid=".$obj->propalrowid."\">".$obj->libelle."</a></td>";
|
print "<td><a href=\"".DOL_URL_ROOT."/comm/propal.php?propalid=".$obj->propalrowid."\">".$obj->libelle."</a></td>";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print "<td>$obj->libelle</td>";
|
print "<td>$obj->libelle</td>";
|
||||||
}
|
}
|
||||||
|
|
||||||
print "<td>$obj->code </td>";
|
print "<td>$obj->code </td>";
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dolibarr_print_error($db);
|
dolibarr_print_error($db);
|
||||||
}
|
}
|
||||||
print "</table>";
|
print "</table>";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -232,8 +232,17 @@ if ($result)
|
|||||||
print img_object($langs->trans("ShowContact"),"contact");
|
print img_object($langs->trans("ShowContact"),"contact");
|
||||||
print ' '.$obj->name.'</a></td>';
|
print ' '.$obj->name.'</a></td>';
|
||||||
print '<td>'.$obj->firstname.'</td>';
|
print '<td>'.$obj->firstname.'</td>';
|
||||||
print '<td><a href="'.DOL_URL_ROOT.'/comm/fiche.php?socid='.$obj->idp.'">';
|
print '<td>';
|
||||||
print img_object($langs->trans("ShowCompany"),"company").' '.dolibarr_trunc($obj->nom,44).'</a></td>';
|
if ($obj->idp)
|
||||||
|
{
|
||||||
|
print '<a href="'.DOL_URL_ROOT.'/comm/fiche.php?socid='.$obj->idp.'">';
|
||||||
|
print img_object($langs->trans("ShowCompany"),"company").' '.dolibarr_trunc($obj->nom,40).'</a>';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print ' ';
|
||||||
|
}
|
||||||
|
print '</td>';
|
||||||
print '<td><a href="'.DOL_URL_ROOT.'/comm/action/fiche.php?action=create&actionid=1&contactid='.$obj->cidp.'&socid='.$obj->idp.'">'.dolibarr_print_phone($obj->phone).'</a> </td>';
|
print '<td><a href="'.DOL_URL_ROOT.'/comm/action/fiche.php?action=create&actionid=1&contactid='.$obj->cidp.'&socid='.$obj->idp.'">'.dolibarr_print_phone($obj->phone).'</a> </td>';
|
||||||
|
|
||||||
if ($_GET["view"] == 'phone')
|
if ($_GET["view"] == 'phone')
|
||||||
|
|||||||
@ -111,13 +111,19 @@ if ($_GET["action"] == 'edit')
|
|||||||
|
|
||||||
print '<tr><td>'.$langs->trans("Company").'</td><td colspan="3">'.$objsoc->nom_url.'</td>';
|
print '<tr><td>'.$langs->trans("Company").'</td><td colspan="3">'.$objsoc->nom_url.'</td>';
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print '<tr><td>'.$langs->trans("Company").'</td><td colspan="3">';
|
||||||
|
print $langs->trans("ContactNotLinkedToCompany");
|
||||||
|
print '</td></tr>';
|
||||||
|
}
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans("UserTitle").'</td><td colspan="3">';
|
print '<tr><td>'.$langs->trans("UserTitle").'</td><td colspan="3">';
|
||||||
print $contact->civilite_id;
|
print $contact->civilite_id;
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print '<tr><td width="15%">'.$langs->trans("Lastname").'</td><td width="35%">'.$contact->nom.'</td>';
|
print '<tr><td width="15%">'.$langs->trans("Lastname").'</td><td width="35%">'.$contact->nom.'</td>';
|
||||||
print '<td width="15%">'.$langs->trans("Firstname").'</td><td width="35%">'.$contact->prenom.'</td>';
|
print '<td width="15%">'.$langs->trans("Firstname").'</td><td width="35%">'.$contact->prenom.'</td>';
|
||||||
|
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans("Birthday").'</td><td>';
|
print '<tr><td>'.$langs->trans("Birthday").'</td><td>';
|
||||||
@ -161,12 +167,19 @@ else
|
|||||||
print '<tr><td>'.$langs->trans("Company").'</td><td colspan="3">'.$objsoc->nom_url.'</td></tr>';
|
print '<tr><td>'.$langs->trans("Company").'</td><td colspan="3">'.$objsoc->nom_url.'</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans("UserTitle").'</td><td colspan="3">';
|
else
|
||||||
print $contact->civilite_id;
|
{
|
||||||
print '</td></tr>';
|
print '<tr><td>'.$langs->trans("Company").'</td><td colspan="3">';
|
||||||
|
print $langs->trans("ContactNotLinkedToCompany");
|
||||||
|
print '</td></tr>';
|
||||||
|
}
|
||||||
|
|
||||||
print '<tr><td width="15%">'.$langs->trans("Lastname").'</td><td width="35%">'.$contact->name.'</td>';
|
print '<tr><td>'.$langs->trans("UserTitle").'</td><td colspan="3">';
|
||||||
print '<td width="15%">'.$langs->trans("Firstname").'</td><td width="35%">'.$contact->firstname.'</td></tr>';
|
print $contact->civilite_id;
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
|
print '<tr><td width="15%">'.$langs->trans("Lastname").'</td><td width="35%">'.$contact->name.'</td>';
|
||||||
|
print '<td width="15%">'.$langs->trans("Firstname").'</td><td width="35%">'.$contact->firstname.'</td></tr>';
|
||||||
|
|
||||||
if ($contact->birthday && $contact->birthday > 0) {
|
if ($contact->birthday && $contact->birthday > 0) {
|
||||||
print '<tr><td>'.$langs->trans("Birthdate").'</td><td colspan="3">'.dolibarr_print_date($contact->birthday);
|
print '<tr><td>'.$langs->trans("Birthdate").'</td><td colspan="3">'.dolibarr_print_date($contact->birthday);
|
||||||
|
|||||||
@ -163,14 +163,19 @@ class MenuLeft {
|
|||||||
|
|
||||||
$newmenu->add_submenu(DOL_URL_ROOT."/soc.php?leftmenu=prospects&action=create&type=p", $langs->trans("MenuNewProspect"), 1, $user->rights->societe->creer);
|
$newmenu->add_submenu(DOL_URL_ROOT."/soc.php?leftmenu=prospects&action=create&type=p", $langs->trans("MenuNewProspect"), 1, $user->rights->societe->creer);
|
||||||
$newmenu->add_submenu(DOL_URL_ROOT."/comm/prospect/prospects.php?leftmenu=prospects", $langs->trans("List"), 1, $user->rights->societe->lire);
|
$newmenu->add_submenu(DOL_URL_ROOT."/comm/prospect/prospects.php?leftmenu=prospects", $langs->trans("List"), 1, $user->rights->societe->lire);
|
||||||
$newmenu->add_submenu(DOL_URL_ROOT."/comm/contact.php?leftmenu=prospects&type=p", $langs->trans("Contacts"), 1, $user->rights->societe->lire);
|
$newmenu->add_submenu(DOL_URL_ROOT."/comm/contact.php?leftmenu=prospects&type=p", $langs->trans("Contacts"), 1, $user->rights->societe->lire);
|
||||||
|
|
||||||
// Clients
|
// Clients
|
||||||
$newmenu->add(DOL_URL_ROOT."/comm/index.php?leftmenu=customers", $langs->trans("Customers"), 0, $user->rights->societe->creer);
|
$newmenu->add(DOL_URL_ROOT."/comm/index.php?leftmenu=customers", $langs->trans("Customers"), 0, $user->rights->societe->creer);
|
||||||
|
|
||||||
$newmenu->add_submenu(DOL_URL_ROOT."/soc.php?leftmenu=customers&action=create&type=c", $langs->trans("MenuNewCustomer"), 1, $user->rights->societe->creer);
|
$newmenu->add_submenu(DOL_URL_ROOT."/soc.php?leftmenu=customers&action=create&type=c", $langs->trans("MenuNewCustomer"), 1, $user->rights->societe->creer);
|
||||||
$newmenu->add_submenu(DOL_URL_ROOT."/comm/clients.php?leftmenu=customers", $langs->trans("List"), 1, $user->rights->societe->lire);
|
$newmenu->add_submenu(DOL_URL_ROOT."/comm/clients.php?leftmenu=customers", $langs->trans("List"), 1, $user->rights->societe->lire);
|
||||||
$newmenu->add_submenu(DOL_URL_ROOT."/comm/contact.php?leftmenu=customers&type=c", $langs->trans("Contacts"), 1, $user->rights->societe->lire);
|
$newmenu->add_submenu(DOL_URL_ROOT."/comm/contact.php?leftmenu=customers&type=c", $langs->trans("Contacts"), 1, $user->rights->societe->lire);
|
||||||
|
|
||||||
|
// Contacts
|
||||||
|
$newmenu->add(DOL_URL_ROOT."/contact/index.php?leftmenu=contacts", $langs->trans("Contacts"), 0, $user->rights->societe->lire);
|
||||||
|
$newmenu->add_submenu(DOL_URL_ROOT."/contact/fiche.php?leftmenu=contacts&action=create", $langs->trans("NewContact"), 1, $user->rights->societe->creer);
|
||||||
|
$newmenu->add_submenu(DOL_URL_ROOT."/contact/index.php?leftmenu=contacts", $langs->trans("List"), 1, $user->rights->societe->lire);
|
||||||
|
|
||||||
// Actions
|
// Actions
|
||||||
$newmenu->add(DOL_URL_ROOT."/comm/action/index.php?leftmenu=actions", $langs->trans("Actions"), 0);
|
$newmenu->add(DOL_URL_ROOT."/comm/action/index.php?leftmenu=actions", $langs->trans("Actions"), 0);
|
||||||
|
|||||||
@ -111,3 +111,4 @@ NoRIB=No RIB defined
|
|||||||
NoParentCompany=None
|
NoParentCompany=None
|
||||||
ExportImport=Import-Export
|
ExportImport=Import-Export
|
||||||
ExportCardToFormat=Export card to format
|
ExportCardToFormat=Export card to format
|
||||||
|
ContactNotLinkedToCompany=Contact not linked to any company
|
||||||
@ -111,3 +111,4 @@ NoRIB=Aucun RIB d
|
|||||||
NoParentCompany=Aucune
|
NoParentCompany=Aucune
|
||||||
ExportImport=Import-Export
|
ExportImport=Import-Export
|
||||||
ExportCardToFormat=Exporter fiche au format
|
ExportCardToFormat=Exporter fiche au format
|
||||||
|
ContactNotLinkedToCompany=Contact non lié à une société
|
||||||
Loading…
Reference in New Issue
Block a user