diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 8faa999dc6f5c..b4677961f5071 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -3127,7 +3127,7 @@ public function getChildrenOfLine($id, $includealltree = 0) while ($row = $this->db->fetch_row($resql)) { $rows[] = $row[0]; if (!empty($includealltree)) { - $rows = array_merge($rows, $this->getChildrenOfLine($row[0]), $includealltree); + $rows = array_merge($rows, $this->getChildrenOfLine($row[0], $includealltree)); } } } diff --git a/htdocs/fourn/commande/list.php b/htdocs/fourn/commande/list.php index 0258622e476f3..454af46592040 100644 --- a/htdocs/fourn/commande/list.php +++ b/htdocs/fourn/commande/list.php @@ -869,10 +869,10 @@ $sql .= " AND cf.date_livraison <= '".$db->idate($search_date_delivery_end)."'"; } if ($search_date_valid_start) { - $sql .= " AND cf.date_commande >= '".$db->idate($search_date_valid_start)."'"; + $sql .= " AND cf.date_valid >= '".$db->idate($search_date_valid_start)."'"; } if ($search_date_valid_end) { - $sql .= " AND cf.date_commande <= '".$db->idate($search_date_valid_end)."'"; + $sql .= " AND cf.date_valid <= '".$db->idate($search_date_valid_end)."'"; } if ($search_date_approve_start) { $sql .= " AND cf.date_livraison >= '".$db->idate($search_date_approve_start)."'";