From 1950e50c89c556518bc03e4cc8b11253ebcc5865 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 10 Jun 2021 16:31:28 +0200 Subject: [PATCH] Fix test --- htdocs/compta/facture/class/facture.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 5636095c42e..1f633015cd4 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -4164,7 +4164,7 @@ class Facture extends CommonInvoice $sql .= " AND fs.type = ".self::TYPE_SITUATION; $sql .= " AND fs.fk_statut IN (".self::STATUS_VALIDATED.",".self::STATUS_CLOSED.")"; if ($socid > 0) { - $sql .= " AND f.fk_soc = ".((int) $socid); + $sql .= " AND fs.fk_soc = ".((int) $socid); } $sql .= " GROUP BY fs.situation_cycle_ref)"; // For each situation_cycle_ref, we take the higher rowid $sql .= ")";