Fix: date (dp) is empty

This commit is contained in:
Regis Houssin 2010-11-05 18:30:13 +00:00
parent 8bc6c9a4c5
commit 8d7632fb29
2 changed files with 7 additions and 5 deletions

View File

@ -2,7 +2,7 @@
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2003 Eric Seigne <erics@rycks.com>
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2005-2010 Regis Houssin <regis@dolibarr.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -183,8 +183,9 @@ $sql.= ' FROM '.MAIN_DB_PREFIX.'actioncomm as a';
$sql.= ', '.MAIN_DB_PREFIX.'c_actioncomm as ca';
$sql.= ', '.MAIN_DB_PREFIX.'user as u';
$sql.= ' WHERE a.fk_action = ca.id';
$sql.= ' AND a.fk_user_author = u.rowid'; // To limit to entity
$sql.= ' AND a.fk_user_author = u.rowid';
$sql.= ' AND u.entity in (0,'.$conf->entity.')'; // To limit to entity
if ($user->societe_id) $sql.= ' AND u.fk_societe = '.$user->societe_id; // To limit to user company
if ($pid) $sql.=" AND a.fk_project=".addslashes($pid);
if ($_GET["action"] == 'show_day')
{

View File

@ -575,16 +575,17 @@ function show_actions_todo($conf,$langs,$db,$objsoc,$objcon='')
{
$var = !$var;
$datep=$obj->dp;
$obj = $db->fetch_object($result);
$datep=$obj->dp;
print "<tr ".$bc[$var].">";
print '<td width="100" align="left" nowrap="nowrap">'.dol_print_date($datep,'dayhour')."</td>\n";
// Picto warning
print '<td width="16">';
if ($datep && $datep < time()) print ' '.img_warning("Late");
if ($datep && $datep < time()) print ' '.img_warning($langs->trans("Late"));
else print '&nbsp;';
print '</td>';