From ae1e4073ad8f684261eeb1c8ddd2b406d37c9ce8 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 13 Apr 2020 00:33:50 +0200 Subject: [PATCH] Debug custom report tool --- htdocs/core/customreports.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/htdocs/core/customreports.php b/htdocs/core/customreports.php index e6d773f788d..5659d126211 100644 --- a/htdocs/core/customreports.php +++ b/htdocs/core/customreports.php @@ -14,7 +14,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . * - * This tool can be included into a list page with + * Note: This tool can be included into a list page with : * define('USE_CUSTOME_REPORT_AS_INCLUDE', 1); * include DOL_DOCUMENT_ROOT.'/core/customreports.php'; */ @@ -723,7 +723,12 @@ if ($mode == 'graph') { $px1->draw($filenamenb, $fileurlnb); - print $px1->show($totalnbofrecord ? 0 : $langs->trans("SelectYourGraphOptionsFirst")); + $texttoshow = $langs->trans("NoRecordFound"); + if (! GETPOSTISSET('search_measures') || ! GETPOSTISSET('search_xaxis')) { + $texttoshow = $langs->trans("SelectYourGraphOptionsFirst"); + } + + print $px1->show($totalnbofrecord ? 0 : $texttoshow); } }