From c7fab6a83e42e14b7563f6b54903ce65ee7ea375 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 20 Apr 2020 13:26:06 +0200 Subject: [PATCH] Fix no tooltip of not predefined products --- htdocs/takepos/invoice.php | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/htdocs/takepos/invoice.php b/htdocs/takepos/invoice.php index e358b24602a..adbf403491e 100644 --- a/htdocs/takepos/invoice.php +++ b/htdocs/takepos/invoice.php @@ -944,6 +944,7 @@ if ($placeid > 0) if (is_array($invoice->lines) && count($invoice->lines)) { + print ''."\n"; $tmplines = array_reverse($invoice->lines); foreach ($tmplines as $line) { @@ -993,11 +994,14 @@ if ($placeid > 0) else $htmlforlines .= img_object('', 'service').' '; } if (empty($conf->global->TAKEPOS_SHOW_N_FIRST_LINES)) { - $tooltiptext = ''.$langs->trans("Ref").' : '.$line->product_ref.'
'; - $tooltiptext .= ''.$langs->trans("Label").' : '.$line->product_label.'
'; - if ($line->product_label != $line->desc) { - if ($line->desc) $tooltiptext .= '
'; - $tooltiptext .= $line->desc; + $tooltiptext = ''; + if ($line->product_ref) { + $tooltiptext .= ''.$langs->trans("Ref").' : '.$line->product_ref.'
'; + $tooltiptext .= ''.$langs->trans("Label").' : '.$line->product_label.'
'; + if ($line->product_label != $line->desc) { + if ($line->desc) $tooltiptext .= '
'; + $tooltiptext .= $line->desc; + } } $htmlforlines .= $form->textwithpicto($line->product_label ? $line->product_label : ($line->product_ref ? $line->product_ref : dolGetFirstLineOfText($line->desc, 1)), $tooltiptext); } else {