diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index 19cbe032b95..a88c92316fc 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -125,9 +125,9 @@ if ($sortfield == "") $sortfield="a.datea"; } -$sql = "SELECT s.nom as societe, s.idp as socidp,a.id,".$db->pdate("a.datea")." as da, a.datea, c.libelle, u.code, a.fk_contact, a.note "; +$sql = "SELECT s.nom as societe, s.idp as socidp,a.id,".$db->pdate("a.datea")." as da, a.datea, c.libelle, u.code, a.fk_contact, a.note, a.percent as percent"; $sql .= " FROM llx_actioncomm as a, c_actioncomm as c, llx_societe as s, llx_user as u"; -$sql .= " WHERE a.fk_soc = s.idp AND c.id=a.fk_action AND a.fk_user_author = u.rowid AND a.percent = 100"; +$sql .= " WHERE a.fk_soc = s.idp AND c.id=a.fk_action AND a.fk_user_author = u.rowid"; if ($type) { @@ -156,20 +156,21 @@ if ( $db->query($sql) ) $societe = new Societe($db); $societe->fetch($socid); - print_barre_liste("Liste des actions commerciales effectuées sur " . $societe->nom, $page, $PHP_SELF,'',$sortfield,$sortorder,'',$num); + print_barre_liste("Liste des actions commerciales réalisées ou à faire sur " . $societe->nom, $page, $PHP_SELF,'',$sortfield,$sortorder,'',$num); } else { - print_barre_liste("Liste des actions commerciales", $page, $PHP_SELF,'',$sortfield,$sortorder,'',$num); + print_barre_liste("Liste des actions commerciales réalisées ou à faire", $page, $PHP_SELF,'',$sortfield,$sortorder,'',$num); } $i = 0; print "
| Date | '; - print 'Société | '; - print 'Action | '; - print 'Contact | '; - print "Commentaires | Auteur | "; + print 'Avancement | '; + print 'Action | '; + print 'Société | '; + print 'Contact | '; + print "Commentaires | Auteur | "; print "'; + print ' | '; } else { - print " | " .strftime("%Y",$obj->da)." | \n"; + print "" .strftime("%Y",$obj->da)." | \n"; $oldyear = strftime("%Y",$obj->da); } if ($oldmonth == strftime("%Y%b",$obj->da) ) { - print ''; + print ' | '; } else { - print " | " .strftime("%b",$obj->da)." | \n"; + print "" .strftime("%b",$obj->da)." | \n"; $oldmonth = strftime("%Y%b",$obj->da); } - print "" .strftime("%d",$obj->da)." | \n"; - print "" .strftime("%H:%M",$obj->da)." | \n"; - - print ''; + print " | " .strftime("%d",$obj->da)." | \n"; + print "" .strftime("%H:%M",$obj->da)." | \n"; + if ($obj->percent < 100) { + print "".$obj->percent."% | "; + } + else { + print "réalisé | "; + } + print ''.$obj->libelle.' | '; + print ''; print ' '.$obj->societe.' | '; - - print ''.$obj->libelle.' | '; /* * Contact */ - print ''; + print ' | '; if ($obj->fk_contact) { $cont = new Contact($db); @@ -226,7 +231,7 @@ if ( $db->query($sql) ) * */ print ' | '.substr($obj->note, 0, 20).' ... | '; - print "$obj->code | \n"; + print "$obj->code | \n"; print "\n"; $i++;