From bec9181d3f0ca6d60e915f2ec988e64efb789ead Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 13 Jul 2022 01:01:44 +0200 Subject: [PATCH] Fix show no record if list empty --- htdocs/product/list.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/htdocs/product/list.php b/htdocs/product/list.php index 1cf80a98b79..8f2eed18829 100644 --- a/htdocs/product/list.php +++ b/htdocs/product/list.php @@ -1939,6 +1939,17 @@ if ($resql) { $db->free($resql); + // If no record found + if ($num == 0) { + $colspan = 1; + foreach ($arrayfields as $key => $val) { + if (!empty($val['checked'])) { + $colspan++; + } + } + print ''.$langs->trans("NoRecordFound").''; + } + print ""; print ""; print '';