From c0a3aa2b5ba0a88e0ec5e84dfc50205aa16f4738 Mon Sep 17 00:00:00 2001 From: "Sekan, Tobias" Date: Tue, 29 Sep 2020 12:00:54 +0200 Subject: [PATCH] add mising elements from last commit --- htdocs/projet/list.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/htdocs/projet/list.php b/htdocs/projet/list.php index 40e247131b6..07da8cba855 100644 --- a/htdocs/projet/list.php +++ b/htdocs/projet/list.php @@ -130,7 +130,7 @@ foreach ($object->fields as $key => $val) continue; } - // don't allow search in private notes for external users when doing "search in all" + // Don't allow search in private notes for external users when doing "search in all" if (!empty($user->socid) && $key == "note_private") { continue; } @@ -138,7 +138,7 @@ foreach ($object->fields as $key => $val) $fieldstosearchall['p.'.$key] = $val['label']; } -// Add none object fields for "search in all" +// Add none object fields to "search in all" $fieldstosearchall['s.nom'] = "ThirdPartyName"; // Definition of fields for list @@ -150,7 +150,7 @@ foreach ($object->fields as $key => $val) continue; } - // visibility based on global settings + // Visibility based on global settings if(empty($conf->global->PROJECT_USE_OPPORTUNITIES) && $key == 'fk_opp_status') continue; if(empty($conf->global->PROJECT_USE_OPPORTUNITIES) && $key == 'opp_percent') continue; if(empty($conf->global->PROJECT_USE_OPPORTUNITIES) && $key == 'opp_amount') continue; @@ -165,6 +165,11 @@ foreach ($object->fields as $key => $val) 'position'=>$val['position']); } +// Add none object fields to fields for list +$arrayfields['s.nom'] = array('label'=>$langs->trans("ThirdParty"), 'checked'=>1, 'enabled'=>(empty($conf->societe->enabled) ? 0 : 1)); +$arrayfields['commercial'] = array('label'=>$langs->trans("SaleRepresentativesOfThirdParty"), 'checked'=>0); +$arrayfields['opp_weighted_amount'] = array('label'=>$langs->trans('OpportunityWeightedAmountShort'), 'checked'=>0, 'enabled'=>(empty($conf->global->PROJECT_USE_OPPORTUNITIES) ? 0 : 1), 'position'=>106); + // Extra fields if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label']) > 0) {