From 9ec41c1a449e2d5b92c3f63880be94453c86f584 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Thu, 13 Oct 2022 08:34:23 +0200 Subject: [PATCH] FIX avoid error, fetch of product is mandatory (by id or by ref) --- htdocs/product/stats/facture.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/product/stats/facture.php b/htdocs/product/stats/facture.php index c62c421d6e4..9b3ee0ad5e4 100644 --- a/htdocs/product/stats/facture.php +++ b/htdocs/product/stats/facture.php @@ -200,12 +200,12 @@ if ($id > 0 || !empty($ref)) { if ($result) { $num = $db->num_rows($result); + // Fetch of product is mandatory + $option .= '&id='.$product->id; + if ($limit > 0 && $limit != $conf->liste_limit) { $option .= '&limit='.urlencode($limit); } - if (!empty($id)) { - $option .= '&id='.$product->id; - } if (!empty($search_month)) { $option .= '&search_month='.urlencode($search_month); }