diff --git a/htdocs/compta/stats/cabyprodserv.php b/htdocs/compta/stats/cabyprodserv.php index 485a6088338..729e23998c3 100644 --- a/htdocs/compta/stats/cabyprodserv.php +++ b/htdocs/compta/stats/cabyprodserv.php @@ -231,8 +231,6 @@ if ($modecompta == 'CREANCES-DETTES') $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON l.fk_product = p.rowid"; if ($selected_cat === -2) { // Without any category $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."categorie_product as cp ON p.rowid = cp.fk_product"; - } elseif ($selected_cat) { // Into a specific category - $sql .= ", ".MAIN_DB_PREFIX."categorie as c, ".MAIN_DB_PREFIX."categorie_product as cp"; } $sql .= " WHERE l.fk_facture = f.rowid"; $sql .= " AND f.fk_statut in (1,2)";