diff --git a/htdocs/product/card.php b/htdocs/product/card.php index 4c30691318f8f..4f029ad672736 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -1305,7 +1305,7 @@ $picto=($object->type== Product::TYPE_SERVICE?'service':'product'); dol_fiche_head($head, 'card', $titre, 0, $picto); - dol_banner_tab($object, 'ref', '', ($user->societe_id?0:1), 'ref'); + dol_banner_tab($object, 'id', '', ($user->societe_id?0:1), 'ref'); print '
'; diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index 4a86ba549ae74..8904820ce7b8f 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -4123,7 +4123,7 @@ public function getRights() */ function info($id) { - $sql = "SELECT p.rowid, p.datec as date_creation, p.tms as date_modification,"; + $sql = "SELECT p.rowid, p.ref, p.datec as date_creation, p.tms as date_modification,"; $sql.= " p.fk_user_author, p.fk_user_modif"; $sql.= " FROM ".MAIN_DB_PREFIX.$this->table_element." as p"; $sql.= " WHERE p.rowid = ".$id; @@ -4149,7 +4149,7 @@ function info($id) $this->user_modification = $muser; } - $this->ref = $obj->name; + $this->ref = $obj->ref; $this->date_creation = $this->db->jdate($obj->date_creation); $this->date_modification = $this->db->jdate($obj->date_modification); } diff --git a/htdocs/societe/info.php b/htdocs/societe/info.php index a415ae57b1c1f..3a2ecea930591 100644 --- a/htdocs/societe/info.php +++ b/htdocs/societe/info.php @@ -78,15 +78,13 @@ exit; } - $object->info($socid); - $head = societe_prepare_head($object); dol_fiche_head($head, 'info', $langs->trans("ThirdParty"), 0, 'company'); - $linkback = ''.$langs->trans("BackToList").''; - - dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', ''); + dol_banner_tab($object, 'socid', '', ($user->societe_id?0:1), 'rowid', 'nom'); + + $object->info($socid); print '
';