diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php
index cc744f9eb56..0975bfbd7ef 100644
--- a/htdocs/commande/class/commande.class.php
+++ b/htdocs/commande/class/commande.class.php
@@ -3686,7 +3686,7 @@ class Commande extends CommonOrder
$label .= ' '.$this->getLibStatut(5);
}
$label .= '
'.$langs->trans('Ref').': '.$this->ref;
- $label .= '
'.$langs->trans('RefCustomer').': '.($this->ref_customer ? $this->ref_customer : $this->ref_client);
+ $label .= '
'.$langs->trans('RefCustomer').': '.(empty($this->ref_customer) ? (empty($this->ref_client) ? '' : $this-ref_client) : $this->ref_customer);
if (!empty($this->total_ht)) {
$label .= '
'.$langs->trans('AmountHT').': '.price($this->total_ht, 0, $langs, 0, -1, -1, $conf->currency);
}