Option to show the n first line of desc into the basket

This commit is contained in:
Laurent Destailleur 2020-03-11 23:56:48 +01:00
parent efeda2e747
commit 54da1e73ff

View File

@ -845,19 +845,27 @@ if ($placeid > 0)
if (empty($line->product_type)) $htmlforlines .= img_object('', 'product').' '; if (empty($line->product_type)) $htmlforlines .= img_object('', 'product').' ';
else $htmlforlines .= img_object('', 'service').' '; else $htmlforlines .= img_object('', 'service').' ';
} }
if ($line->product_label) $htmlforlines .= $line->product_label; if (empty($conf->global->TAKEPOS_SHOW_N_FIRST_LINES)) {
if ($line->product_label && $line->desc) $htmlforlines .= '<br>'; $tooltiptext = '<b>'.$langs->trans("Ref").'</b> : '.$line->product_ref.'<br>';
if ($line->product_label != $line->desc) $tooltiptext .= '<b>'.$langs->trans("Label").'</b> : '.$line->product_label.'<br>';
{ $tooltiptext .= '<br>';
$firstline = dolGetFirstLineOfText($line->desc); $tooltiptext .= $line->desc;
if ($firstline != $line->desc) $htmlforlines .= $form->textwithpicto($line->product_label ? $line->product_label : $line->product_ref, $tooltiptext);
{ } else {
$htmlforlines .= $form->textwithpicto(dolGetFirstLineOfText($line->desc), $line->desc); if ($line->product_label) $htmlforlines .= $line->product_label;
} if ($line->product_label && $line->desc) $htmlforlines .= '<br>';
else if ($line->product_label != $line->desc)
{ {
$htmlforlines .= $line->desc; $firstline = dolGetFirstLineOfText($line->desc, $conf->global->TAKEPOS_SHOW_N_FIRST_LINES);
} if ($firstline != $line->desc)
{
$htmlforlines .= $form->textwithpicto(dolGetFirstLineOfText($line->desc), $line->desc);
}
else
{
$htmlforlines .= $line->desc;
}
}
} }
if (!empty($line->array_options['options_order_notes'])) $htmlforlines .= "<br>(".$line->array_options['options_order_notes'].")"; if (!empty($line->array_options['options_order_notes'])) $htmlforlines .= "<br>(".$line->array_options['options_order_notes'].")";
if ($_SESSION["basiclayout"] != 1) if ($_SESSION["basiclayout"] != 1)