forked from Wavyzz/dolibarr
css
This commit is contained in:
@@ -3256,10 +3256,10 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
|
|||||||
|
|
||||||
// Define $color
|
// Define $color
|
||||||
$arrayconvpictotocolor = array(
|
$arrayconvpictotocolor = array(
|
||||||
'address'=>'#37a', 'building'=>'#37a', 'bom'=>'#993',
|
'address'=>'#37a', 'building'=>'#37a', 'bom'=>'#a69944',
|
||||||
'companies'=>'#37a', 'company'=>'#37a', 'contact'=>'#37a', 'dynamicprice'=>'#993',
|
'companies'=>'#37a', 'company'=>'#37a', 'contact'=>'#37a', 'dynamicprice'=>'#a69944',
|
||||||
'edit'=>'#444', 'note'=>'#999', 'error'=>'', 'listlight'=>'#999',
|
'edit'=>'#444', 'note'=>'#999', 'error'=>'', 'listlight'=>'#999',
|
||||||
'lot'=>'#993', 'mrp'=>'#993', 'product'=>'#993', 'service'=>'#993', 'stock'=>'#993',
|
'lot'=>'#a69944', 'mrp'=>'#a69944', 'product'=>'#a69944', 'service'=>'#a69944', 'stock'=>'#a69944',
|
||||||
'other'=>'#ddd',
|
'other'=>'#ddd',
|
||||||
'playdisabled'=>'#ccc', 'printer'=>'#444', 'resize'=>'#444', 'rss'=>'#cba',
|
'playdisabled'=>'#ccc', 'printer'=>'#444', 'resize'=>'#444', 'rss'=>'#cba',
|
||||||
'stats'=>'#444', 'switch_off'=>'#999', 'uparrow'=>'#555', 'warning'=>''
|
'stats'=>'#444', 'switch_off'=>'#999', 'uparrow'=>'#555', 'warning'=>''
|
||||||
|
|||||||
@@ -76,6 +76,7 @@ if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES))
|
|||||||
include_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php';
|
||||||
$dolgraph = new DolGraph();
|
$dolgraph = new DolGraph();
|
||||||
$dolgraph->SetData($dataseries);
|
$dolgraph->SetData($dataseries);
|
||||||
|
$dolgraph->SetDataColor(array_values($colorseries));
|
||||||
$dolgraph->setShowLegend(2);
|
$dolgraph->setShowLegend(2);
|
||||||
$dolgraph->setShowPercent(1);
|
$dolgraph->setShowPercent(1);
|
||||||
$dolgraph->SetType(array('pie'));
|
$dolgraph->SetType(array('pie'));
|
||||||
|
|||||||
@@ -98,8 +98,9 @@ else
|
|||||||
print_barre_liste($form->textwithpicto($title, $tooltiphelp), 0, $_SERVER["PHP_SELF"], '', '', '', '', 0, -1, 'project', 0, $morehtml);
|
print_barre_liste($form->textwithpicto($title, $tooltiphelp), 0, $_SERVER["PHP_SELF"], '', '', '', '', 0, -1, 'project', 0, $morehtml);
|
||||||
|
|
||||||
|
|
||||||
// Get list of ponderated percent for each status
|
// Get list of ponderated percent and colors for each status
|
||||||
$listofoppstatus = array(); $listofopplabel = array(); $listofoppcode = array();
|
include_once DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php';
|
||||||
|
$listofoppstatus = array(); $listofopplabel = array(); $listofoppcode = array(); $colorseries = array();
|
||||||
$sql = "SELECT cls.rowid, cls.code, cls.percent, cls.label";
|
$sql = "SELECT cls.rowid, cls.code, cls.percent, cls.label";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."c_lead_status as cls";
|
$sql .= " FROM ".MAIN_DB_PREFIX."c_lead_status as cls";
|
||||||
$sql .= " WHERE active=1";
|
$sql .= " WHERE active=1";
|
||||||
@@ -115,11 +116,34 @@ if ($resql)
|
|||||||
$listofoppstatus[$objp->rowid] = $objp->percent;
|
$listofoppstatus[$objp->rowid] = $objp->percent;
|
||||||
$listofopplabel[$objp->rowid] = $objp->label;
|
$listofopplabel[$objp->rowid] = $objp->label;
|
||||||
$listofoppcode[$objp->rowid] = $objp->code;
|
$listofoppcode[$objp->rowid] = $objp->code;
|
||||||
|
switch($objp->code) {
|
||||||
|
case 'PROSP':
|
||||||
|
$colorseries[$objp->rowid] = "-".$badgeStatus0;
|
||||||
|
break;
|
||||||
|
case 'QUAL':
|
||||||
|
$colorseries[$objp->rowid] = "-".$badgeStatus1;
|
||||||
|
break;
|
||||||
|
case 'PROPO':
|
||||||
|
$colorseries[$objp->rowid] = $badgeStatus1;
|
||||||
|
break;
|
||||||
|
case 'NEGO':
|
||||||
|
$colorseries[$objp->rowid] = $badgeStatus4;
|
||||||
|
break;
|
||||||
|
case 'LOST':
|
||||||
|
$colorseries[$objp->rowid] = $badgeStatus9;
|
||||||
|
break;
|
||||||
|
case 'WON':
|
||||||
|
$colorseries[$objp->rowid] = $badgeStatus6;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
$colorseries[$objp->rowid] = $badgeStatus2;
|
||||||
|
break;
|
||||||
|
}
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else dol_print_error($db);
|
else dol_print_error($db);
|
||||||
|
//var_dump($listofoppcode);
|
||||||
|
|
||||||
|
|
||||||
print '<div class="fichecenter"><div class="fichethirdleft">';
|
print '<div class="fichecenter"><div class="fichethirdleft">';
|
||||||
|
|||||||
Reference in New Issue
Block a user