diff --git a/htdocs/comm/index.php b/htdocs/comm/index.php index 1691cb32ee66c74f3707319846648c3ff1858144..44f0b9e35051f45a0ac6a184e1cdb42f8b4e530d 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 "<td align=\"right\">"; print dolibarr_print_date($obj->dp)."</td>\n"; print "<td align=\"right\">".price($obj->price)."</td>"; - print "<td align=\"center\">".$propalstatic->LibStatut($objp->fk_statut,3)."</td>\n"; + print "<td align=\"center\">".$propalstatic->LibStatut($obj->fk_statut,3)."</td>\n"; print "</tr>\n"; $i++; $total += $obj->price; diff --git a/htdocs/comm/prospect/prospects.php b/htdocs/comm/prospect/prospects.php index bcecb58fb78880b45818ebc9708e3fb415fee668..e69bae163f62f563dc11830a7fcb93e417ac9378 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 "<td align=\"center\">".dolibarr_print_date($obj->datec)."</td>"; // Statut print "<td align=\"center\">"; - $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 "</td>"; $sts = array(-1,0,1,2,3); diff --git a/htdocs/prospect.class.php b/htdocs/prospect.class.php index 340cbf8f811b6dc74e58d41af8927fb460150d78..f7b9603f5c2a42ad52ae1d93862fdc1237be08f3 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");