prise en charge les numros de 7, 9, 11 et 12 chiffres pour les telephones
Dans l'onglet 'client' d'une fiche de socit, le lien "ajouter un contact" ne transmet pas le "socid".
This commit is contained in:
parent
34398d588e
commit
08bbee4480
@ -417,7 +417,7 @@ if ($_socid > 0)
|
||||
print '<tr class="liste_titre"><td>'.$langs->trans("Firstname").' '.$langs->trans("LastName").'</td>';
|
||||
print '<td>'.$langs->trans("Poste").'</td><td>'.$langs->trans("Tel").'</td>';
|
||||
print '<td>'.$langs->trans("Fax").'</td><td>'.$langs->trans("EMail").'</td>';
|
||||
print "<td align=\"center\"><a href=\"".DOL_URL_ROOT.'/contact/fiche.php?socid='.$socid."&action=create\">".$langs->trans("AddContact")."</a></td>";
|
||||
print "<td align=\"center\"><a href=\"".DOL_URL_ROOT.'/contact/fiche.php?socid='.$objsoc->id."&action=create\">".$langs->trans("AddContact")."</a></td>";
|
||||
print '<td> </td>';
|
||||
print "</tr>";
|
||||
|
||||
|
||||
@ -4,6 +4,7 @@
|
||||
* Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
|
||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||
* Copyright (C) 2004 Christophe Combelles <ccomb@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -256,23 +257,47 @@ function dolibarr_print_object_info($object)
|
||||
|
||||
/*!
|
||||
\brief Formatage du telephone
|
||||
\param phone numéro de telephone à formater
|
||||
\param phone numéro de telephone à formater
|
||||
\return phone numéro de téléphone formaté
|
||||
\remarks net tient pas en compte le format belge 02/211 34 83
|
||||
\remarks ne tient pas en compte le format belge 02/211 34 83
|
||||
\remarks formattage automatique des numero non formates
|
||||
\remarks ajouté la prise en charge les numéros de 7, 9, 11 et 12 chiffres
|
||||
*/
|
||||
|
||||
function dolibarr_print_phone($phone)
|
||||
{
|
||||
if (strlen(trim($phone)) == 10)
|
||||
{
|
||||
return substr($phone,0,2)." ".substr($phone,2,2)." ".substr($phone,4,2)." ".substr($phone,6,2)." ".substr($phone,8,2);
|
||||
}
|
||||
else
|
||||
{
|
||||
return $phone;
|
||||
}
|
||||
if (strstr($phone, ' ')) return $phone;
|
||||
if (strlen(trim($phone)) == 10)
|
||||
{
|
||||
return substr($phone,0,2)." ".substr($phone,2,2)."
|
||||
".substr($phone,4,2)." ".substr($phone,6,2)." ".substr($phone,8,2);
|
||||
}
|
||||
elseif (strlen(trim($phone)) == 7)
|
||||
{
|
||||
return substr($phone,0,3)." ".substr($phone,3,2)." ".substr($phone,5,2);
|
||||
}
|
||||
elseif (strlen(trim($phone)) == 9)
|
||||
{
|
||||
return substr($phone,0,2)." ".substr($phone,2,3)."
|
||||
".substr($phone,5,2)." ".substr($phone,7,2);
|
||||
}
|
||||
elseif (strlen(trim($phone)) == 11)
|
||||
{
|
||||
return substr($phone,0,3)." ".substr($phone,3,2)."
|
||||
".substr($phone,5,2)." ".substr($phone,7,2)." ".substr($phone,9,2);
|
||||
}
|
||||
elseif (strlen(trim($phone)) == 12)
|
||||
{
|
||||
return substr($phone,0,4)." ".substr($phone,4,2)."
|
||||
".substr($phone,6,2)." ".substr($phone,8,2)." ".substr($phone,10,2);
|
||||
}
|
||||
else
|
||||
{
|
||||
return $phone;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
\brief Affiche logo dédié aux actions
|
||||
*/
|
||||
|
||||
Loading…
Reference in New Issue
Block a user