From 5ea37d78359cffc04c6879de070930c945154c5d Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Sat, 28 Nov 2009 07:14:25 +0000 Subject: [PATCH] Fix: limit prefix_com field Fix: use invoice field entity in stat Fix: replaced invoice is already with statut 3 --- htdocs/compta/facture/stats/facturestats.class.php | 14 +++++++------- htdocs/compta/facture/stats/index.php | 2 +- htdocs/soc.php | 6 +++--- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/htdocs/compta/facture/stats/facturestats.class.php b/htdocs/compta/facture/stats/facturestats.class.php index ec8ff78d3a6..b93ec1f09d3 100644 --- a/htdocs/compta/facture/stats/facturestats.class.php +++ b/htdocs/compta/facture/stats/facturestats.class.php @@ -58,20 +58,20 @@ class FactureStats extends Stats if ($mode == 'customer') { $object=new Facture($this->db); - $this->from = MAIN_DB_PREFIX.$object->table_element." as p, ".MAIN_DB_PREFIX."societe as s"; + $this->from = MAIN_DB_PREFIX.$object->table_element; $this->field='total'; } if ($mode == 'supplier') { $object=new FactureFournisseur($this->db); - $this->from = MAIN_DB_PREFIX.$object->table_element." as p, ".MAIN_DB_PREFIX."societe as s"; + $this->from = MAIN_DB_PREFIX.$object->table_element; $this->field='total_ht'; } $this->socid = $socid; $this->where =" fk_statut > 0"; - $this->where.= " AND p.fk_soc = s.rowid AND s.entity = ".$conf->entity; - if ($mode == 'customer') $this->where.=" AND (fk_statut != 3 OR close_code != 'replaced')"; // Exclude replaced invoices + $this->where.= " AND entity = ".$conf->entity; + if ($mode == 'customer') $this->where.=" AND fk_statut != 3"; // Exclude replaced invoices if ($this->socid) { $this->where.=" AND fk_soc = ".$this->socid; @@ -81,7 +81,7 @@ class FactureStats extends Stats /** - * \brief Renvoie le nombre de facture par année + * \brief Renvoie le nombre de facture par annee * \return array Array of values */ function getNbByYear() @@ -96,7 +96,7 @@ class FactureStats extends Stats /** - * \brief Renvoie le nombre de facture par mois pour une année donnée + * \brief Renvoie le nombre de facture par mois pour une annee donnee * \param year Year to scan * \return array Array of values */ @@ -115,7 +115,7 @@ class FactureStats extends Stats /** - * \brief Renvoie le montant de facture par mois pour une année donnée + * \brief Renvoie le montant de facture par mois pour une annee donnee * \param year Year to scan * \return array Array of values */ diff --git a/htdocs/compta/facture/stats/index.php b/htdocs/compta/facture/stats/index.php index 52d781d3e7e..d489dc69d8e 100644 --- a/htdocs/compta/facture/stats/index.php +++ b/htdocs/compta/facture/stats/index.php @@ -30,7 +30,7 @@ require_once(DOL_DOCUMENT_ROOT."/core/dolgraph.class.php"); $WIDTH=500; $HEIGHT=200; -// Sécurité accés client +// Securite acces client if ($user->societe_id > 0) { $action = ''; diff --git a/htdocs/soc.php b/htdocs/soc.php index 8f895d52565..fd8c604ea18 100644 --- a/htdocs/soc.php +++ b/htdocs/soc.php @@ -397,7 +397,7 @@ $_GET["action"] == 'create' || $_POST["action"] == 'create') if ($soc->particulier) { print ''.$langs->trans('LastName').''; - print ''.$langs->trans('Prefix').''; + print ''.$langs->trans('Prefix').''; print ''.$langs->trans('FirstName').''; print ' '; print ''.$langs->trans("UserTitle").''; @@ -407,7 +407,7 @@ $_GET["action"] == 'create' || $_POST["action"] == 'create') else { print ''.$langs->trans('Name').''; - print ''.$langs->trans('Prefix').''; + print ''.$langs->trans('Prefix').''; } // Client / Prospect @@ -735,7 +735,7 @@ elseif ($_GET["action"] == 'edit' || $_POST["action"] == 'edit') } else { - print ''; + print ''; } print '';