mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Fix color of reports. Fix include_once into include.
This commit is contained in:
parent
90b122035f
commit
12e847ade1
|
|
@ -244,7 +244,7 @@ if ($mode && !count($data)) {
|
|||
if (count($arrayjs) && $mode == 'memberbycountry') {
|
||||
$color_file = DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php';
|
||||
if (is_readable($color_file)) {
|
||||
include_once $color_file;
|
||||
include $color_file;
|
||||
}
|
||||
|
||||
// Assume we've already included the proper headers so just call our script inline
|
||||
|
|
|
|||
|
|
@ -1327,7 +1327,7 @@ $cacheusers = array();
|
|||
// Define theme_datacolor array
|
||||
$color_file = DOL_DOCUMENT_ROOT."/theme/".$conf->theme."/theme_vars.inc.php";
|
||||
if (is_readable($color_file)) {
|
||||
include_once $color_file;
|
||||
include $color_file;
|
||||
}
|
||||
if (!is_array($theme_datacolor)) {
|
||||
$theme_datacolor = array(array(120, 130, 150), array(200, 160, 180), array(190, 190, 220));
|
||||
|
|
|
|||
|
|
@ -742,7 +742,7 @@ $cacheusers = array();
|
|||
// Define theme_datacolor array
|
||||
$color_file = DOL_DOCUMENT_ROOT."/theme/".$conf->theme."/theme_vars.inc.php";
|
||||
if (is_readable($color_file)) {
|
||||
include_once $color_file;
|
||||
include $color_file;
|
||||
}
|
||||
if (!is_array($theme_datacolor)) {
|
||||
$theme_datacolor = array(array(120, 130, 150), array(200, 160, 180), array(190, 190, 220));
|
||||
|
|
|
|||
|
|
@ -765,7 +765,7 @@ $cacheusers = array();
|
|||
// Define theme_datacolor array
|
||||
$color_file = DOL_DOCUMENT_ROOT."/theme/".$conf->theme."/theme_vars.inc.php";
|
||||
if (is_readable($color_file)) {
|
||||
include_once $color_file;
|
||||
include $color_file;
|
||||
}
|
||||
if (!is_array($theme_datacolor)) {
|
||||
$theme_datacolor = array(array(120, 130, 150), array(200, 160, 180), array(190, 190, 220));
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ if ($resql) {
|
|||
}
|
||||
$db->free($resql);
|
||||
|
||||
include_once DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php';
|
||||
include DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php';
|
||||
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder nohover centpercent">';
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ if ($resql) {
|
|||
}
|
||||
$db->free($resql);
|
||||
|
||||
include_once DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php';
|
||||
include DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php';
|
||||
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder nohover centpercent">';
|
||||
|
|
|
|||
|
|
@ -187,7 +187,7 @@ if ($resql) {
|
|||
|
||||
$colorseries = array();
|
||||
|
||||
include_once DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php';
|
||||
include DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php';
|
||||
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder nohover centpercent">';
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ class DolGraph
|
|||
|
||||
$color_file = DOL_DOCUMENT_ROOT . '/theme/' . $conf->theme . '/theme_vars.inc.php';
|
||||
if (is_readable($color_file)) {
|
||||
include_once $color_file;
|
||||
include $color_file;
|
||||
if (isset($theme_bordercolor)) {
|
||||
$this->bordercolor = $theme_bordercolor;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -270,6 +270,8 @@ function getCustomerInvoicePieChart($socid = 0)
|
|||
|
||||
$db->free($resql);
|
||||
|
||||
include DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php';
|
||||
|
||||
$result = '<div class="div-table-responsive-no-min">';
|
||||
$result .= '<table class="noborder nohover centpercent">';
|
||||
$result .= '<tr class="liste_titre">';
|
||||
|
|
@ -285,6 +287,19 @@ function getCustomerInvoicePieChart($socid = 0)
|
|||
$objectstatic->paye = $status == Facture::STATUS_CLOSED ? -1 : 0;
|
||||
|
||||
$dataseries[] = [$objectstatic->getLibStatut(1), (isset($vals[$status]) ? (int) $vals[$status] : 0)];
|
||||
if ($status == Facture::STATUS_DRAFT) {
|
||||
$colorseries[$status] = '-'.$badgeStatus0;
|
||||
}
|
||||
if ($status == Facture::STATUS_VALIDATED) {
|
||||
$colorseries[$status] = $badgeStatus1;
|
||||
}
|
||||
if ($status == Facture::STATUS_CLOSED) {
|
||||
$colorseries[$status] = $badgeStatus9;
|
||||
}
|
||||
if ($status == Facture::STATUS_ABANDONED) {
|
||||
$colorseries[$status] = $badgeStatus6;
|
||||
}
|
||||
|
||||
if (!$conf->use_javascript_ajax) {
|
||||
$result .= '<tr class="oddeven">';
|
||||
$result .= '<td>'.$objectstatic->getLibStatut(0).'</td>';
|
||||
|
|
@ -296,6 +311,7 @@ function getCustomerInvoicePieChart($socid = 0)
|
|||
if ($conf->use_javascript_ajax) {
|
||||
$dolgraph = new DolGraph();
|
||||
$dolgraph->SetData($dataseries);
|
||||
$dolgraph->SetDataColor(array_values($colorseries));
|
||||
$dolgraph->setShowLegend(2);
|
||||
$dolgraph->setShowPercent(1);
|
||||
$dolgraph->SetType(['pie']);
|
||||
|
|
@ -373,6 +389,8 @@ function getPurchaseInvoicePieChart($socid = 0)
|
|||
|
||||
$db->free($resql);
|
||||
|
||||
include DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php';
|
||||
|
||||
$result = '<div class="div-table-responsive-no-min">';
|
||||
$result .= '<table class="noborder nohover centpercent">';
|
||||
|
||||
|
|
@ -389,6 +407,19 @@ function getPurchaseInvoicePieChart($socid = 0)
|
|||
$objectstatic->paye = $status == FactureFournisseur::STATUS_CLOSED ? -1 : 0;
|
||||
|
||||
$dataseries[] = [$objectstatic->getLibStatut(1), (isset($vals[$status]) ? (int) $vals[$status] : 0)];
|
||||
if ($status == FactureFournisseur::STATUS_DRAFT) {
|
||||
$colorseries[$status] = '-'.$badgeStatus0;
|
||||
}
|
||||
if ($status == FactureFournisseur::STATUS_VALIDATED) {
|
||||
$colorseries[$status] = $badgeStatus1;
|
||||
}
|
||||
if ($status == FactureFournisseur::STATUS_CLOSED) {
|
||||
$colorseries[$status] = $badgeStatus9;
|
||||
}
|
||||
if ($status == FactureFournisseur::STATUS_ABANDONED) {
|
||||
$colorseries[$status] = $badgeStatus6;
|
||||
}
|
||||
|
||||
if (!$conf->use_javascript_ajax) {
|
||||
$result .= '<tr class="oddeven">';
|
||||
$result .= '<td>'.$objectstatic->getLibStatut(0).'</td>';
|
||||
|
|
@ -400,6 +431,7 @@ function getPurchaseInvoicePieChart($socid = 0)
|
|||
if ($conf->use_javascript_ajax) {
|
||||
$dolgraph = new DolGraph();
|
||||
$dolgraph->SetData($dataseries);
|
||||
$dolgraph->SetDataColor(array_values($colorseries));
|
||||
$dolgraph->setShowLegend(2);
|
||||
$dolgraph->setShowPercent(1);
|
||||
$dolgraph->SetType(['pie']);
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ if (!empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) { // This is usel
|
|||
$dataseries = array();
|
||||
$colorseries = array();
|
||||
|
||||
include_once DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php';
|
||||
include DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php';
|
||||
|
||||
print '<table class="noborder nohover centpercent">';
|
||||
print '<tr class="liste_titre">';
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@ if ($resql) {
|
|||
}
|
||||
$db->free($resql);
|
||||
|
||||
include_once DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php';
|
||||
include DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php';
|
||||
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder nohover centpercent">';
|
||||
|
|
|
|||
|
|
@ -115,7 +115,7 @@ if ($resql) {
|
|||
}
|
||||
$db->free($resql);
|
||||
|
||||
include_once DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php';
|
||||
include DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php';
|
||||
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder nohover centpercent">';
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ if ($conf->use_javascript_ajax) {
|
|||
$colorseries = array();
|
||||
$vals = array();
|
||||
|
||||
include_once DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php';
|
||||
include DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php';
|
||||
|
||||
while ($i < $num) {
|
||||
$obj = $db->fetch_object($resql);
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@ print_barre_liste($form->textwithpicto($title, $tooltiphelp), 0, $_SERVER["PHP_S
|
|||
|
||||
|
||||
// Get list of ponderated percent and colors for each status
|
||||
include_once DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php';
|
||||
include 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";
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ if ($conf->use_javascript_ajax) {
|
|||
$colorseries = array();
|
||||
$vals = array();
|
||||
|
||||
include_once DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php';
|
||||
include DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php';
|
||||
|
||||
while ($i < $num) {
|
||||
$obj = $db->fetch_object($resql);
|
||||
|
|
@ -168,7 +168,7 @@ if ($conf->use_javascript_ajax) {
|
|||
$colorseries = array();
|
||||
$vals = array();
|
||||
|
||||
include_once DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php';
|
||||
include DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php';
|
||||
|
||||
while ($i < $num) {
|
||||
$obj = $db->fetch_object($resql);
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ if ($resql) {
|
|||
}
|
||||
$db->free($resql);
|
||||
|
||||
include_once DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php';
|
||||
include DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php';
|
||||
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder centpercent">';
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ if (empty($dolibarr_nocache)) {
|
|||
}
|
||||
|
||||
|
||||
require DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php';
|
||||
include DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php';
|
||||
if (defined('THEME_ONLY_CONSTANT')) {
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user