diff --git a/htdocs/comm/propal/contact.php b/htdocs/comm/propal/contact.php
index e12476483a0..54081f5bc21 100644
--- a/htdocs/comm/propal/contact.php
+++ b/htdocs/comm/propal/contact.php
@@ -189,11 +189,11 @@ if ($id > 0 || ! empty($ref))
if ($action == 'editdelivery_address')
{
- $formother->form_address($_SERVER['PHP_SELF'].'?id='.$object->id,$object->fk_delivery_address,GETPOST('socid','int'),'fk_address','propal',$object->id);
+ $formother->form_address($_SERVER['PHP_SELF'].'?id='.$object->id,$object->fk_delivery_address,$object->socid,'fk_address','propal',$object->id);
}
else
{
- $formother->form_address($_SERVER['PHP_SELF'].'?id='.$object->id,$object->fk_delivery_address,GETPOST('socid','int'),'none','propal',$object->id);
+ $formother->form_address($_SERVER['PHP_SELF'].'?id='.$object->id,$object->fk_delivery_address,$object->socid,'none','propal',$object->id);
}
print '';
}
diff --git a/htdocs/core/class/html.formother.class.php b/htdocs/core/class/html.formother.class.php
index 1c70695994c..5d53a352b68 100644
--- a/htdocs/core/class/html.formother.class.php
+++ b/htdocs/core/class/html.formother.class.php
@@ -720,7 +720,7 @@ class FormOther
}
/**
- * Show form to select addresse
+ * Show form to select address
*
* @param int $page Page
* @param string $selected Id condition pre-selectionne
diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php
index 73b58d7fb37..26b4163a1c2 100644
--- a/htdocs/core/lib/company.lib.php
+++ b/htdocs/core/lib/company.lib.php
@@ -631,8 +631,7 @@ function show_addresses($conf,$langs,$db,$object,$backtopage='')
print '
'.$langs->trans("Town").' | ';
print ''.$langs->trans("Country").' | ';
print ''.$langs->trans("Tel").' | ';
- print ''.$langs->trans("Fax").' | ';
- //print ''.$langs->trans("EMail").' | ';
+ print ''.$langs->trans("Fax").' | ';
print " | ";
print "";
@@ -647,8 +646,9 @@ function show_addresses($conf,$langs,$db,$object,$backtopage='')
print "";
print '| ';
- print $address->label;
- //print $addressstatic->getNomUrl(1);
+ $addressstatic->id = $address->id;
+ $addressstatic->label = $address->label;
+ print $addressstatic->getNomUrl(1);
print ' | ';
print ''.$address->name.' | ';
@@ -664,12 +664,7 @@ function show_addresses($conf,$langs,$db,$object,$backtopage='')
print '';
print '';
print dol_print_phone($address->fax,$address->country_code,$address->id,$object->id,'AC_FAX');
- print ' | ';
- /*
- print '';
- print dol_print_email($address->email,$address->id,$object->id,'AC_EMAIL');
- print ' | ';
- */
+ print '';
if ($user->rights->societe->creer)
{
diff --git a/htdocs/societe/class/address.class.php b/htdocs/societe/class/address.class.php
index e8fad145610..b4c456a1b05 100644
--- a/htdocs/societe/class/address.class.php
+++ b/htdocs/societe/class/address.class.php
@@ -433,6 +433,28 @@ class Address
print $this->db->error() . '
' . $sql;
}
}
+
+ /**
+ * Return name of address with link (and eventually picto)
+ * Use $this->id, $this->label, $this->socid
+ *
+ * @param int $withpicto Include picto with link
+ * @param string $option Where the link point to
+ * @return string String with URL
+ */
+ function getNomUrl($withpicto=0,$option='')
+ {
+ global $langs;
+
+ $result='';
+
+ $lien = '';
+ $lienfin='';
+
+ if ($withpicto) $result.=($lien.img_object($langs->trans("ShowAddress").': '.$this->label,'address').$lienfin.' ');
+ $result.=$lien.$this->label.$lienfin;
+ return $result;
+ }
/**
diff --git a/htdocs/theme/auguria/img/object_address.png b/htdocs/theme/auguria/img/object_address.png
new file mode 100644
index 00000000000..b20734da69a
Binary files /dev/null and b/htdocs/theme/auguria/img/object_address.png differ
diff --git a/htdocs/theme/bureau2crea/img/object_address.png b/htdocs/theme/bureau2crea/img/object_address.png
new file mode 100644
index 00000000000..b20734da69a
Binary files /dev/null and b/htdocs/theme/bureau2crea/img/object_address.png differ
diff --git a/htdocs/theme/cameleo/img/object_address.png b/htdocs/theme/cameleo/img/object_address.png
new file mode 100644
index 00000000000..b20734da69a
Binary files /dev/null and b/htdocs/theme/cameleo/img/object_address.png differ
diff --git a/htdocs/theme/eldy/img/object_address.png b/htdocs/theme/eldy/img/object_address.png
new file mode 100644
index 00000000000..b20734da69a
Binary files /dev/null and b/htdocs/theme/eldy/img/object_address.png differ