diff --git a/htdocs/comm/index.php b/htdocs/comm/index.php
index 1691cb32ee6..44f0b9e3505 100644
--- a/htdocs/comm/index.php
+++ b/htdocs/comm/index.php
@@ -528,6 +528,8 @@ if ($conf->contrat->enabled && 0) // \todo A REFAIRE DEPUIS NOUVEAU CONTRAT
*/
if ($conf->propal->enabled && $user->rights->propale->lire)
{
+ $langs->load("propal");
+
$sql = "SELECT s.nom, s.idp, p.rowid as propalid, p.price, p.ref, p.fk_statut, ".$db->pdate("p.datep")." as dp";
if (!$user->rights->commercial->client->voir && !$socidp) $sql .= ", sc.fk_soc, sc.fk_user";
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."propal as p";
@@ -560,7 +562,7 @@ if ($conf->propal->enabled && $user->rights->propale->lire)
print "
";
print dolibarr_print_date($obj->dp)." | \n";
print "".price($obj->price)." | ";
- print "".$propalstatic->LibStatut($objp->fk_statut,3)." | \n";
+ print "".$propalstatic->LibStatut($obj->fk_statut,3)." | \n";
print "\n";
$i++;
$total += $obj->price;
diff --git a/htdocs/comm/prospect/prospects.php b/htdocs/comm/prospect/prospects.php
index bcecb58fb78..e69bae163f6 100644
--- a/htdocs/comm/prospect/prospects.php
+++ b/htdocs/comm/prospect/prospects.php
@@ -28,6 +28,7 @@
*/
require("./pre.inc.php");
+require_once(DOL_DOCUMENT_ROOT."/prospect.class.php");
$langs->load("propal");
@@ -163,6 +164,8 @@ if ($resql)
$var=true;
+ $prospectstatic=new Prospect($db);
+
while ($i < min($num,$conf->liste_limit))
{
$obj = $db->fetch_object($resql);
@@ -179,9 +182,7 @@ if ($resql)
print "".dolibarr_print_date($obj->datec)." | ";
// Statut
print "";
- $transcode=$langs->trans("StatusProspect".$obj->fk_stcomm);
- $libelle=($transcode!="StatusProspect".$obj->fk_stcomm?$transcode:$obj->stcomm);
- print $libelle;
+ print $prospectstatic->LibStatut($obj->fk_stcomm,2);
print " | ";
$sts = array(-1,0,1,2,3);
diff --git a/htdocs/prospect.class.php b/htdocs/prospect.class.php
index 340cbf8f811..f7b9603f5c2 100644
--- a/htdocs/prospect.class.php
+++ b/htdocs/prospect.class.php
@@ -114,6 +114,14 @@ class Prospect extends Societe
global $langs;
$langs->load('customers');
+ if ($mode == 2)
+ {
+ if ($statut == -1) return img_action(0,-1).' '.$langs->trans("StatusProspect-1");
+ if ($statut == 0) return img_action(0, 0).' '.$langs->trans("StatusProspect0");
+ if ($statut == 1) return img_action(0, 1).' '.$langs->trans("StatusProspect1");
+ if ($statut == 2) return img_action(0, 2).' '.$langs->trans("StatusProspect2");
+ if ($statut == 3) return img_action(0, 3).' '.$langs->trans("StatusProspect3");
+ }
if ($mode == 4)
{
if ($statut == -1) return img_action(0,-1).' '.$langs->trans("StatusProspect-1");