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 '