From 1f471d46eb6445d3a736773e019716523b14a9cc Mon Sep 17 00:00:00 2001 From: gauthier Date: Fri, 10 Apr 2020 15:51:51 +0200 Subject: [PATCH 1/2] FIX : some others modules (like subtotal) use other product_type than 0 or 1 AND must not be considered in this report --- htdocs/compta/stats/cabyprodserv.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/compta/stats/cabyprodserv.php b/htdocs/compta/stats/cabyprodserv.php index 786521c0511..f9057e1066c 100644 --- a/htdocs/compta/stats/cabyprodserv.php +++ b/htdocs/compta/stats/cabyprodserv.php @@ -243,6 +243,7 @@ if ($modecompta == 'CREANCES-DETTES') } $sql.= " WHERE l.fk_facture = f.rowid"; $sql.= " AND f.fk_statut in (1,2)"; + $sql.= " AND l.product_type in (0,1)"; if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { $sql.= " AND f.type IN (0,1,2,5)"; } else { From e2660fd31c7c14bb5344a77ed14880ef598d85a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sat, 11 Apr 2020 22:38:28 +0200 Subject: [PATCH 2/2] Update actioncomm.class.php --- htdocs/comm/action/class/actioncomm.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index 392cd9255d9..98b910fdfca 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -774,7 +774,7 @@ class ActionComm extends CommonObject dol_syslog(get_class($this)."::delete", LOG_DEBUG); $res=$this->db->query($sql); - if ($res < 0) { + if (!$res) { $this->error=$this->db->lasterror(); $error++; } @@ -785,7 +785,7 @@ class ActionComm extends CommonObject dol_syslog(get_class($this)."::delete", LOG_DEBUG); $res=$this->db->query($sql); - if ($res < 0) { + if (!$res) { $this->error=$this->db->lasterror(); $error++; }