diff --git a/htdocs/fichinter/index.php b/htdocs/fichinter/index.php index 8c226a8ccb2..b8f400a0b0d 100644 --- a/htdocs/fichinter/index.php +++ b/htdocs/fichinter/index.php @@ -22,6 +22,11 @@ require("./pre.inc.php3"); require("../contact.class.php3"); +if ($user->societe_id > 0) +{ + $socid = $user->societe_id ; +} + llxHeader(); /* @@ -49,9 +54,10 @@ $sql = "SELECT s.nom,s.idp, f.ref,".$db->pdate("f.datei")." as dp, f.rowid as fi $sql .= " FROM llx_societe as s, llx_fichinter as f "; $sql .= " WHERE f.fk_soc = s.idp "; -if ($user->societe_id > 0) + +if ($socid > 0) { - $sql .= " AND s.idp = " . $user->societe_id; + $sql .= " AND s.idp = " . $socid; } $sql .= " ORDER BY $sortfield $sortorder " . $db->plimit( $limit + 1 ,$offset); @@ -59,14 +65,14 @@ $sql .= " ORDER BY $sortfield $sortorder " . $db->plimit( $limit + 1 ,$offset); if ( $db->query($sql) ) { $num = $db->num_rows(); - print_barre_liste("Liste des fiches d'intervention", $page, $PHP_SELF,"&socidp=$socidp",$sortfield,$sortorder,'',$num); + print_barre_liste("Liste des fiches d'intervention", $page, $PHP_SELF,"&socid=$socid",$sortfield,$sortorder,'',$num); $i = 0; print '
| Durée | '; print 'Statut | '; print " | |||
| fichid\">$objp->ref | \n"; - print "idp\">$objp->nom | \n"; + + print ' ';
+ print "idp\">$objp->nom | \n";
print "".strftime("%d %B %Y",$objp->dp)." | \n"; print ''.sprintf("%.1f",$objp->duree).' | '; print ''.$objp->fk_statut.' | ';