mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
New: Support of events with no percent
This commit is contained in:
parent
b1bcd94b3b
commit
e370a6740d
|
|
@ -536,6 +536,7 @@ function show_actions_todo($conf,$langs,$db,$object,$objcon='',$noprint=0)
|
|||
{
|
||||
global $bc;
|
||||
|
||||
$now=dol_now();
|
||||
$out='';
|
||||
|
||||
if ($conf->agenda->enabled)
|
||||
|
|
@ -567,7 +568,8 @@ function show_actions_todo($conf,$langs,$db,$object,$objcon='',$noprint=0)
|
|||
$sql.= " WHERE u.rowid = a.fk_user_author";
|
||||
if ($object->id) $sql.= " AND a.fk_soc = ".$object->id;
|
||||
if (is_object($objcon) && $objcon->id) $sql.= " AND a.fk_contact = ".$objcon->id;
|
||||
$sql.= " AND c.id=a.fk_action AND a.percent < 100";
|
||||
$sql.= " AND c.id=a.fk_action";
|
||||
$sql.= " AND ((a.percent >= 0 AND a.percent < 100) OR (a.percent = -1 AND a.datep > '".$db->idate($now)."'))";
|
||||
$sql.= " ORDER BY a.datep DESC, a.id DESC";
|
||||
|
||||
dol_syslog("company.lib::show_actions_todo sql=".$sql);
|
||||
|
|
@ -594,7 +596,7 @@ function show_actions_todo($conf,$langs,$db,$object,$objcon='',$noprint=0)
|
|||
|
||||
// Picto warning
|
||||
$out.='<td width="16">';
|
||||
if ($datep && $datep < (time()- ($conf->global->MAIN_DELAY_ACTIONS_TODO *60*60*24)) ) $out.=' '.img_warning($langs->trans("Late"));
|
||||
if ($obj->percent >= 0 && $datep && $datep < ($now - ($conf->global->MAIN_DELAY_ACTIONS_TODO *60*60*24)) ) $out.=' '.img_warning($langs->trans("Late"));
|
||||
else $out.=' ';
|
||||
$out.='</td>';
|
||||
|
||||
|
|
@ -678,6 +680,7 @@ function show_actions_done($conf,$langs,$db,$object,$objcon='',$noprint=0)
|
|||
$out='';
|
||||
$histo=array();
|
||||
$numaction = 0 ;
|
||||
$now=dol_now();
|
||||
|
||||
if ($conf->agenda->enabled)
|
||||
{
|
||||
|
|
@ -697,7 +700,7 @@ function show_actions_done($conf,$langs,$db,$object,$objcon='',$noprint=0)
|
|||
if ($object->id) $sql.= " AND a.fk_soc = ".$object->id;
|
||||
if (is_object($objcon) && $objcon->id) $sql.= " AND a.fk_contact = ".$objcon->id;
|
||||
$sql.= " AND c.id=a.fk_action";
|
||||
$sql.= " AND a.percent = 100";
|
||||
$sql.= " AND (a.percent = 100 OR (a.percent = -1 AND a.datep <= '".$db->idate($now)."'))";
|
||||
$sql.= " ORDER BY a.datep DESC, a.id DESC";
|
||||
|
||||
dol_syslog("company.lib::show_actions_done sql=".$sql, LOG_DEBUG);
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
/* Copyright (C) 2001-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2005 Brice Davoleau <brice.davoleau@gmail.com>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
||||
* Copyright (C) 2006-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2006-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
|
||||
* Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es>
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user