diff --git a/htdocs/commande/class/commandestats.class.php b/htdocs/commande/class/commandestats.class.php index d531c5da6c5..88875f1d08f 100644 --- a/htdocs/commande/class/commandestats.class.php +++ b/htdocs/commande/class/commandestats.class.php @@ -2,6 +2,7 @@ /* Copyright (C) 2003 Rodolphe Quiedeville * Copyright (c) 2005 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2012 Marcos GarcĂ­a * * 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 @@ -73,7 +74,7 @@ class CommandeStats extends Stats $this->from = MAIN_DB_PREFIX.$object->table_element." as c"; $this->from.= ", ".MAIN_DB_PREFIX."societe as s"; $this->field='total_ht'; - $this->where.= " c.fk_statut > 0"; // Not draft and not cancelled + $this->where.= " c.fk_statut > 2"; // Only approved & ordered } $this->where.= " AND c.fk_soc = s.rowid AND c.entity = ".$conf->entity;