Skip to content

Commit

Permalink
Merge pull request #301 from evarisk-micka/fix_map_on_pwa
Browse files Browse the repository at this point in the history
#299 [Map] fix: empty projects on pwa view
  • Loading branch information
evarisk-micka authored Aug 30, 2024
2 parents 886bcc3 + c4fbd91 commit ed21fe8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions view/map.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand All @@ -254,7 +254,7 @@
$objectLinkedInfo .= '<b>' . $langs->transnoentities('Project') . '</b> : ' . $objectLinked->getNomUrl(1, '', 0, '', ' - ', 1) . '<br>';
$objectLinkedInfo .= '<b>' . $langs->transnoentities('ProjectLabel') . '</b> : ' . $objectLinked->title . '<br>';
$objectLinkedInfo .= '<b>' . $langs->transnoentities('Description') . '</b> : ' . $objectLinked->description . '<br>';
$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 .= '<b>' . $langs->transnoentities('OpportunityStatus') . '</b> : ' . $langs->trans('OppStatus' . $code) . '<br>';
}
Expand Down

0 comments on commit ed21fe8

Please sign in to comment.