diff --git a/htdocs/comm/fiche.php b/htdocs/comm/fiche.php index 59455baaf94..8f66146acb0 100644 --- a/htdocs/comm/fiche.php +++ b/htdocs/comm/fiche.php @@ -29,9 +29,10 @@ \version $Revision$ */ -require("./pre.inc.php"); -require("../contact.class.php"); -require("../actioncomm.class.php"); +require_once("./pre.inc.php"); +require_once("../contact.class.php"); +require_once("../actioncomm.class.php"); +require_once("../contrat/contrat.class.php"); $langs->load("companies"); $langs->load("orders"); @@ -366,9 +367,11 @@ if ($_socid > 0) */ if($conf->contrat->enabled) { + $contratstatic=new Contrat($db); + print ''; - $sql = "SELECT s.nom, s.idp, c.rowid as id, c.rowid as ref, ".$db->pdate("c.datec")." as dc"; + $sql = "SELECT s.nom, s.idp, c.rowid as id, c.rowid as ref, c.statut, ".$db->pdate("c.datec")." as dc"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."contrat as c"; $sql .= " WHERE c.fk_soc = s.idp "; $sql .= " AND s.idp = $objsoc->id"; @@ -382,7 +385,8 @@ if ($_socid > 0) if ($num >0 ) { print ''; - print ''; + print ''; print ''; } $i = 0; $now = time(); $lim = 3600 * 24 * 15 ; @@ -391,8 +395,9 @@ if ($_socid > 0) $objp = $db->fetch_object($resql); $var=!$var; print ""; - print '\n"; + print '\n"; + print "\n"; + print "\n"; print ''; $i++; } @@ -719,6 +724,7 @@ if ($_socid > 0) } print "
'.$langs->trans("LastContracts",($num<=$MAXLIST?"":$MAXLIST)).''.$langs->trans("AllContracts").' ('.$num.')
'; + print '
'.$langs->trans("LastContracts",($num<=$MAXLIST?"":$MAXLIST)).''.$langs->trans("AllContracts").' ('.$num.')
'.img_object($langs->trans("ShowContract"),"contract").' '.$objp->ref."\n"; - print "".dolibarr_print_date($objp->dc)."'.img_object($langs->trans("ShowContract"),"contract").' '.$objp->ref."".dolibarr_print_date($objp->dc)."".$contratstatic->LibStatut($objp->statut)."

"; + /* * Listes des actions effectuees */