Delete the contact who are gone,in the email list
This commit is contained in:
parent
83d5c1a441
commit
5ed186e178
@ -340,7 +340,6 @@ if ($result)
|
|||||||
{
|
{
|
||||||
$obj = $db->fetch_object($result);
|
$obj = $db->fetch_object($result);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if ($obj->statut == 0)
|
if ($obj->statut == 0)
|
||||||
{
|
{
|
||||||
@ -402,6 +401,7 @@ if ($result)
|
|||||||
|
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -552,7 +552,8 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='')
|
|||||||
}
|
}
|
||||||
print "</tr>";
|
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 .= " FROM ".MAIN_DB_PREFIX."socpeople as p";
|
||||||
$sql .= " WHERE p.fk_soc = ".$object->id;
|
$sql .= " WHERE p.fk_soc = ".$object->id;
|
||||||
$sql .= " ORDER by p.datec";
|
$sql .= " ORDER by p.datec";
|
||||||
@ -568,6 +569,8 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='')
|
|||||||
while ($i < $num)
|
while ($i < $num)
|
||||||
{
|
{
|
||||||
$obj = $db->fetch_object($result);
|
$obj = $db->fetch_object($result);
|
||||||
|
if($obj->statut == 0)
|
||||||
|
{
|
||||||
$var = !$var;
|
$var = !$var;
|
||||||
|
|
||||||
print "<tr ".$bc[$var].">";
|
print "<tr ".$bc[$var].">";
|
||||||
@ -618,8 +621,8 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='')
|
|||||||
print img_edit();
|
print img_edit();
|
||||||
print '</a></td>';
|
print '</a></td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
}
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1580,7 +1580,10 @@ class Societe extends CommonObject
|
|||||||
{
|
{
|
||||||
$contact_property = array();
|
$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.= " FROM ".MAIN_DB_PREFIX."socpeople";
|
||||||
$sql.= " WHERE fk_soc = '".$this->id."'";
|
$sql.= " WHERE fk_soc = '".$this->id."'";
|
||||||
|
|
||||||
@ -1596,12 +1599,12 @@ class Societe extends CommonObject
|
|||||||
$obj = $this->db->fetch_object($resql);
|
$obj = $this->db->fetch_object($resql);
|
||||||
if ($mode == 'email') $property=$obj->email;
|
if ($mode == 'email') $property=$obj->email;
|
||||||
else if ($mode == 'mobile') $property=$obj->phone_mobile;
|
else if ($mode == 'mobile') $property=$obj->phone_mobile;
|
||||||
if(!empty($obj->poste)){
|
|
||||||
$contact_property[$obj->rowid] = trim(dolGetFirstLastname($obj->firstname,$obj->lastname))." (".$obj->poste.")"." <".$property.">";
|
|
||||||
}
|
if ($obj->statut == 0)
|
||||||
else
|
{
|
||||||
{
|
$contact_property[$obj->rowid] = trim(dolGetFirstLastname($obj->firstname,$obj->lastname))." <".$property.">";
|
||||||
$contact_property[$obj->rowid] = trim(dolGetFirstLastname($obj->firstname,$obj->lastname))." <".$property.">";
|
|
||||||
}
|
}
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user