Fix: uniformize code
This commit is contained in:
parent
55b436c254
commit
a108a2fef8
@ -41,10 +41,13 @@ if (empty($phone))
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = "select nom from llx_societe s ";
|
$sql = "SELECT nom FROM ".MAIN_DB_PREFIX."societe as s";
|
||||||
$sql.= "left join llx_socpeople sp on sp.fk_soc=s.rowid";
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."socpeople as sp ON sp.fk_soc = s.rowid";
|
||||||
$sql.= " where s.tel='".addslashes($phone)."' or sp.phone='".addslashes($phone)."' or sp.phone_perso='".addslashes($phone)."' or sp.phone_mobile='".addslashes($phone)."'";
|
$sql.= " WHERE s.entity=".$conf->entity;
|
||||||
//$sql.= " AND entity=".$conf->entity;
|
$sql.= " AND (s.tel='".addslashes($phone)."'";
|
||||||
|
$sql.= " OR sp.phone='".addslashes($phone)."'";
|
||||||
|
$sql.= " OR sp.phone_perso='".addslashes($phone)."'";
|
||||||
|
$sql.= " OR sp.phone_mobile='".addslashes($phone)."')";
|
||||||
$sql.= $db->plimit(1);
|
$sql.= $db->plimit(1);
|
||||||
|
|
||||||
dol_syslog('cidlookup search information with phone '.$phone, LOG_DEBUG);
|
dol_syslog('cidlookup search information with phone '.$phone, LOG_DEBUG);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user