From bee08492909488a71a07a9b268fe708f6e2cdad7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 6 Feb 2021 00:42:53 +0100 Subject: [PATCH] Fix when nothing found, we should show message nothing found --- htdocs/compta/paiement/list.php | 8 ++++++++ htdocs/societe/list.php | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/htdocs/compta/paiement/list.php b/htdocs/compta/paiement/list.php index e2e9e63ba28..cfcdead5fed 100644 --- a/htdocs/compta/paiement/list.php +++ b/htdocs/compta/paiement/list.php @@ -497,6 +497,14 @@ while ($i < min($num, $limit)) { // Show total line include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php'; +// 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 ""; diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php index 5b5e9685628..0df74bc166e 100644 --- a/htdocs/societe/list.php +++ b/htdocs/societe/list.php @@ -1343,6 +1343,14 @@ while ($i < min($num, $limit)) $i++; } +// If no record found +if ($num == 0) +{ + $colspan = 1; + foreach ($arrayfields as $key => $val) { if (!empty($val['checked'])) $colspan++; } + print ''.$langs->trans("NoRecordFound").''; +} + $db->free($resql); $parameters = array('arrayfields'=>$arrayfields, 'sql'=>$sql);