Fix: Date action agenda is wrong (datea and datea2 must not be used).

This commit is contained in:
Laurent Destailleur 2008-05-07 01:10:27 +00:00
parent df56657d34
commit 22924961f9
6 changed files with 227 additions and 227 deletions

View File

@ -40,7 +40,7 @@ if ($page == -1) { $page = 0 ; }
$limit = $conf->liste_limit;
$offset = $limit * $page ;
if (! $sortorder) $sortorder="DESC";
if (! $sortfield) $sortfield="a.datea";
if (! $sortfield) $sortfield="a.datep";
// Sécurité accés client
if ($user->societe_id > 0)

View File

@ -72,7 +72,7 @@ if (! $sortfield)
{
$sortfield="a.percent";
if ($status == 'todo') $sortfield="a.datep";
if ($status == 'done') $sortfield="a.datea2";
if ($status == 'done') $sortfield="a.datep2";
}

View File

@ -36,7 +36,7 @@ if ($page == -1) { $page = 0 ; }
$limit = $conf->liste_limit;
$offset = $limit * $page ;
if (! $sortorder) $sortorder="DESC";
if (! $sortfield) $sortfield="a.datea";
if (! $sortfield) $sortfield="a.datep";
// Sécurité accés client
if ($user->societe_id > 0)

View File

@ -637,7 +637,7 @@ if ($_GET["id"] && $_GET["action"] != 'edit')
$numaction = 0 ;
// Recherche histo sur actioncomm
$sql = "SELECT a.id, ".$db->pdate("a.datea")." as da, a.note, a.percent as percentage,";
$sql = "SELECT a.id, ".$db->pdate("a.datep")." as da, a.note, a.percent as percentage,";
$sql.= " c.code as acode, c.libelle,";
$sql.= " u.rowid as user_id, u.login";
$sql.= " FROM ".MAIN_DB_PREFIX."actioncomm as a, ".MAIN_DB_PREFIX."c_actioncomm as c, ".MAIN_DB_PREFIX."user as u ";

View File

@ -121,7 +121,7 @@ function show_array_last_actions_done($max=5)
{
global $langs, $conf, $user, $db, $bc, $socid;
$sql = "SELECT a.id, a.percent, ".$db->pdate("a.datea")." as da, ".$db->pdate("a.datea2")." as da2, a.fk_user_author, a.label,";
$sql = "SELECT a.id, a.percent, ".$db->pdate("a.datep")." as da, ".$db->pdate("a.datep2")." as da2, a.fk_user_author, a.label,";
$sql.= " c.code, c.libelle,";
$sql.= " s.rowid, s.nom as sname, s.client";
if (!$user->rights->societe->client->voir && !$socid) $sql .= ", sc.fk_soc, sc.fk_user";
@ -136,7 +136,7 @@ function show_array_last_actions_done($max=5)
{
$sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
}
$sql .= " ORDER BY a.datea2 DESC";
$sql .= " ORDER BY a.datep2 DESC";
$sql .= $db->plimit($max, 0);
$resql=$db->query($sql);

View File

@ -587,7 +587,7 @@ if ($_GET["facid"] > 0)
/*
* Liste des actions propres à la facture
*/
$sql = "SELECT id, ".$db->pdate("a.datea")." as da, a.label, a.note";
$sql = "SELECT id, ".$db->pdate("a.datep")." as da, a.label, a.note";
$sql .= ", u.login";
$sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a, ".MAIN_DB_PREFIX."user as u ";
$sql .= " WHERE a.fk_user_author = u.rowid ";