Merge pull request #25255 from DoliGreece/sonikf-patch-1

fix societe stats graph card translation
This commit is contained in:
Laurent Destailleur 2023-07-02 20:06:20 +02:00 committed by GitHub
commit 1fe894fe25
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -151,16 +151,16 @@ if (!empty($conf->use_javascript_ajax) && ((round($third['prospect']) ? 1 : 0) +
$thirdpartygraph .= '<tr><td class="center" colspan="2">';
$dataseries = array();
if (isModEnabled('societe') && $user->hasRight('societe', 'lire') && empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && empty($conf->global->SOCIETE_DISABLE_PROSPECTS_STATS)) {
$dataseries[] = array($langs->trans("Prospects"), round($third['prospect']));
$dataseries[] = array($langs->transnoentitiesnoconv("Prospects"), round($third['prospect']));
}
if (isModEnabled('societe') && $user->hasRight('societe', 'lire') && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS_STATS)) {
$dataseries[] = array($langs->trans("Customers"), round($third['customer']));
$dataseries[] = array($langs->transnoentitiesnoconv("Customers"), round($third['customer']));
}
if (((isModEnabled('fournisseur') && $user->hasRight('fournisseur', 'facture', 'lire') && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || (isModEnabled('supplier_order') && $user->hasRight('supplier_order', 'lire')) || (isModEnabled('supplier_invoice') && $user->hasRight('supplier_invoice', 'lire'))) && empty($conf->global->SOCIETE_DISABLE_SUPPLIERS_STATS)) {
$dataseries[] = array($langs->trans("Suppliers"), round($third['supplier']));
$dataseries[] = array($langs->transnoentitiesnoconv("Suppliers"), round($third['supplier']));
}
if (isModEnabled('societe')) {
$dataseries[] = array($langs->trans("Others"), round($third['other']));
$dataseries[] = array($langs->transnoentitiesnoconv("Others"), round($third['other']));
}
include_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php';
$dolgraph = new DolGraph();