From e691217d00035371c7989d62a0d5280f7c601050 Mon Sep 17 00:00:00 2001 From: Vincent Dieltiens Date: Thu, 12 Aug 2021 13:56:41 +0200 Subject: [PATCH] Add a Global variable 'PDF_HIDE_PRODUCT_LABEL_IN_SUPPLIER_LINES' to have the possibility to hide product label in supplier order lines. --- htdocs/core/lib/pdf.lib.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php index 6a17f4b6d44..93829c4a470 100644 --- a/htdocs/core/lib/pdf.lib.php +++ b/htdocs/core/lib/pdf.lib.php @@ -1275,12 +1275,15 @@ function pdf_getlinedesc($object, $i, $outputlangs, $hideref = 0, $hidedesc = 0, $desc = str_replace('(DEPOSIT)', $outputlangs->trans('Deposit'), $desc); } - // Description short of product line - $libelleproduitservice = $label; - if (!empty($libelleproduitservice) && !empty($conf->global->PDF_BOLD_PRODUCT_LABEL)) { - $libelleproduitservice = ''.$libelleproduitservice.''; + if (empty($conf->global->PDF_HIDE_PRODUCT_LABEL_IN_SUPPLIER_LINES)) { + // Description short of product line + $libelleproduitservice = $label; + if (!empty($libelleproduitservice) && !empty($conf->global->PDF_BOLD_PRODUCT_LABEL)) { + $libelleproduitservice = ''.$libelleproduitservice.''; + } } + // Add ref of subproducts if (!empty($conf->global->SHOW_SUBPRODUCT_REF_IN_PDF)) { $prodser->get_sousproduits_arbo();