From b95ab2239f5ddeae6e2092bc6e37d51d5e1343c3 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Mon, 12 Nov 2012 09:43:12 +0100 Subject: [PATCH] Fix: remove unused code --- htdocs/compta/sociales/class/chargesociales.class.php | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/htdocs/compta/sociales/class/chargesociales.class.php b/htdocs/compta/sociales/class/chargesociales.class.php index 41f93281f85..87d90301fb5 100644 --- a/htdocs/compta/sociales/class/chargesociales.class.php +++ b/htdocs/compta/sociales/class/chargesociales.class.php @@ -407,17 +407,6 @@ class ChargeSociales extends CommonObject $sql = 'SELECT sum(amount) as amount'; $sql.= ' FROM '.MAIN_DB_PREFIX.$table; $sql.= ' WHERE '.$field.' = '.$this->id; - // No need to filter on conf->entity because there is already a filter on the primary key of element. - // getSommePaiement must return list of paiement for this id, whatever is the entity. - // Filtering on entity must be before or later probably - /* - $sql = 'SELECT SUM(pc.amount) as amount'; - $sql.= ' FROM '.MAIN_DB_PREFIX.'paiementcharge as pc'; - $sql.= ', '.MAIN_DB_PREFIX.'chargesociales as c'; - $sql.= ' WHERE c.entity = '.$conf->entity; - $sql.= ' AND pc.fk_charge = c.rowid'; - $sql.= ' AND pc.fk_charge = '.$this->id; - */ dol_syslog(get_class($this)."::getSommePaiement sql=".$sql, LOG_DEBUG); $resql=$this->db->query($sql);