diff --git a/htdocs/compta/bank/account.php b/htdocs/compta/bank/account.php index 0001b34c67c..556fea2bef1 100644 --- a/htdocs/compta/bank/account.php +++ b/htdocs/compta/bank/account.php @@ -193,13 +193,16 @@ if ($account > 0) } - $titre=$langs->trans("FinancialAccount")." : ".$acct->label; - print_fiche_titre($titre,$mesg); - // Onglets $head=bank_prepare_head($acct); dolibarr_fiche_head($head,'journal',$langs->trans("FinancialAccount"),0); + if (! $_GET["action"]=='addline') + { + $titre=$langs->trans("FinancialAccount")." : ".$acct->label; + print_fiche_titre($titre,$mesg); + } + print ''; /* @@ -217,8 +220,6 @@ if ($account > 0) print ''; print ''; - print "\n"; - print ''; print ''; print ''; diff --git a/htdocs/compta/bank/annuel.php b/htdocs/compta/bank/annuel.php index 8ce81fc2b66..c6847ca02dd 100644 --- a/htdocs/compta/bank/annuel.php +++ b/htdocs/compta/bank/annuel.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2005 Laurent Destailleur + * Copyright (C) 2004-2006 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -18,14 +18,13 @@ * * $Id$ * $Source$ - * */ /** - \file htdocs/compta/bank/annuel.php - \ingroup banque - \brief Page reporting mensuel Entrées/Sorties d'un compte bancaire - \version $Revision$ + \file htdocs/compta/bank/annuel.php + \ingroup banque + \brief Page reporting mensuel Entrées/Sorties d'un compte bancaire + \version $Revision$ */ require("./pre.inc.php"); @@ -109,14 +108,14 @@ else } -$title=$langs->trans("FinancialAccount")." : ".$acct->label; -$lien=($year_start?"".img_previous()." ".img_next()."":""); -print_fiche_titre($title,$lien); - // Onglets $head=bank_prepare_head($acct); dolibarr_fiche_head($head,'annual',$langs->trans("FinancialAccount"),0); +$title=$langs->trans("FinancialAccount")." : ".$acct->label; +$lien=($year_start?"".img_previous()." ".img_next()."":""); +print_fiche_titre($title,$lien); + // Affiche tableau print '
 
'.$langs->trans("AddBankRecordLong").'
'; diff --git a/htdocs/compta/bank/bankid_fr.php b/htdocs/compta/bank/bankid_fr.php index 4751a1fcf6e..a54331a1483 100644 --- a/htdocs/compta/bank/bankid_fr.php +++ b/htdocs/compta/bank/bankid_fr.php @@ -104,9 +104,6 @@ $form = new Form($db); /* * Affichage onglets */ - $titre=$langs->trans("FinancialAccount")." : ".$account->label; - print_fiche_titre($titre,$mesg); - // Onglets $head=bank_prepare_head($account); dolibarr_fiche_head($head, 'bankid', $langs->trans("FinancialAccount")); diff --git a/htdocs/compta/bank/fiche.php b/htdocs/compta/bank/fiche.php index d5d8e6482ec..a97aa791f20 100644 --- a/htdocs/compta/bank/fiche.php +++ b/htdocs/compta/bank/fiche.php @@ -258,8 +258,6 @@ else /* * Affichage onglets */ - $titre=$langs->trans("FinancialAccount")." : ".$account->label; - print_fiche_titre($titre,$mesg); // Onglets $head=bank_prepare_head($account); diff --git a/htdocs/compta/bank/graph.php b/htdocs/compta/bank/graph.php index 788214bb619..eead38c42a9 100644 --- a/htdocs/compta/bank/graph.php +++ b/htdocs/compta/bank/graph.php @@ -158,6 +158,7 @@ if ($account > 0) $px->SetWidth($width); $px->SetHeight($height); $px->SetType('lines'); + $px->setBgColor('onglet'); $px->draw($file); @@ -248,6 +249,7 @@ if ($account > 0) $px->SetWidth($width); $px->SetHeight($height); $px->SetType('lines'); + $px->setBgColor('onglet'); $px->draw($file); @@ -322,6 +324,7 @@ if ($account > 0) $px->SetWidth($width); $px->SetHeight($height); $px->SetType('lines'); + $px->setBgColor('onglet'); $px->draw($file); @@ -398,12 +401,9 @@ if ($account > 0) $px->SetHeight($height); $px->SetType('bars'); $px->SetShading(8); + $px->setBgColor('onglet'); $px->draw($file); - - $titre=$langs->trans("FinancialAccount")." : ".$acct->label; - print_fiche_titre($titre,$mesg); - // Onglets $head=bank_prepare_head($acct); dolibarr_fiche_head($head,'graph',$langs->trans("FinancialAccount"),0); diff --git a/htdocs/compta/bank/releve.php b/htdocs/compta/bank/releve.php index 444e70be8f7..34ef2336347 100644 --- a/htdocs/compta/bank/releve.php +++ b/htdocs/compta/bank/releve.php @@ -87,13 +87,13 @@ if (! isset($_GET["num"])) $numrows = $db->num_rows($result); $i = 0; - $titre=$langs->trans("FinancialAccount")." : ".$acct->label; - print_barre_liste($titre, $page, $_SERVER["PHP_SELF"], "&account=".$_GET["account"], $sortfield, $sortorder,'',$numrows); - // Onglets $head=bank_prepare_head($acct); dolibarr_fiche_head($head,'statement',$langs->trans("FinancialAccount"),0); + $titre=$langs->trans("FinancialAccount")." : ".$acct->label; + print_barre_liste($titre, $page, $_SERVER["PHP_SELF"], "&account=".$_GET["account"], $sortfield, $sortorder,'',$numrows); + print '
'; print ""; print ''; diff --git a/htdocs/compta/facture/stats/index.php b/htdocs/compta/facture/stats/index.php index 9d258e3642d..42cec6ca7df 100644 --- a/htdocs/compta/facture/stats/index.php +++ b/htdocs/compta/facture/stats/index.php @@ -1,6 +1,6 @@ - * Copyright (c) 2004 Laurent Destailleur +/* Copyright (C) 2003 Rodolphe Quiedeville + * Copyright (c) 2004-2006 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -18,7 +18,6 @@ * * $Id$ * $Source$ - * */ /** @@ -34,10 +33,7 @@ require_once(DOL_DOCUMENT_ROOT."/dolgraph.class.php"); $WIDTH=500; $HEIGHT=250; - -/* - * Sécurité accés client - */ +// Sécurité accés client if ($user->societe_id > 0) { $action = ''; @@ -67,6 +63,7 @@ if (! $mesg) $px->SetLegend(array($year - 1, $year)); $px->SetWidth($WIDTH); $px->SetHeight($HEIGHT); + $px->SetShading(4); $px->draw($filename); } @@ -76,7 +73,7 @@ if ($socidp) $sql .= " AND fk_soc = $socidp"; } $sql .= " GROUP BY dm DESC "; -$result=$db->query($sql); +$resql=$db->query($sql); if ($resql) { $num = $db->num_rows($resql); @@ -104,7 +101,7 @@ if ($resql) } else { - dolibarr_print_error($db); + dolibarr_print_error($db); } diff --git a/htdocs/dolgraph.class.php b/htdocs/dolgraph.class.php index 559d78e9a04..6f994ed3c70 100644 --- a/htdocs/dolgraph.class.php +++ b/htdocs/dolgraph.class.php @@ -63,6 +63,7 @@ class DolGraph function DolGraph() { global $conf; + global $theme_bordercolor, $theme_datacolor, $theme_bgcolor, $theme_bgcoloronglet; // Test si module GD présent $modules_list = get_loaded_extensions(); @@ -92,12 +93,12 @@ class DolGraph $color_file = DOL_DOCUMENT_ROOT."/theme/".$conf->theme."/graph-color.php"; if (is_readable($color_file)) { - include($color_file); + include_once($color_file); if (isset($theme_bordercolor)) $this->bordercolor = $theme_bordercolor; if (isset($theme_datacolor)) $this->datacolor = $theme_datacolor; if (isset($theme_bgcolor)) $this->bgcolor = $theme_bgcolor; } - + //print 'bgcolor: '.join(',',$this->bgcolor).'
'; return 1; } @@ -161,12 +162,26 @@ class DolGraph $this->graph->SetPrecisionX(0); // Set areas - $this->graph->SetNewPlotAreaPixels(80, 40, $this->width-10, $this->height-40); + $left_space=80; // For y labels + $right_space=10; // If no legend + if (isset($this->Legend)) $right_space=70; // For legend + + $this->graph->SetNewPlotAreaPixels($left_space, 40, $this->width-$right_space, $this->height-40); if (isset($this->MaxValue)) { $this->graph->SetPlotAreaWorld(0,$this->MinValue,sizeof($this->data),$this->MaxValue); } + // Define title + if (strlen($this->title)) $this->graph->SetTitle($this->title); + + // Défini position du graphe (et legende) au sein de l'image + if (isset($this->Legend)) + { + $this->graph->SetLegendPixels($this->width-$right_space+8,40,''); + $this->graph->SetLegend($this->Legend); + } + if (isset($this->SetShading)) { $this->graph->SetShading($this->SetShading); @@ -186,20 +201,7 @@ class DolGraph $this->graph->SetPlotBorderType("left"); // Affiche axe y a gauche uniquement $this->graph->SetVertTickPosition('plotleft'); // Affiche tick axe y a gauche uniquement - - - - - // Define title - if (strlen($this->title)) $this->graph->SetTitle($this->title); - - // Défini position du graphe (et legende) au sein de l'image - if (isset($this->Legend)) - { - $this->graph->SetLegend($this->Legend); - } - $this->graph->SetOutputFile($file); } @@ -264,9 +266,29 @@ class DolGraph unset($this->bgcolor); } + /** + * \brief Definie la couleur de fond du graphique + * \param bg_color array(R,G,B) ou 'onglet' ou 'default' + */ function SetBgColor($bg_color = array(255,255,255)) { - $this->bgcolor = $bg_color; + global $theme_bgcolor,$theme_bgcoloronglet; + if (! is_array($bg_color)) + { + if ($bg_color == 'onglet') + { + //print 'ee'.join(',',$theme_bgcoloronglet); + $this->bgcolor = $theme_bgcoloronglet; + } + else + { + $this->bgcolor = $theme_bgcolor; + } + } + else + { + $this->bgcolor = $bg_color; + } } function ResetDataColor() diff --git a/htdocs/facture.class.php b/htdocs/facture.class.php index f4f6ccd2755..161dc850e72 100644 --- a/htdocs/facture.class.php +++ b/htdocs/facture.class.php @@ -1623,7 +1623,6 @@ class Facture extends CommonObject return $langs->trans('Bill'.$prefix.'StatusPayed').' '.img_picto($langs->trans('BillStatusPayed'),'statut6'); } } - } /** diff --git a/htdocs/socnote.php b/htdocs/socnote.php index ec425a02e1e..8e890507437 100644 --- a/htdocs/socnote.php +++ b/htdocs/socnote.php @@ -118,9 +118,9 @@ if ($socidp > 0) print ""; print "id."\">"; - // éditeur wysiwyg if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_SOCIETE) { + // Editeur wysiwyg require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php"); $doleditor=new DolEditor('note',$societe->note,280,'dolibarr_notes','In',true); $doleditor->Create(); @@ -129,7 +129,6 @@ if ($socidp > 0) { print ''; } - } else {
'.$langs->trans("AccountStatement").'