mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-22 17:31:25 +01:00
css
This commit is contained in:
@@ -3256,10 +3256,10 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
|
||||
|
||||
// Define $color
|
||||
$arrayconvpictotocolor = array(
|
||||
'address'=>'#37a', 'building'=>'#37a', 'bom'=>'#993',
|
||||
'companies'=>'#37a', 'company'=>'#37a', 'contact'=>'#37a', 'dynamicprice'=>'#993',
|
||||
'address'=>'#37a', 'building'=>'#37a', 'bom'=>'#a69944',
|
||||
'companies'=>'#37a', 'company'=>'#37a', 'contact'=>'#37a', 'dynamicprice'=>'#a69944',
|
||||
'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',
|
||||
'playdisabled'=>'#ccc', 'printer'=>'#444', 'resize'=>'#444', 'rss'=>'#cba',
|
||||
'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';
|
||||
$dolgraph = new DolGraph();
|
||||
$dolgraph->SetData($dataseries);
|
||||
$dolgraph->SetDataColor(array_values($colorseries));
|
||||
$dolgraph->setShowLegend(2);
|
||||
$dolgraph->setShowPercent(1);
|
||||
$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);
|
||||
|
||||
|
||||
// Get list of ponderated percent for each status
|
||||
$listofoppstatus = array(); $listofopplabel = array(); $listofoppcode = array();
|
||||
// Get list of ponderated percent and colors for each status
|
||||
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 .= " FROM ".MAIN_DB_PREFIX."c_lead_status as cls";
|
||||
$sql .= " WHERE active=1";
|
||||
@@ -115,11 +116,34 @@ if ($resql)
|
||||
$listofoppstatus[$objp->rowid] = $objp->percent;
|
||||
$listofopplabel[$objp->rowid] = $objp->label;
|
||||
$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++;
|
||||
}
|
||||
}
|
||||
else dol_print_error($db);
|
||||
|
||||
//var_dump($listofoppcode);
|
||||
|
||||
|
||||
print '<div class="fichecenter"><div class="fichethirdleft">';
|
||||
|
||||
Reference in New Issue
Block a user