diff --git a/htdocs/compta/fiche.php b/htdocs/compta/fiche.php
index d29cdab89e2..90c8a330e13 100644
--- a/htdocs/compta/fiche.php
+++ b/htdocs/compta/fiche.php
@@ -454,7 +454,10 @@ if ($socid > 0)
print '
";
- if ($oldyear == strftime("%Y",$obj->da) )
+ if ($oldyear == strftime("%Y",$obj->dp) && !$conf->global->COMPANY_VIEW_FULL_DATE_ACTIONS)
{
print '| | | ';
}
else
{
- print ''.strftime("%Y",$obj->da)." | \n";
- $oldyear = strftime("%Y",$obj->da);
+ print ''.strftime("%Y",$obj->dp)." | \n";
+ $oldyear = strftime("%Y",$obj->dp);
}
- if ($oldmonth == strftime("%Y%b",$obj->da) )
+ if ($oldmonth == strftime("%Y%b",$obj->dp) && !$conf->global->COMPANY_VIEW_FULL_DATE_ACTIONS)
{
print '| | ';
}
else
{
- print '' .strftime("%b",$obj->da)." | \n";
- $oldmonth = strftime("%Y%b",$obj->da);
+ print '' .strftime("%b",$obj->dp)." | \n";
+ $oldmonth = strftime("%Y%b",$obj->dp);
}
- print ''.strftime("%d",$obj->da)." | \n";
- print ''.strftime("%H:%M",$obj->da).' | ';
+ print ''.strftime("%d",$obj->dp)." | \n";
+ print ''.strftime("%H:%M",$obj->dp).' | ';
// Picto warning
print '';
- if (date("U",$obj->da) < time()) print ' '.img_warning("Late");
+ if (date("U",$obj->dp) < time()) print ' '.img_warning("Late");
else print ' ';
print ' | ';
@@ -569,7 +572,10 @@ if ($socid > 0)
print ''.$langs->trans("ActionsDoneShort").'';
print ' |
';
- $sql = "SELECT a.id, a.label, ".$db->pdate("a.datea")." as da, a.percent,";
+ $sql = "SELECT a.id, a.label,";
+ $sql.= " ".$db->pdate("a.datep")." as dp,";
+ $sql.= " ".$db->pdate("a.datea")." as da,";
+ $sql.= " a.percent,";
$sql.= " a.propalrowid, a.fk_facture, a.fk_user_author, a.fk_contact,";
$sql.= " c.code as acode, c.libelle,";
$sql.= " u.login, u.rowid,";
@@ -596,14 +602,14 @@ if ($socid > 0)
$obj = $db->fetch_object($result);
print "