Skip to content
Snippets Groups Projects
Commit 5ed186e1 authored by Lalaina Rasamoelina's avatar Lalaina Rasamoelina
Browse files

Delete the contact who are gone,in the email list

parent 83d5c1a4
No related branches found
No related tags found
No related merge requests found
......@@ -340,7 +340,6 @@ if ($result)
{
$obj = $db->fetch_object($result);
if ($obj->statut == 0)
{
......@@ -402,6 +401,7 @@ if ($result)
print "</tr>\n";
}
$i++;
}
......
......@@ -552,7 +552,8 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='')
}
print "</tr>";
$sql = "SELECT p.rowid, p.lastname, p.firstname, p.fk_pays, p.poste, p.phone, p.phone_mobile, p.fax, p.email ";
$sql = "SELECT p.rowid, p.lastname, p.firstname, p.fk_pays, p.poste, p.phone, p.phone_mobile, p.fax, p.email, p.note ";
$sql .= " FROM ".MAIN_DB_PREFIX."socpeople as p";
$sql .= " WHERE p.fk_soc = ".$object->id;
$sql .= " ORDER by p.datec";
......@@ -568,6 +569,8 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='')
while ($i < $num)
{
$obj = $db->fetch_object($result);
if($obj->statut == 0)
{
$var = !$var;
print "<tr ".$bc[$var].">";
......@@ -618,8 +621,8 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='')
print img_edit();
print '</a></td>';
}
print "</tr>\n";
}
$i++;
}
}
......
......@@ -1580,7 +1580,10 @@ class Societe extends CommonObject
{
$contact_property = array();
$sql = "SELECT rowid, email, phone_mobile, lastname, poste, firstname";
$sql = "SELECT rowid, email, statut, phone_mobile, lastname, firstname";
$sql.= " FROM ".MAIN_DB_PREFIX."socpeople";
$sql.= " WHERE fk_soc = '".$this->id."'";
......@@ -1596,12 +1599,12 @@ class Societe extends CommonObject
$obj = $this->db->fetch_object($resql);
if ($mode == 'email') $property=$obj->email;
else if ($mode == 'mobile') $property=$obj->phone_mobile;
if(!empty($obj->poste)){
$contact_property[$obj->rowid] = trim(dolGetFirstLastname($obj->firstname,$obj->lastname))." (".$obj->poste.")"." &lt;".$property."&gt;";
}
else
{
$contact_property[$obj->rowid] = trim(dolGetFirstLastname($obj->firstname,$obj->lastname))." &lt;".$property."&gt;";
if ($obj->statut == 0)
{
$contact_property[$obj->rowid] = trim(dolGetFirstLastname($obj->firstname,$obj->lastname))." &lt;".$property."&gt;";
}
$i++;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment