FIX Label of opportunities in graph with special chars badly encoded
This commit is contained in:
parent
9a5d0ab0a2
commit
e16fd45972
@ -1,4 +1,22 @@
|
||||
<?php
|
||||
/* Copyright (C) 2013-2020 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
// variable $listofopplabel and $listofoppstatus should be defined
|
||||
|
||||
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";
|
||||
@ -54,7 +72,7 @@ if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES))
|
||||
$labelStatus = '';
|
||||
|
||||
$code = dol_getIdFromCode($db, $status, 'c_lead_status', 'rowid', 'code');
|
||||
if ($code) $labelStatus = $langs->trans("OppStatus".$code);
|
||||
if ($code) $labelStatus = $langs->transnoentitiesnoconv("OppStatus".$code);
|
||||
if (empty($labelStatus)) $labelStatus = $listofopplabel[$status];
|
||||
|
||||
//$labelStatus .= ' ('.$langs->trans("Coeff").': '.price2num($listofoppstatus[$status]).')';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user