diff --git a/view/map.php b/view/map.php index 918f6e1..2cfecbc 100644 --- a/view/map.php +++ b/view/map.php @@ -245,7 +245,7 @@ $objectLinked = array_shift($projects); } - if ((!empty($fromId) && $objectLinked->entity != $conf->entity) || ($source == 'pwa' && empty($objectLinked->opp_status)) || empty($objectLinked)) { + if ((!empty($fromId) && $objectLinked->entity != $conf->entity) || ($source == 'pwa' && empty($objectLinked->opp_status) && empty($objectLinked->fk_opp_status)) || empty($objectLinked)) { continue; } @@ -254,7 +254,7 @@ $objectLinkedInfo .= '' . $langs->transnoentities('Project') . ' : ' . $objectLinked->getNomUrl(1, '', 0, '', ' - ', 1) . '
'; $objectLinkedInfo .= '' . $langs->transnoentities('ProjectLabel') . ' : ' . $objectLinked->title . '
'; $objectLinkedInfo .= '' . $langs->transnoentities('Description') . ' : ' . $objectLinked->description . '
'; - $code = dol_getIdFromCode($db, $objectLinked->opp_status, 'c_lead_status', 'rowid', 'code'); + $code = dol_getIdFromCode($db, $objectLinked->opp_status > 0 ? $objectLinked->opp_status : $objectLinked->fk_opp_status , 'c_lead_status', 'rowid', 'code'); if ($code) { $objectLinkedInfo .= '' . $langs->transnoentities('OpportunityStatus') . ' : ' . $langs->trans('OppStatus' . $code) . '
'; }