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 string $type Type of graph ('pie', 'barline')
|
||||||
* @param int $showpercent Show percent (with type='pie' only)
|
* @param int $showpercent Show percent (with type='pie' only)
|
||||||
* @param string $url Param to add an url to click values
|
* @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
|
* @return void
|
||||||
* @deprecated
|
* @deprecated
|
||||||
* @see DolGraph
|
* @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);
|
dol_syslog(__FUNCTION__ . " is deprecated", LOG_WARNING);
|
||||||
|
|
||||||
@ -1777,10 +1778,15 @@ function dol_print_graph($htmlid,$width,$height,$data,$showlegend=0,$type='pie',
|
|||||||
series: {
|
series: {
|
||||||
pie: {
|
pie: {
|
||||||
show: true,
|
show: true,
|
||||||
radius: 0.8,
|
radius: 0.8,';
|
||||||
|
if ($combineother)
|
||||||
|
{
|
||||||
|
print '
|
||||||
combine: {
|
combine: {
|
||||||
threshold: 0.05
|
threshold: '.$combineother.'
|
||||||
},
|
},';
|
||||||
|
}
|
||||||
|
print '
|
||||||
label: {
|
label: {
|
||||||
show: true,
|
show: true,
|
||||||
radius: 0.9,
|
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
|
// Prospects
|
||||||
if (! empty($conf->societe->enabled) && empty($conf->global->SOCIETE_DISABLE_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->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']));
|
if (! empty($conf->societe->enabled)) $dataseries[]=array('label'=>$langs->trans("Others"),'data'=>round($third['other']));
|
||||||
$data=array('series'=>$dataseries);
|
$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";
|
print '</td></tr>'."\n";
|
||||||
}
|
}
|
||||||
else
|
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.= " FROM ".MAIN_DB_PREFIX."categorie_societe as cs";
|
||||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."categorie as c ON cs.fk_categorie = c.rowid";
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."categorie as c ON cs.fk_categorie = c.rowid";
|
||||||
$sql.= " WHERE c.type = 2";
|
$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.= " AND c.entity IN (".getEntity('category',1).")";
|
||||||
$sql.= " GROUP BY c.label";
|
$sql.= " GROUP BY c.label";
|
||||||
$total=0;
|
$total=0;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user