diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php
index 249646a8f54..0ae5ab4b217 100644
--- a/htdocs/commande/class/commande.class.php
+++ b/htdocs/commande/class/commande.class.php
@@ -3367,12 +3367,8 @@ class Commande extends CommonOrder
if ($user->rights->commande->lire) {
$label = ''.$langs->trans("ShowOrder").'';
- if (!empty($this->ref)) {
- $label .= '
'.$langs->trans('Ref').': '.$this->ref;
- }
- if (!empty($this->ref_client)) {
- $label .= '
'.$langs->trans('RefCustomer').': '.$this->ref_client;
- }
+ $label .= '
'.$langs->trans('Ref').': '.$this->ref;
+ $label .= '
'.$langs->trans('RefCustomer').': '.($this->ref_customer ? $this->ref_customer : $this->ref_client);
if (!empty($this->total_ht)) {
$label .= '
'.$langs->trans('AmountHT').': '.price($this->total_ht, 0, $langs, 0, -1, -1, $conf->currency);
}
diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php
index c5d84836f90..9cf00cac1cb 100644
--- a/htdocs/expedition/class/expedition.class.php
+++ b/htdocs/expedition/class/expedition.class.php
@@ -1461,27 +1461,40 @@ class Expedition extends CommonObject
* @param int $option Where point the link
* @param int $max Max length to show
* @param int $short Use short labels
+ * @param int $notooltip 1=No tooltip
* @return string String with URL
*/
- function getNomUrl($withpicto=0,$option=0,$max=0,$short=0)
+ function getNomUrl($withpicto=0,$option=0,$max=0,$short=0,$notooltip=0)
{
global $langs;
$result='';
$label = '' . $langs->trans("ShowSending") . '';
- if (! empty($this->ref))
- $label .= '
' . $langs->trans('Ref') . ': '.$this->ref;
-
+ $label .= '
' . $langs->trans('Ref') . ': '.$this->ref;
+ $label .= '
'.$langs->trans('RefCustomer').': '.($this->ref_customer ? $this->ref_customer : $this->ref_client);
+
$url = DOL_URL_ROOT.'/expedition/card.php?id='.$this->id;
if ($short) return $url;
+ $linkclose='';
+ if (empty($notooltip))
+ {
+ if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER))
+ {
+ $label=$langs->trans("ShowSending");
+ $linkclose.=' alt="'.dol_escape_htmltag($label, 1).'"';
+ }
+ $linkclose.= ' title="'.dol_escape_htmltag($label, 1).'"';
+ $linkclose.=' class="classfortooltip"';
+ }
+
$linkstart = '';
$linkend='';
$picto='sending';
- if ($withpicto) $result.=($linkstart.img_object($label, $picto, 'class="classfortooltip"').$linkend);
+ if ($withpicto) $result.=($linkstart.img_object(($notooltip?'':$label), $picto, ($notooltip?'':'class="classfortooltip"'), 0, 0, $notooltip?0:1).$linkend);
if ($withpicto && $withpicto != 2) $result.=' ';
$result.=$linkstart.$this->ref.$linkend;
return $result;
diff --git a/htdocs/expedition/index.php b/htdocs/expedition/index.php
index 19b11a0ddf6..66355a471ee 100644
--- a/htdocs/expedition/index.php
+++ b/htdocs/expedition/index.php
@@ -61,9 +61,9 @@ print "
\n";
*/
$clause = " WHERE ";
-$sql = "SELECT e.rowid, e.ref";
-$sql.= ", s.nom as name, s.rowid as socid";
-$sql.= ", c.ref as commande_ref, c.rowid as commande_id";
+$sql = "SELECT e.rowid, e.ref, e.ref_customer,";
+$sql.= " s.nom as name, s.rowid as socid,";
+$sql.= " c.ref as commande_ref, c.rowid as commande_id";
$sql.= " FROM ".MAIN_DB_PREFIX."expedition as e";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."element_element as el ON e.rowid = el.fk_target AND el.targettype = 'shipping'";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."commande as c ON el.fk_source = c.rowid";
@@ -91,11 +91,14 @@ if ($resql)
$var = True;
while ($i < $num)
{
- $var=!$var;
$obj = $db->fetch_object($resql);
- print "