Fix: Can't view thirdparties that are not customer nor prospect nor
supplier.
This commit is contained in:
parent
3ace940505
commit
4d6ce2a1de
@ -1725,11 +1725,12 @@ function dol_substr($string,$start,$length,$stringencoding='')
|
||||
* @param string $type Type of graph ('pie', 'barline')
|
||||
* @param int $showpercent Show percent (with type='pie' only)
|
||||
* @param string $url Param to add an url to click values
|
||||
* @param int $combineother 0=No combine, 0.05=Combine if lower than 5%
|
||||
* @return void
|
||||
* @deprecated
|
||||
* @see DolGraph
|
||||
*/
|
||||
function dol_print_graph($htmlid,$width,$height,$data,$showlegend=0,$type='pie',$showpercent=0,$url='')
|
||||
function dol_print_graph($htmlid,$width,$height,$data,$showlegend=0,$type='pie',$showpercent=0,$url='',$combineother=0.05)
|
||||
{
|
||||
dol_syslog(__FUNCTION__ . " is deprecated", LOG_WARNING);
|
||||
|
||||
@ -1777,10 +1778,15 @@ function dol_print_graph($htmlid,$width,$height,$data,$showlegend=0,$type='pie',
|
||||
series: {
|
||||
pie: {
|
||||
show: true,
|
||||
radius: 0.8,
|
||||
radius: 0.8,';
|
||||
if ($combineother)
|
||||
{
|
||||
print '
|
||||
combine: {
|
||||
threshold: 0.05
|
||||
},
|
||||
threshold: '.$combineother.'
|
||||
},';
|
||||
}
|
||||
print '
|
||||
label: {
|
||||
show: true,
|
||||
radius: 0.9,
|
||||
|
||||
@ -584,6 +584,8 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
||||
}
|
||||
}
|
||||
|
||||
$newmenu->add("/societe/list.php?leftmenu=thirdparties", $langs->trans("List"),1);
|
||||
|
||||
// Prospects
|
||||
if (! empty($conf->societe->enabled) && empty($conf->global->SOCIETE_DISABLE_PROSPECTS))
|
||||
{
|
||||
|
||||
@ -146,7 +146,7 @@ if (! empty($conf->use_javascript_ajax) && ((round($third['prospect'])?1:0)+(rou
|
||||
if (! empty($conf->fournisseur->enabled) && empty($conf->global->SOCIETE_DISABLE_SUPPLIERS_STATS)) $dataseries[]=array('label'=>$langs->trans("Suppliers"),'data'=>round($third['supplier']));
|
||||
if (! empty($conf->societe->enabled)) $dataseries[]=array('label'=>$langs->trans("Others"),'data'=>round($third['other']));
|
||||
$data=array('series'=>$dataseries);
|
||||
dol_print_graph('stats',300,180,$data,1,'pie',0);
|
||||
dol_print_graph('stats',300,180,$data,1,'pie',0,'',0);
|
||||
print '</td></tr>'."\n";
|
||||
}
|
||||
else
|
||||
@ -189,6 +189,7 @@ if (! empty($conf->categorie->enabled) && ! empty($conf->global->CATEGORY_GRAPHS
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."categorie_societe as cs";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."categorie as c ON cs.fk_categorie = c.rowid";
|
||||
$sql.= " WHERE c.type = 2";
|
||||
if (! is_numeric($conf->global->CATEGORY_GRAPHSTATS_ON_THIRDPARTIES)) $sql.= " AND c.label like '".$db->escape($conf->global->CATEGORY_GRAPHSTATS_ON_THIRDPARTIES)."'";
|
||||
$sql.= " AND c.entity IN (".getEntity('category',1).")";
|
||||
$sql.= " GROUP BY c.label";
|
||||
$total=0;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user