Fix var not always defined
This commit is contained in:
parent
cb9637e38d
commit
39624f21e7
@ -2035,8 +2035,11 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||||
|
|
||||||
$listofstatus = array_keys($listofoppstatus);
|
$listofstatus = array_keys($listofoppstatus);
|
||||||
$statusOppList = array();
|
|
||||||
|
if (is_array($listofstatus) && ! empty($conf->global->USE_COLOR_FOR_PROSPECTION_STATUS)) {
|
||||||
|
// Define $themeColorId and array $statusOppList for each $listofstatus
|
||||||
$themeColorId = 0;
|
$themeColorId = 0;
|
||||||
|
$statusOppList = array();
|
||||||
foreach ($listofstatus as $oppStatus) {
|
foreach ($listofstatus as $oppStatus) {
|
||||||
$oppStatusCode = dol_getIdFromCode($db, $oppStatus, 'c_lead_status', 'rowid', 'code');
|
$oppStatusCode = dol_getIdFromCode($db, $oppStatus, 'c_lead_status', 'rowid', 'code');
|
||||||
if ($oppStatusCode) {
|
if ($oppStatusCode) {
|
||||||
@ -2045,6 +2048,7 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks
|
|||||||
}
|
}
|
||||||
$themeColorId++;
|
$themeColorId++;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$projectstatic = new Project($db);
|
$projectstatic = new Project($db);
|
||||||
$thirdpartystatic = new Societe($db);
|
$thirdpartystatic = new Societe($db);
|
||||||
@ -2203,6 +2207,7 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks
|
|||||||
print '<td class="right">';
|
print '<td class="right">';
|
||||||
// Because color of prospection status has no meaning yet, it is used if hidden constant is set
|
// Because color of prospection status has no meaning yet, it is used if hidden constant is set
|
||||||
if (empty($conf->global->USE_COLOR_FOR_PROSPECTION_STATUS)) {
|
if (empty($conf->global->USE_COLOR_FOR_PROSPECTION_STATUS)) {
|
||||||
|
$oppStatusCode = dol_getIdFromCode($db, $objp->opp_status, 'c_lead_status', 'rowid', 'code');
|
||||||
if ($langs->trans("OppStatus".$oppStatusCode) != "OppStatus".$oppStatusCode) {
|
if ($langs->trans("OppStatus".$oppStatusCode) != "OppStatus".$oppStatusCode) {
|
||||||
print $langs->trans("OppStatus".$oppStatusCode);
|
print $langs->trans("OppStatus".$oppStatusCode);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user