Skip to content

Commit

Permalink
Fix missing warning
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Nov 14, 2016
1 parent 906d26c commit cc70b51
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
12 changes: 11 additions & 1 deletion htdocs/core/lib/company.lib.php
Expand Up @@ -1126,6 +1126,8 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon='', $noprint=

if (! empty($conf->agenda->enabled) || (! empty($conf->mailing->enabled) && ! empty($objcon->email)))
{
$delay_warning=$conf->global->MAIN_DELAY_ACTIONS_TODO*24*60*60;

require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php';
require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
Expand Down Expand Up @@ -1166,7 +1168,9 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon='', $noprint=
$out.='<td></td>';
$out.='<td>'.$langs->trans("Owner").'</td>';
$out.=getTitleFieldOfList($langs->trans("Status"), 0, $_SERVER["PHP_SELF"], 'a.percent', '', $param, 'align="center"', $sortfield, $sortorder);
$out.='<td align="center"></td>';
$out.='<td class="maxwidthsearch">';
//TODO Add selection of fields
$out.='</td>';
$out.='</tr>';


Expand Down Expand Up @@ -1242,6 +1246,12 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon='', $noprint=
if ($tmpa['mday'] == $tmpb['mday'] && $tmpa['mon'] == $tmpb['mon'] && $tmpa['year'] == $tmpb['year']) $out.='-'.dol_print_date($histo[$key]['dateend'],'hour');
else $out.='-'.dol_print_date($histo[$key]['dateend'],'dayhour');
}
$late=0;
if ($histo[$key]['percent'] == 0 && $histo[$key]['datestart'] && $db->jdate($histo[$key]['datestart']) < ($now - $delay_warning)) $late=1;
if ($histo[$key]['percent'] == 0 && ! $histo[$key]['datestart'] && $histo[$key]['dateend'] && $db->jdate($histo[$key]['datestart']) < ($now - $delay_warning)) $late=1;
if ($histo[$key]['percent'] > 0 && $histo[$key]['percent'] < 100 && $histo[$key]['dateend'] && $db->jdate($histo[$key]['dateend']) < ($now - $delay_warning)) $late=1;
if ($histo[$key]['percent'] > 0 && $histo[$key]['percent'] < 100 && ! $histo[$key]['dateend'] && $histo[$key]['datestart'] && $db->jdate($histo[$key]['datestart']) < ($now - $delay_warning)) $late=1;
if ($late) $out.=img_warning($langs->trans("Late")).' ';
$out.="</td>\n";

// Type
Expand Down
2 changes: 1 addition & 1 deletion htdocs/langs/en_US/commercial.lang
Expand Up @@ -28,7 +28,7 @@ ShowCustomer=Show customer
ShowProspect=Show prospect
ListOfProspects=List of prospects
ListOfCustomers=List of customers
LastDoneTasks=Latest %s completed tasks
LastDoneTasks=Latest %s completed actions
LastActionsToDo=Oldest %s not completed actions
DoneAndToDoActions=Completed and To do events
DoneActions=Completed events
Expand Down

0 comments on commit cc70b51

Please sign in to comment.