mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-05 17:18:13 +01:00
@@ -605,11 +605,11 @@ else
|
|||||||
});
|
});
|
||||||
|
|
||||||
$("#copyaddressfromsoc").click(function() {
|
$("#copyaddressfromsoc").click(function() {
|
||||||
$(\'textarea[name="address"]\').text("'.addslashes($objsoc->address).'");
|
$(\'textarea[name="address"]\').text("'.dol_escape_js($objsoc->address).'");
|
||||||
$(\'input[name="zipcode"]\').val("'.addslashes($objsoc->zip).'");
|
$(\'input[name="zipcode"]\').val("'.dol_escape_js($objsoc->zip).'");
|
||||||
$(\'input[name="town"]\').val("'.addslashes($objsoc->town).'");
|
$(\'input[name="town"]\').val("'.dol_escape_js($objsoc->town).'");
|
||||||
$(\'select[name="country_id"]\').val("'.addslashes($objsoc->country_id).'");
|
$(\'select[name="country_id"]\').val("'.dol_escape_js($objsoc->country_id).'");
|
||||||
$(\'select[name="state_id"]\').val("'.addslashes($objsoc->state_id).'");
|
$(\'select[name="state_id"]\').val("'.dol_escape_js($objsoc->state_id).'");
|
||||||
});
|
});
|
||||||
})'."\n";
|
})'."\n";
|
||||||
print '</script>'."\n";
|
print '</script>'."\n";
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ $userid=GETPOST('userid','int');
|
|||||||
$begin=GETPOST('begin');
|
$begin=GETPOST('begin');
|
||||||
|
|
||||||
if (! $sortorder) $sortorder="ASC";
|
if (! $sortorder) $sortorder="ASC";
|
||||||
if (! $sortfield) $sortfield="p.name";
|
if (! $sortfield) $sortfield="p.lastname";
|
||||||
if ($page < 0) { $page = 0; }
|
if ($page < 0) { $page = 0; }
|
||||||
$limit = $conf->liste_limit;
|
$limit = $conf->liste_limit;
|
||||||
$offset = $limit * $page;
|
$offset = $limit * $page;
|
||||||
@@ -114,7 +114,7 @@ llxHeader('',$title,'EN:Module_Third_Parties|FR:Module_Tiers|ES:Módulo_Em
|
|||||||
$form=new Form($db);
|
$form=new Form($db);
|
||||||
|
|
||||||
$sql = "SELECT s.rowid as socid, s.nom as name,";
|
$sql = "SELECT s.rowid as socid, s.nom as name,";
|
||||||
$sql.= " p.rowid as cidp, p.name as lastname, p.firstname, p.poste, p.email,";
|
$sql.= " p.rowid as cidp, p.lastname as lastname, p.firstname, p.poste, p.email,";
|
||||||
$sql.= " p.phone, p.phone_mobile, p.fax, p.fk_pays, p.priv, p.tms,";
|
$sql.= " p.phone, p.phone_mobile, p.fax, p.fk_pays, p.priv, p.tms,";
|
||||||
$sql.= " cp.code as country_code";
|
$sql.= " cp.code as country_code";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."socpeople as p";
|
$sql.= " FROM ".MAIN_DB_PREFIX."socpeople as p";
|
||||||
@@ -144,7 +144,7 @@ else
|
|||||||
|
|
||||||
if ($search_lastname) // filtre sur le nom
|
if ($search_lastname) // filtre sur le nom
|
||||||
{
|
{
|
||||||
$sql .= " AND p.name LIKE '%".$db->escape($search_lastname)."%'";
|
$sql .= " AND p.lastname LIKE '%".$db->escape($search_lastname)."%'";
|
||||||
}
|
}
|
||||||
if ($search_firstname) // filtre sur le prenom
|
if ($search_firstname) // filtre sur le prenom
|
||||||
{
|
{
|
||||||
@@ -200,7 +200,7 @@ else if ($type == "p") // filtre sur type
|
|||||||
}
|
}
|
||||||
if ($sall)
|
if ($sall)
|
||||||
{
|
{
|
||||||
$sql .= " AND (p.name LIKE '%".$db->escape($sall)."%' OR p.firstname LIKE '%".$db->escape($sall)."%' OR p.email LIKE '%".$db->escape($sall)."%')";
|
$sql .= " AND (p.lastname LIKE '%".$db->escape($sall)."%' OR p.firstname LIKE '%".$db->escape($sall)."%' OR p.email LIKE '%".$db->escape($sall)."%')";
|
||||||
}
|
}
|
||||||
if (! empty($socid))
|
if (! empty($socid))
|
||||||
{
|
{
|
||||||
@@ -256,7 +256,7 @@ if ($result)
|
|||||||
|
|
||||||
// Ligne des titres
|
// Ligne des titres
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print_liste_field_titre($langs->trans("Lastname"),$_SERVER["PHP_SELF"],"p.name", $begin, $param, '', $sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Lastname"),$_SERVER["PHP_SELF"],"p.lastname", $begin, $param, '', $sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("Firstname"),$_SERVER["PHP_SELF"],"p.firstname", $begin, $param, '', $sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Firstname"),$_SERVER["PHP_SELF"],"p.firstname", $begin, $param, '', $sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("PostOrFunction"),$_SERVER["PHP_SELF"],"p.poste", $begin, $param, '', $sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("PostOrFunction"),$_SERVER["PHP_SELF"],"p.poste", $begin, $param, '', $sortfield,$sortorder);
|
||||||
if (empty($conf->global->SOCIETE_DISABLE_CONTACTS)) print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom", $begin, $param, '', $sortfield,$sortorder);
|
if (empty($conf->global->SOCIETE_DISABLE_CONTACTS)) print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom", $begin, $param, '', $sortfield,$sortorder);
|
||||||
|
|||||||
@@ -1253,7 +1253,7 @@ else
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Address
|
// Address
|
||||||
print '<tr><td valign="top">'.$langs->trans('Address').'</td><td colspan="3"><textarea name="adresse" cols="40" rows="3" wrap="soft">';
|
print '<tr><td valign="top">'.$langs->trans('Address').'</td><td colspan="3"><textarea name="address" cols="40" rows="3" wrap="soft">';
|
||||||
print $object->address;
|
print $object->address;
|
||||||
print '</textarea></td></tr>';
|
print '</textarea></td></tr>';
|
||||||
|
|
||||||
|
|||||||
@@ -85,6 +85,7 @@ if ($mode == 'search')
|
|||||||
$sql.= " OR s.code_client LIKE '%".$db->escape($socname)."%'";
|
$sql.= " OR s.code_client LIKE '%".$db->escape($socname)."%'";
|
||||||
$sql.= " OR s.email LIKE '%".$db->escape($socname)."%'";
|
$sql.= " OR s.email LIKE '%".$db->escape($socname)."%'";
|
||||||
$sql.= " OR s.url LIKE '%".$db->escape($socname)."%'";
|
$sql.= " OR s.url LIKE '%".$db->escape($socname)."%'";
|
||||||
|
$sql.= " OR s.siren LIKE '%".$db->escape($socname)."%'";
|
||||||
|
|
||||||
if (!empty($conf->barcode->enabled))
|
if (!empty($conf->barcode->enabled))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user