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 ''; print ""; - print_liste_field_titre_new ("Num",$PHP_SELF,"f.ref","","&socidp=$socidp",'width="15%"',$sortfield); - print_liste_field_titre_new ("Société",$PHP_SELF,"s.nom","","&socidp=$socidp",'',$sortfield); - print_liste_field_titre_new ("Date",$PHP_SELF,"f.datei","","&socidp=$socidp",'',$sortfield); + print_liste_field_titre_new ("Num",$PHP_SELF,"f.ref","","&socid=$socid",'width="15%"',$sortfield); + print_liste_field_titre_new ("Société",$PHP_SELF,"s.nom","","&socid=$socid",'',$sortfield); + print_liste_field_titre_new ("Date",$PHP_SELF,"f.datei","","&socid=$socid",'',$sortfield); print ''; print ''; print "\n"; @@ -77,7 +83,9 @@ if ( $db->query($sql) ) $var=!$var; print ""; print "\n"; - print "\n"; + + print '\n"; print "\n"; print ''; print '';
DuréeStatut 
fichid\">$objp->refidp\">$objp->nom '; + print "idp\">$objp->nom".strftime("%d %B %Y",$objp->dp)."'.sprintf("%.1f",$objp->duree).''.$objp->fk_statut.'