From acb9380f1c0e784e0c8eaef5287d805f5740b7bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a?= Date: Wed, 15 Aug 2012 07:31:55 +0200 Subject: [PATCH] Fixed a problem with supplier's orders stats They were showing orders even if they were not approved or ordered Conflicts: htdocs/commande/class/commandestats.class.php --- htdocs/commande/class/commandestats.class.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/commande/class/commandestats.class.php b/htdocs/commande/class/commandestats.class.php index e8aa6c6ffea..aca6e1a1ab8 100644 --- a/htdocs/commande/class/commandestats.class.php +++ b/htdocs/commande/class/commandestats.class.php @@ -1,7 +1,8 @@ * Copyright (c) 2005 Laurent Destailleur - * Copyright (C) 2005-2009 Regis Houssin + * 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;