From e62b8661c1ec94e8ad166bcbcca3174b63eeb8bf Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Thu, 4 Mar 2004 14:57:49 +0000 Subject: [PATCH] Renvoie vers la fiche prospect ou la fiche client suivant le statut --- htdocs/comm/propal.php | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index 21804c0f494..cc797fea2ad 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -849,7 +849,7 @@ if ($_GET["propalid"]) $pageprev = $_GET["page"] - 1; $pagenext = $_GET["page"] + 1; - $sql = "SELECT s.nom, s.idp, p.rowid as propalid, p.price, p.ref,".$db->pdate("p.datep")." as dp,".$db->pdate("p.fin_validite")." as dfv, c.label as statut, c.id as statutid"; + $sql = "SELECT s.nom, s.idp, s.client, p.rowid as propalid, p.price, p.ref,".$db->pdate("p.datep")." as dp,".$db->pdate("p.fin_validite")." as dfv, c.label as statut, c.id as statutid"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."propal as p, ".MAIN_DB_PREFIX."c_propalst as c WHERE p.fk_soc = s.idp AND p.fk_statut = c.id"; if ($socidp) @@ -910,8 +910,17 @@ if ($_GET["propalid"]) print ''; print img_file(); print " propalid\">$objp->ref\n"; - print "idp\">$objp->nom\n"; - + if ($objp->client == 1) + { + $url ='fiche.php?socid='.$objp->idp; + } + else + { + $url = DOL_URL_ROOT.'/comm/prospect/fiche.php?socid='.$objp->idp; + } + + print ''.$objp->nom.''; + if ( $now > $objp->dfv && $objp->dfv > 0 ) { print "".strftime("%d %b %Y",$objp->dfv)."";