Fix: utilisation du champ "date effectué" au lieu de "date prévue"
This commit is contained in:
parent
50e7433ce5
commit
ccbf22d29a
@ -724,7 +724,7 @@ if ($socidp > 0)
|
|||||||
$sql .= " WHERE a.fk_soc = ".$objsoc->id;
|
$sql .= " WHERE a.fk_soc = ".$objsoc->id;
|
||||||
$sql .= " AND u.rowid = a.fk_user_author";
|
$sql .= " AND u.rowid = a.fk_user_author";
|
||||||
$sql .= " AND c.id=a.fk_action AND a.percent < 100";
|
$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);
|
$result=$db->query($sql);
|
||||||
if ($result)
|
if ($result)
|
||||||
|
|||||||
@ -362,12 +362,12 @@ if ( $societe->fetch($socid) )
|
|||||||
print '<table width="100%" class="noborder">';
|
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"> </td></tr>';
|
print '<tr class="liste_titre"><td colspan="10"><a href="action/index.php?socid='.$societe->id.'">'.$langs->trans("ActionsToDo").'</a></td><td align="right"> </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 .= " 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 .= " WHERE a.fk_soc = ".$societe->id;
|
||||||
$sql .= " AND u.rowid = a.fk_user_author";
|
$sql .= " AND u.rowid = a.fk_user_author";
|
||||||
$sql .= " AND c.id=a.fk_action AND a.percent < 100";
|
$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);
|
$result=$db->query($sql);
|
||||||
if ($result)
|
if ($result)
|
||||||
@ -383,32 +383,32 @@ if ( $societe->fetch($socid) )
|
|||||||
$obj = $db->fetch_object($result);
|
$obj = $db->fetch_object($result);
|
||||||
print "<tr $bc[$var]>";
|
print "<tr $bc[$var]>";
|
||||||
|
|
||||||
if ($oldyear == strftime("%Y",$obj->da) )
|
if ($oldyear == strftime("%Y",$obj->dp) )
|
||||||
{
|
{
|
||||||
print '<td width="30" align="center">|</td>';
|
print '<td width="30" align="center">|</td>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<td width="30" align="center">'.strftime("%Y",$obj->da)."</td>\n";
|
print '<td width="30" align="center">'.strftime("%Y",$obj->dp)."</td>\n";
|
||||||
$oldyear = strftime("%Y",$obj->da);
|
$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>';
|
print '<td width="30" align="center">|</td>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<td width="30" align="center">' .strftime("%b",$obj->da)."</td>\n";
|
print '<td width="30" align="center">' .strftime("%b",$obj->dp)."</td>\n";
|
||||||
$oldmonth = strftime("%Y%b",$obj->da);
|
$oldmonth = strftime("%Y%b",$obj->dp);
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<td width="20">'.strftime("%d",$obj->da)."</td>\n";
|
print '<td width="20">'.strftime("%d",$obj->dp)."</td>\n";
|
||||||
print '<td width="30" nowrap="nowrap">'.strftime("%H:%M",$obj->da).'</td>';
|
print '<td width="30" nowrap="nowrap">'.strftime("%H:%M",$obj->dp).'</td>';
|
||||||
|
|
||||||
// Picto warning
|
// Picto warning
|
||||||
print '<td width="16">';
|
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 ' ';
|
else print ' ';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user