From f17474a8de3448e40da8d31c00019bd4bfafb13f Mon Sep 17 00:00:00 2001 From: atm-lena Date: Mon, 11 Jan 2021 16:56:19 +0100 Subject: [PATCH 1/3] 12.0 FIX Translation Permission777 FR --- htdocs/langs/fr_FR/admin.lang | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/langs/fr_FR/admin.lang b/htdocs/langs/fr_FR/admin.lang index c4025fb1577..097f2227790 100644 --- a/htdocs/langs/fr_FR/admin.lang +++ b/htdocs/langs/fr_FR/admin.lang @@ -848,6 +848,7 @@ Permission773=Supprimer les notes de frais Permission774=Lire toutes les notes de frais (même pour les utilisateurs en dehors de ma hierarchie) Permission775=Approuver les notes de frais Permission776=Payer les notes de frais +Permission777=Lire les notes de frais de tout le monde Permission779=Exporter les notes de frais Permission1001=Consulter les stocks Permission1002=Créer/modifier entrepôts From 77f213832ec9fbc1ec2925066739355b9e85fe27 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Mon, 11 Jan 2021 19:40:44 +0100 Subject: [PATCH 2/3] fix: update group name --- htdocs/user/class/usergroup.class.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/htdocs/user/class/usergroup.class.php b/htdocs/user/class/usergroup.class.php index 4d858ffbaf9..2c29db85fc7 100644 --- a/htdocs/user/class/usergroup.class.php +++ b/htdocs/user/class/usergroup.class.php @@ -675,6 +675,10 @@ class UserGroup extends CommonObject { global $user, $conf; + if (empty($this->nom) && !empty($this->name)) { + $this->nom = $this->name; + } + $entity = $conf->entity; if (!empty($conf->multicompany->enabled) && $conf->entity == 1) { From 1cf86931b3328ec36aab517c41b79a36b383ad09 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 14 Jan 2021 12:58:50 +0100 Subject: [PATCH 3/3] Fix graph of opportunity when a status has been removed. --- htdocs/langs/en_US/main.lang | 1 + htdocs/projet/graph_opportunities.inc.php | 12 ++++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index 6d2892cddad..67c78bf2915 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -216,6 +216,7 @@ Value=Value PersonalValue=Personal value NewObject=New %s NewValue=New value +OldValue=Old value %s CurrentValue=Current value Code=Code Type=Type diff --git a/htdocs/projet/graph_opportunities.inc.php b/htdocs/projet/graph_opportunities.inc.php index 2bb9332c2ae..97977406a48 100644 --- a/htdocs/projet/graph_opportunities.inc.php +++ b/htdocs/projet/graph_opportunities.inc.php @@ -20,9 +20,8 @@ if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) { $sql = "SELECT p.fk_opp_status as opp_status, cls.code, COUNT(p.rowid) as nb, SUM(p.opp_amount) as opp_amount, SUM(p.opp_amount * p.opp_percent) as ponderated_opp_amount"; - $sql .= " FROM ".MAIN_DB_PREFIX."projet as p, ".MAIN_DB_PREFIX."c_lead_status as cls"; + $sql .= " FROM ".MAIN_DB_PREFIX."projet as p LEFT JOIN ".MAIN_DB_PREFIX."c_lead_status as cls ON p.fk_opp_status = cls.rowid"; // If lead status has been removed, we must show it in stats as unknown $sql .= " WHERE p.entity IN (".getEntity('project').")"; - $sql .= " AND p.fk_opp_status = cls.rowid"; $sql .= " AND p.fk_statut = 1"; // Opend projects only if ($mine || empty($user->rights->projet->all->lire)) $sql .= " AND p.rowid IN (".$projectsListId.")"; if ($socid) $sql .= " AND (p.fk_soc IS NULL OR p.fk_soc = 0 OR p.fk_soc = ".$socid.")"; @@ -66,7 +65,15 @@ if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) print '
'; print ''; print ''."\n"; + $listofstatus = array_keys($listofoppstatus); + // Complete with values found into database and not into the dictionary + foreach($valsamount as $key => $val) { + if (!in_array($key, $listofstatus)) { + $listofstatus[] = $key; + } + } + foreach ($listofstatus as $status) { $labelStatus = ''; @@ -74,6 +81,7 @@ if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) $code = dol_getIdFromCode($db, $status, 'c_lead_status', 'rowid', 'code'); if ($code) $labelStatus = $langs->transnoentitiesnoconv("OppStatus".$code); if (empty($labelStatus)) $labelStatus = $listofopplabel[$status]; + if (empty($labelStatus)) $labelStatus = $langs->transnoentitiesnoconv('OldValue', $status); // When id is id of an entry no more in dictionary for example. //$labelStatus .= ' ('.$langs->trans("Coeff").': '.price2num($listofoppstatus[$status]).')'; //$labelStatus .= ' - '.price2num($listofoppstatus[$status]).'%';
'.$langs->trans("Statistics").' - '.$langs->trans("OpportunitiesStatusForOpenedProjects").'