Skip to content

Commit

Permalink
Delete the contact who are gone,in the email list
Browse files Browse the repository at this point in the history
  • Loading branch information
lrasamoelina committed Aug 22, 2013
1 parent 83d5c1a commit 5ed186e
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 10 deletions.
2 changes: 1 addition & 1 deletion htdocs/contact/list.php
Expand Up @@ -340,7 +340,6 @@
{
$obj = $db->fetch_object($result);



if ($obj->statut == 0)
{
Expand Down Expand Up @@ -402,6 +401,7 @@

print "</tr>\n";
}

$i++;
}

Expand Down
7 changes: 5 additions & 2 deletions htdocs/core/lib/company.lib.php
Expand Up @@ -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";
Expand All @@ -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].">";
Expand Down Expand Up @@ -618,8 +621,8 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='')
print img_edit();
print '</a></td>';
}

print "</tr>\n";
}
$i++;
}
}
Expand Down
17 changes: 10 additions & 7 deletions htdocs/societe/class/societe.class.php
Expand Up @@ -1580,7 +1580,10 @@ function contact_property_array($mode='email')
{
$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."'";

Expand All @@ -1596,12 +1599,12 @@ function contact_property_array($mode='email')
$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++;
}
Expand Down

0 comments on commit 5ed186e

Please sign in to comment.