diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php index 45e69448f43..834c651c2be 100644 --- a/htdocs/comm/propal/list.php +++ b/htdocs/comm/propal/list.php @@ -141,7 +141,7 @@ if (! $sortorder) $sortorder='DESC'; $limit = $conf->liste_limit; -$sql = 'SELECT s.rowid, s.nom, s.town, s.client, '; +$sql = 'SELECT s.rowid, s.nom, s.town, s.client, s.code_client'; $sql.= 'p.rowid as propalid, p.note_private, p.total_ht, p.ref, p.ref_client, p.fk_statut, p.fk_user_author, p.datep as dp, p.fin_validite as dfv,'; if (! $user->rights->societe->client->voir && ! $socid) $sql .= " sc.fk_soc, sc.fk_user,"; $sql.= ' u.login'; @@ -368,6 +368,7 @@ if ($result) $companystatic->id=$objp->rowid; $companystatic->nom=$objp->nom; $companystatic->client=$objp->client; + $companystatic->code_client=$objp->code_client; print ''; print $companystatic->getNomUrl(1,'customer'); print ''; diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index 8fe94f6c3fd..83b9fd30945 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -143,7 +143,7 @@ else $sql = 'SELECT DISTINCT'; $sql.= ' f.rowid as facid, f.facnumber, f.ref_client, f.type, f.note_private, f.increment, f.total as total_ht, f.tva as total_tva, f.total_ttc,'; $sql.= ' f.datef as df, f.date_lim_reglement as datelimite,'; $sql.= ' f.paye as paye, f.fk_statut,'; -$sql.= ' s.nom, s.rowid as socid'; +$sql.= ' s.nom, s.rowid as socid, s.code_client, s.client '; if (! $sall) $sql.= ', SUM(pf.amount) as am'; // To be able to sort on status $sql.= ' FROM '.MAIN_DB_PREFIX.'societe as s'; $sql.= ', '.MAIN_DB_PREFIX.'facture as f'; @@ -390,6 +390,8 @@ if ($resql) $thirdparty=new Societe($db); $thirdparty->id=$objp->socid; $thirdparty->nom=$objp->nom; + $thirdparty->client=$objp->client; + $thirdparty->code_client=$objp->code_client; print $thirdparty->getNomUrl(1,'customer'); print ''; diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 8d2d80958fb..97ba9ccbcd7 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -800,7 +800,7 @@ class Form while ($i < $num) { $obj = $this->db->fetch_object($resql); - + $label=''; if ($conf->global->SOCIETE_ADD_REF_IN_LIST) { if (($obj->client) && (!empty($obj->code_client))) { $label = $obj->code_client. ' - ';