From e72fbbfe170c598bde6028ae9c912718f1f3003f Mon Sep 17 00:00:00 2001 From: Nicolas Date: Fri, 2 Oct 2020 09:21:44 +0200 Subject: [PATCH 1/3] Hide the label into pdf document for variants --- htdocs/core/lib/pdf.lib.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php index deacc6c128b..1f572607acd 100644 --- a/htdocs/core/lib/pdf.lib.php +++ b/htdocs/core/lib/pdf.lib.php @@ -1315,7 +1315,11 @@ function pdf_getlinedesc($object, $i, $outputlangs, $hideref = 0, $hidedesc = 0, { $libelleproduitservice = $desc."\n".$libelleproduitservice; } else { - $libelleproduitservice .= $desc; + if (!empty($conf->global->HIDE_LABEL_VARIANT_PDF)) { + $libelleproduitservice = $desc; + } else { + $libelleproduitservice .= $desc; + } } } } else { From 85dfb5bf3ce7c9e1adae31b755629d2b376f9bc8 Mon Sep 17 00:00:00 2001 From: Nicolas Date: Fri, 2 Oct 2020 09:27:01 +0200 Subject: [PATCH 2/3] Hide the label into pdf document for variants --- htdocs/core/lib/pdf.lib.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php index 1f572607acd..88a2850ca59 100644 --- a/htdocs/core/lib/pdf.lib.php +++ b/htdocs/core/lib/pdf.lib.php @@ -11,6 +11,7 @@ * Copyright (C) 2014 Teddy Andreotti <125155@supinfo.com> * Copyright (C) 2015-2016 Marcos GarcĂ­a * Copyright (C) 2019 Lenin Rivas + * Copyright (C) 2020 Nicolas ZABOURI * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by From 9e4e027495327c04fe6472087952629d7f186260 Mon Sep 17 00:00:00 2001 From: Nicolas Date: Fri, 2 Oct 2020 09:39:42 +0200 Subject: [PATCH 3/3] Hide label --- htdocs/core/lib/pdf.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php index 88a2850ca59..ae26d4f9da6 100644 --- a/htdocs/core/lib/pdf.lib.php +++ b/htdocs/core/lib/pdf.lib.php @@ -1316,7 +1316,7 @@ function pdf_getlinedesc($object, $i, $outputlangs, $hideref = 0, $hidedesc = 0, { $libelleproduitservice = $desc."\n".$libelleproduitservice; } else { - if (!empty($conf->global->HIDE_LABEL_VARIANT_PDF)) { + if (!empty($conf->global->HIDE_LABEL_VARIANT_PDF) && $prodser->isVariant()) { $libelleproduitservice = $desc; } else { $libelleproduitservice .= $desc;