diff --git a/htdocs/soc.php b/htdocs/soc.php
index 2cdfcc0935a..1dc5fd49c93 100644
--- a/htdocs/soc.php
+++ b/htdocs/soc.php
@@ -103,7 +103,8 @@ if ((! $_POST["getcustomercode"] && ! $_POST["getsuppliercode"])
$soc->departement_id = $_POST["departement_id"];
$soc->tel = $_POST["tel"];
$soc->fax = $_POST["fax"];
- $soc->url = ereg_replace( "http://", "", $_POST["url"] );
+ $soc->email = $_POST["email"];
+ $soc->url = $_POST["url"];
$soc->siren = $_POST["siren"];
$soc->siret = $_POST["siret"];
$soc->ape = $_POST["ape"];
@@ -223,6 +224,7 @@ if ($_POST["getcustomercode"] || $_POST["getsuppliercode"] ||
$soc->departement_id=$_POST["departement_id"];
$soc->tel=$_POST["tel"];
$soc->fax=$_POST["fax"];
+ $soc->email=$_POST["email"];
$soc->url=$_POST["url"];
$soc->capital=$_POST["capital"];
$soc->siren=$_POST["siren"];
@@ -329,7 +331,9 @@ if ($_POST["getcustomercode"] || $_POST["getsuppliercode"] ||
print '
| '.$langs->trans('Phone').' | | ';
print ''.$langs->trans('Fax').' | |
';
- print '| '.$langs->trans('Web').' | |
';
+ print '| '.$langs->trans('EMail').' | | ';
+ print ''.$langs->trans('Web').' | |
';
+
print '| '.$langs->trans('Capital').' | '.$langs->trans("Currency".$conf->monnaie).' |
';
@@ -448,6 +452,7 @@ elseif ($_GET["action"] == 'edit' || $_POST["action"] == 'edit')
$soc->departement_id=$_POST["departement_id"];
$soc->tel=$_POST["tel"];
$soc->fax=$_POST["fax"];
+ $soc->email=$_POST["email"];
$soc->url=$_POST["url"];
$soc->capital=$_POST["capital"];
$soc->siren=$_POST["siren"];
@@ -555,7 +560,8 @@ elseif ($_GET["action"] == 'edit' || $_POST["action"] == 'edit')
print '| '.$langs->trans('Phone').' | | ';
print ''.$langs->trans('Fax').' | |
';
- print '| '.$langs->trans('Web').' | |
';
+ print '| '.$langs->trans('EMail').' | | ';
+ print ''.$langs->trans('Web').' | |
';
print '';
// IdProf1
@@ -703,8 +709,13 @@ else
print '
| '.$langs->trans('Phone').' | '.dolibarr_print_phone($soc->tel).' | ';
print ''.$langs->trans('Fax').' | '.dolibarr_print_phone($soc->fax).' |
';
- print '| '.$langs->trans('Web').' | ';
- if ($soc->url) { print 'http://'.$soc->url.''; }
+ print ' |
| '.$langs->trans('EMail').' | ';
+ if ($soc->email) { print ''.$soc->email.''; }
+ else print ' ';
+ print ' | ';
+ print ''.$langs->trans('Web').' | ';
+ if ($soc->url) { print 'http://'.dolibarr_trunc($soc->url,32).''; }
+ else print ' ';
print ' |
';
// ProfId1
diff --git a/htdocs/societe.class.php b/htdocs/societe.class.php
index 5f8d165e2a2..7f13b0448b3 100644
--- a/htdocs/societe.class.php
+++ b/htdocs/societe.class.php
@@ -50,6 +50,7 @@ class Societe
var $pays_code;
var $tel;
var $fax;
+ var $email;
var $url;
var $siren;
var $siret;
@@ -278,6 +279,7 @@ class Societe
$this->pays_id=trim($this->pays_id);
$this->tel=trim($this->tel);
$this->fax=trim($this->fax);
+ $this->email=trim($this->email);
$this->url=trim($this->url);
$this->siren=trim($this->siren);
$this->siret=trim($this->siret);
@@ -323,6 +325,7 @@ class Societe
$sql .= ",tel = ".($this->tel?"'".addslashes($this->tel)."'":"null");
$sql .= ",fax = ".($this->fax?"'".addslashes($this->fax)."'":"null");
+ $sql .= ",email = ".($this->email?"'".addslashes($this->email)."'":"null");
$sql .= ",url = ".($this->url?"'".addslashes($this->url)."'":"null");
$sql .= ",siren = '". addslashes($this->siren) ."'";
@@ -445,7 +448,7 @@ class Societe
if($conf->global->PRODUIT_MULTIPRICES == 1)
$sql .= ', s.price_level';
$sql .= ','. $this->db->pdate('s.tms').' as date_update';
- $sql .= ', s.tel, s.fax, s.url,s.cp,s.ville, s.note, s.siren, client, fournisseur';
+ $sql .= ', s.tel, s.fax, s.email, s.url, s.cp, s.ville, s.note, s.siren, client, fournisseur';
$sql .= ', s.siret, s.capital, s.ape, s.tva_intra, s.rubrique';
$sql .= ', s.fk_typent as typent_id';
$sql .= ', s.fk_effectif as effectif_id, e.libelle as effectif';
@@ -491,6 +494,7 @@ class Societe
$this->stcomm_id = $obj->fk_stcomm; // id statut commercial
$this->statut_commercial = $libelle; // libelle statut commercial
+ $this->email = $obj->email;
$this->url = $obj->url;
$this->tel = $obj->tel;
$this->fax = $obj->fax;