Fix: utilisation du champ "date effectu" au lieu de "date prvue"

This commit is contained in:
Regis Houssin 2006-04-18 17:04:56 +00:00
parent 50e7433ce5
commit ccbf22d29a
2 changed files with 12 additions and 12 deletions

View File

@ -724,7 +724,7 @@ if ($socidp > 0)
$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.datea DESC, a.id DESC";
$sql .= " ORDER BY a.datep DESC, a.id DESC";
$result=$db->query($sql);
if ($result)

View File

@ -362,12 +362,12 @@ if ( $societe->fetch($socid) )
print '<table width="100%" class="noborder">';
print '<tr class="liste_titre"><td colspan="10"><a href="action/index.php?socid='.$societe->id.'">'.$langs->trans("ActionsToDo").'</a></td><td align="right">&nbsp;</td></tr>';
$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 = "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 = ".$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 .= " ORDER BY a.datep DESC, a.id DESC";
$result=$db->query($sql);
if ($result)
@ -383,32 +383,32 @@ if ( $societe->fetch($socid) )
$obj = $db->fetch_object($result);
print "<tr $bc[$var]>";
if ($oldyear == strftime("%Y",$obj->da) )
if ($oldyear == strftime("%Y",$obj->dp) )
{
print '<td width="30" align="center">|</td>';
}
else
{
print '<td width="30" align="center">'.strftime("%Y",$obj->da)."</td>\n";
$oldyear = strftime("%Y",$obj->da);
print '<td width="30" align="center">'.strftime("%Y",$obj->dp)."</td>\n";
$oldyear = strftime("%Y",$obj->dp);
}
if ($oldmonth == strftime("%Y%b",$obj->da) )
if ($oldmonth == strftime("%Y%b",$obj->dp) )
{
print '<td width="30" align="center">|</td>';
}
else
{
print '<td width="30" align="center">' .strftime("%b",$obj->da)."</td>\n";
$oldmonth = strftime("%Y%b",$obj->da);
print '<td width="30" align="center">' .strftime("%b",$obj->dp)."</td>\n";
$oldmonth = strftime("%Y%b",$obj->dp);
}
print '<td width="20">'.strftime("%d",$obj->da)."</td>\n";
print '<td width="30" nowrap="nowrap">'.strftime("%H:%M",$obj->da).'</td>';
print '<td width="20">'.strftime("%d",$obj->dp)."</td>\n";
print '<td width="30" nowrap="nowrap">'.strftime("%H:%M",$obj->dp).'</td>';
// Picto warning
print '<td width="16">';
if (date("U",$obj->da) < time()) print ' '.img_warning("Late");
if (date("U",$obj->dp) < time()) print ' '.img_warning("Late");
else print '&nbsp;';
print '</td>';