This commit is contained in:
florian HENRY 2018-10-04 09:45:12 +02:00
parent 292dab192b
commit 7f4f27ebfe

View File

@ -1305,7 +1305,7 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon='', $noprint=
$result = $contactaction->fetchResources(); $result = $contactaction->fetchResources();
if ($result<0) { if ($result<0) {
dol_print_error($db); dol_print_error($db);
setEventMessage("company.lib::show_actions_done Error fetch ressource"); setEventMessage("company.lib::show_actions_done Error fetch ressource",'errors');
} }
//if ($donetodo == 'todo') $sql.= " AND ((a.percent >= 0 AND a.percent < 100) OR (a.percent = -1 AND a.datep > '".$db->idate($now)."'))"; //if ($donetodo == 'todo') $sql.= " AND ((a.percent >= 0 AND a.percent < 100) OR (a.percent = -1 AND a.datep > '".$db->idate($now)."'))";
@ -1630,23 +1630,20 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon='', $noprint=
$contactstatic->id=$histo[$key]['contact_id']; $contactstatic->id=$histo[$key]['contact_id'];
var_dump($histo[$key]['contact_id']); var_dump($histo[$key]['contact_id']);
$out.='<td width="120">'.$contactstatic->getNomUrl(1,'',10).'</td>'; $out.='<td width="120">'.$contactstatic->getNomUrl(1,'',10).'</td>';
} } elseif (isset($histo[$key]['socpeopleassigned']) && is_array($histo[$key]['socpeopleassigned']) && count($histo[$key]['socpeopleassigned']) > 0) {
elseif (isset($histo[$key]['socpeopleassigned']) && is_array($histo[$key]['socpeopleassigned']) && count($histo[$key]['socpeopleassigned'])>0)
{
$out .= '<td>'; $out .= '<td>';
foreach ($histo[$key]['socpeopleassigned'] as $cid => $Tab) foreach ( $histo[$key]['socpeopleassigned'] as $cid => $Tab ) {
{
$contact = new Contact($db); $contact = new Contact($db);
$result = $contact->fetch($cid); $result = $contact->fetch($cid);
if ($result < 0) dol_print_error($db,$contact->error); if ($result < 0)
dol_print_error($db, $contact->error);
if ($result > 0) if ($result > 0) {
{
$out .= $contact->getNomUrl(1); $out .= $contact->getNomUrl(1);
if ($object->type_code == 'AC_TEL') if ($object->type_code == 'AC_TEL') {
{ if (! empty($contact->phone_pro))
if (!empty($contact->phone_pro)) $out.= '('.dol_print_phone($contact->phone_pro).')'; $out .= '(' . dol_print_phone($contact->phone_pro) . ')';
} }
$out .= '<div class="paddingright"></div>'; $out .= '<div class="paddingright"></div>';
} }