diff --git a/htdocs/core/class/html.formcontract.class.php b/htdocs/core/class/html.formcontract.class.php
index 11eca55e4b6..2eb6591b79b 100644
--- a/htdocs/core/class/html.formcontract.class.php
+++ b/htdocs/core/class/html.formcontract.class.php
@@ -1,5 +1,5 @@
+/* Copyright (C) 2012-2026 Charlene BENKE
* Copyright (C) 2025 MDW
*
* This program is free software; you can redistribute it and/or modify
@@ -77,9 +77,10 @@ class FormContract
$ret = '';
// Search all contacts
- $sql = "SELECT c.rowid, c.ref, c.fk_soc, c.statut,";
+ $sql = "SELECT c.rowid, c.ref, c.fk_soc, c.statut, s.nom,";
$sql .= " c.ref_customer, c.ref_supplier";
$sql .= " FROM ".$this->db->prefix()."contrat as c";
+ $sql .= " INNER JOIN".$this->db->prefix()."societe as s ON s.rowid = c.fk_soc";
$sql .= " WHERE c.entity = ".$conf->entity;
//if ($contratListId) $sql.= " AND c.rowid IN (".$this->db->sanitize($contratListId).")";
if ($socid > 0) {
@@ -115,6 +116,7 @@ class FormContract
$labeltoshow = dol_trunc($obj->ref, 18);
if ($showRef) {
+ $labeltoshow = $labeltoshow." - ".$obj->nom;
if ($obj->ref_customer) {
$labeltoshow = $labeltoshow." - ".$obj->ref_customer;
}