Graph use color of status
This commit is contained in:
parent
c2f0cdc0f6
commit
f4a52470e3
@ -348,7 +348,7 @@ if (!empty($conf->facture->enabled) && $user->rights->facture->lire)
|
||||
$sql .= " GROUP BY f.rowid, f.ref, f.fk_statut, f.type, f.total, f.tva, f.total_ttc, f.paye, f.tms, f.date_lim_reglement,";
|
||||
$sql .= " s.nom, s.rowid, s.code_client, s.code_compta, s.email,";
|
||||
$sql .= " cc.rowid, cc.code";
|
||||
$sql .= " ORDER BY f.tms DESC ";
|
||||
$sql .= " ORDER BY f.tms DESC";
|
||||
$sql .= $db->plimit($max, 0);
|
||||
|
||||
$resql = $db->query($sql);
|
||||
|
||||
@ -178,7 +178,7 @@ class Don extends CommonObject
|
||||
}
|
||||
|
||||
$statusType = 'status'.$status;
|
||||
if ($status == self::STATUS_CANCELED) $statusType = 'status5';
|
||||
if ($status == self::STATUS_CANCELED) $statusType = 'status9';
|
||||
if ($status == self::STATUS_PAID) $statusType = 'status6';
|
||||
|
||||
return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status], '', $statusType, $mode);
|
||||
|
||||
@ -118,6 +118,10 @@ if (!empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is useles
|
||||
}
|
||||
}
|
||||
|
||||
$dataseries = array();
|
||||
$colorseries = array();
|
||||
|
||||
include_once DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php';
|
||||
|
||||
print '<table class="noborder nohover centpercent">';
|
||||
print '<tr class="liste_titre">';
|
||||
@ -128,6 +132,10 @@ $listofstatus = array(0, 1, -1, 2);
|
||||
foreach ($listofstatus as $status)
|
||||
{
|
||||
$dataseries[] = array($donstatic->LibStatut($status, 1), (isset($nb[$status]) ? (int) $nb[$status] : 0));
|
||||
if ($status == Don::STATUS_DRAFT) $colorseries[$status] = '-'.$badgeStatus0;
|
||||
if ($status == Don::STATUS_VALIDATED) $colorseries[$status] = $badgeStatus1;
|
||||
if ($status == Don::STATUS_CANCELED) $colorseries[$status] = $badgeStatus9;
|
||||
if ($status == Don::STATUS_PAID) $colorseries[$status] = $badgeStatus6;
|
||||
}
|
||||
|
||||
if ($conf->use_javascript_ajax)
|
||||
@ -137,6 +145,7 @@ if ($conf->use_javascript_ajax)
|
||||
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'));
|
||||
|
||||
@ -27,8 +27,8 @@ BoxTitleLastSuppliers=Latest %s recorded suppliers
|
||||
BoxTitleLastModifiedSuppliers=Vendors: last %s modified
|
||||
BoxTitleLastModifiedCustomers=Customers: last %s modified
|
||||
BoxTitleLastCustomersOrProspects=Latest %s customers or prospects
|
||||
BoxTitleLastCustomerBills=Latest %s Customer invoices
|
||||
BoxTitleLastSupplierBills=Latest %s Vendor invoices
|
||||
BoxTitleLastCustomerBills=Latest %s modified Customer invoices
|
||||
BoxTitleLastSupplierBills=Latest %s modified Vendor invoices
|
||||
BoxTitleLastModifiedProspects=Prospects: last %s modified
|
||||
BoxTitleLastModifiedMembers=Latest %s members
|
||||
BoxTitleLastFicheInter=Latest %s modified interventions
|
||||
|
||||
Loading…
Reference in New Issue
Block a user