diff --git a/htdocs/comm/fiche.php b/htdocs/comm/fiche.php index df83d98f609..da36cf4af04 100644 --- a/htdocs/comm/fiche.php +++ b/htdocs/comm/fiche.php @@ -739,6 +739,9 @@ if ($socidp > 0) print "
"; + + $actionstatic=new ActionComm($db); + /* * Listes des actions a faire * @@ -746,14 +749,17 @@ if ($socidp > 0) print_titre($langs->trans("ActionsOnCompany")); print ''; - print ''; + print ''; + print ''; + print ''; - $sql = "SELECT a.id, a.label, ".$db->pdate("a.datep")." as dp, c.code as acode, c.libelle, u.code, a.propalrowid, a.fk_user_author, fk_contact, u.rowid "; - $sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a, ".MAIN_DB_PREFIX."c_actioncomm as c, ".MAIN_DB_PREFIX."user as u "; - $sql .= " WHERE a.fk_soc = ".$objsoc->id; - $sql .= " AND u.rowid = a.fk_user_author"; - $sql .= " AND c.id=a.fk_action AND a.percent < 100"; - $sql .= " ORDER BY a.datep DESC, a.id DESC"; + $sql = "SELECT a.id, a.label, ".$db->pdate("a.datep")." as dp, a.percent,"; + $sql.= " c.code as acode, c.libelle, u.code, a.propalrowid, a.fk_user_author, fk_contact, u.rowid "; + $sql.= " FROM ".MAIN_DB_PREFIX."actioncomm as a, ".MAIN_DB_PREFIX."c_actioncomm as c, ".MAIN_DB_PREFIX."user as u "; + $sql.= " WHERE a.fk_soc = ".$objsoc->id; + $sql.= " AND u.rowid = a.fk_user_author"; + $sql.= " AND c.id=a.fk_action AND a.percent < 100"; + $sql.= " ORDER BY a.datep DESC, a.id DESC"; $result=$db->query($sql); if ($result) @@ -831,6 +837,10 @@ if ($socidp > 0) } print ''; + + // Statut + print ''; + print "\n"; $i++; } @@ -853,9 +863,11 @@ if ($socidp > 0) * Listes des actions effectuees */ print '
'.$langs->trans("ActionsToDoShort").' 
'.$langs->trans("ActionsToDoShort").' 
'.img_object($langs->trans("ShowUser"),"user").' '.$obj->code.''.$actionstatic->LibStatut($obj->percent,3).'
'; - print ''; + print ''; + print ''; + print ''; - $sql = "SELECT a.id, a.label, ".$db->pdate("a.datea")." as da,"; + $sql = "SELECT a.id, a.label, ".$db->pdate("a.datea")." as da, a.percent,"; $sql.= " a.propalrowid, a.fk_facture, a.fk_user_author, a.fk_contact,"; $sql.= " c.code as acode, c.libelle,"; $sql.= " u.code, u.rowid"; @@ -953,6 +965,10 @@ if ($socidp > 0) // Auteur print ''; + + // Statut + print ''; + print "\n"; $i++; } diff --git a/htdocs/compta/fiche.php b/htdocs/compta/fiche.php index 51e5f4bb119..caa53f83e1b 100644 --- a/htdocs/compta/fiche.php +++ b/htdocs/compta/fiche.php @@ -444,20 +444,26 @@ if ($socid > 0) print "
"; + + $actionstatic=new ActionComm($db); + /* * Listes des actions a faire * */ print_titre($langs->trans("ActionsOnCompany")); print '
'.$langs->trans("ActionsDoneShort").'
'.$langs->trans("ActionsDoneShort").'
'.img_object($langs->trans("ShowUser"),'user').' '.$obj->code.''.$actionstatic->LibStatut($obj->percent,3).'
'; - print ''; + print ''; + print ''; + print ''; - $sql = "SELECT a.id, a.label, ".$db->pdate("a.datea")." as da, c.code as acode, c.libelle, u.code, a.propalrowid, a.fk_user_author, fk_contact, u.rowid "; - $sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a, ".MAIN_DB_PREFIX."c_actioncomm as c, ".MAIN_DB_PREFIX."user as u "; - $sql .= " WHERE a.fk_soc = ".$societe->id; - $sql .= " AND u.rowid = a.fk_user_author"; - $sql .= " AND c.id=a.fk_action AND a.percent < 100"; - $sql .= " ORDER BY a.datea DESC, a.id DESC"; + $sql = "SELECT a.id, a.label, ".$db->pdate("a.datea")." as da, a.percent,"; + $sql.= " c.code as acode, c.libelle, u.code, a.propalrowid, a.fk_user_author, fk_contact, u.rowid "; + $sql.= " FROM ".MAIN_DB_PREFIX."actioncomm as a, ".MAIN_DB_PREFIX."c_actioncomm as c, ".MAIN_DB_PREFIX."user as u "; + $sql.= " WHERE a.fk_soc = ".$societe->id; + $sql.= " AND u.rowid = a.fk_user_author"; + $sql.= " AND c.id=a.fk_action AND a.percent < 100"; + $sql.= " ORDER BY a.datea DESC, a.id DESC"; $result=$db->query($sql); if ($result) @@ -535,6 +541,10 @@ if ($socid > 0) // Auteur print ''; + + // Statut + print ''; + print "\n"; $i++; } @@ -549,9 +559,11 @@ if ($socid > 0) * Listes des actions effectuées */ print '
'.$langs->trans("ActionsToDoShort").' 
'.$langs->trans("ActionsToDoShort").' 
'.img_object($langs->trans("ShowUser"),"user").' '.$obj->code.''.$actionstatic->LibStatut($obj->percent,3).'
'; - print ''; + print ''; + print ''; - $sql = "SELECT a.id, a.label, ".$db->pdate("a.datea")." as da,"; + $sql = "SELECT a.id, a.label, ".$db->pdate("a.datea")." as da, a.percent,"; $sql.= " a.propalrowid, a.fk_facture, a.fk_user_author, a.fk_contact,"; $sql.= " c.code as acode, c.libelle,"; $sql.= " u.code, u.rowid"; @@ -641,6 +653,10 @@ if ($socid > 0) // Auteur print ''; + + // Statut + print ''; + print "\n"; $i++; }
'.$langs->trans("ActionsDoneShort").'
'.$langs->trans("ActionsDoneShort").''; + print '
'.img_object($langs->trans("ShowUser"),'user').' '.$obj->code.''.$actionstatic->LibStatut($obj->percent,3).'