From d0413f423fea63ce36f81dbd8e0def4459dbf052 Mon Sep 17 00:00:00 2001 From: fr69400 <82267780+fr69400@users.noreply.github.com> Date: Thu, 9 Dec 2021 09:33:00 +0100 Subject: [PATCH 1/6] FIX - Missing one html conversion --- htdocs/core/lib/pdf.lib.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php index 686a442ec2f..22316ab1b08 100644 --- a/htdocs/core/lib/pdf.lib.php +++ b/htdocs/core/lib/pdf.lib.php @@ -1413,6 +1413,9 @@ function pdf_getlinedesc($object, $i, $outputlangs, $hideref = 0, $hidedesc = 0, $discount->fetch($object->lines[$i]->fk_remise_except); $libelleproduitservice = $outputlangs->transnoentitiesnoconv("DiscountFromExcessPaid", $discount->ref_invoice_supplier_source); } else { + if (dol_textishtml($libelleproduitservice) && !dol_textishtml($desc)) { + str_replace("\n",'
', $desc); + } if ($idprod) { // Check if description must be output if (!empty($object->element)) { From f74077a2e73a5b1c2ddae4a3269c2e28df0ba4cf Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Thu, 9 Dec 2021 08:35:12 +0000 Subject: [PATCH 2/6] Fixing style errors. --- htdocs/core/lib/pdf.lib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php index 22316ab1b08..0e1164bce30 100644 --- a/htdocs/core/lib/pdf.lib.php +++ b/htdocs/core/lib/pdf.lib.php @@ -1413,8 +1413,8 @@ function pdf_getlinedesc($object, $i, $outputlangs, $hideref = 0, $hidedesc = 0, $discount->fetch($object->lines[$i]->fk_remise_except); $libelleproduitservice = $outputlangs->transnoentitiesnoconv("DiscountFromExcessPaid", $discount->ref_invoice_supplier_source); } else { - if (dol_textishtml($libelleproduitservice) && !dol_textishtml($desc)) { - str_replace("\n",'
', $desc); + if (dol_textishtml($libelleproduitservice) && !dol_textishtml($desc)) { + str_replace("\n", '
', $desc); } if ($idprod) { // Check if description must be output From abd984bc14057244f47700cc4deeb7223a75310f Mon Sep 17 00:00:00 2001 From: fr69400 <82267780+fr69400@users.noreply.github.com> Date: Thu, 9 Dec 2021 09:39:22 +0100 Subject: [PATCH 3/6] Update pdf.lib.php --- 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 0e1164bce30..bda030187b3 100644 --- a/htdocs/core/lib/pdf.lib.php +++ b/htdocs/core/lib/pdf.lib.php @@ -1414,7 +1414,7 @@ function pdf_getlinedesc($object, $i, $outputlangs, $hideref = 0, $hidedesc = 0, $libelleproduitservice = $outputlangs->transnoentitiesnoconv("DiscountFromExcessPaid", $discount->ref_invoice_supplier_source); } else { if (dol_textishtml($libelleproduitservice) && !dol_textishtml($desc)) { - str_replace("\n", '
', $desc); + $desc = str_replace("\n", '
', $desc); } if ($idprod) { // Check if description must be output From 0c2dce372f71b5c7e6ebc55ad1318a3acb94d2df Mon Sep 17 00:00:00 2001 From: javieralapps4up Date: Thu, 9 Dec 2021 11:24:03 +0100 Subject: [PATCH 4/6] FIX In the card of a direct debit FIX In the card of a direct debit, if you change the limit, it gets disordered and vice versa --- htdocs/compta/prelevement/card.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/htdocs/compta/prelevement/card.php b/htdocs/compta/prelevement/card.php index 8a232377ab7..95d30becd03 100644 --- a/htdocs/compta/prelevement/card.php +++ b/htdocs/compta/prelevement/card.php @@ -382,6 +382,9 @@ if ($id > 0 || $ref) { $i = 0; $urladd = "&id=".urlencode($id); + if ($limit > 0 && $limit != $conf->liste_limit) { + $urladd .= '&limit='.urlencode($limit); + } print '
'."\n"; print ''; @@ -392,6 +395,12 @@ if ($id > 0 || $ref) { if (!empty($limit)) { print ''; } + if (!empty($sortfield)) { + print ''; + } + if (!empty($sortorder)) { + print ''; + } print_barre_liste($langs->trans("Lines"), $page, $_SERVER["PHP_SELF"], $urladd, $sortfield, $sortorder, '', $num, $nbtotalofrecords, '', 0, '', '', $limit); print '
'; // You can use div-table-responsive-no-min if you dont need reserved height for your table From 93356d9dc4f3bfb7595966eb0e0a42cf323e0a5a Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Thu, 9 Dec 2021 10:25:58 +0000 Subject: [PATCH 5/6] Fixing style errors. --- htdocs/compta/prelevement/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/prelevement/card.php b/htdocs/compta/prelevement/card.php index 95d30becd03..c29cadf564d 100644 --- a/htdocs/compta/prelevement/card.php +++ b/htdocs/compta/prelevement/card.php @@ -383,7 +383,7 @@ if ($id > 0 || $ref) { $urladd = "&id=".urlencode($id); if ($limit > 0 && $limit != $conf->liste_limit) { - $urladd .= '&limit='.urlencode($limit); + $urladd .= '&limit='.urlencode($limit); } print ''."\n"; From baabfd380fd6ba863f8d3cd28cb3511db15e77b9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 9 Dec 2021 17:25:06 +0100 Subject: [PATCH 6/6] Update pdf.lib.php --- htdocs/core/lib/pdf.lib.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php index bda030187b3..ba2e0b1039e 100644 --- a/htdocs/core/lib/pdf.lib.php +++ b/htdocs/core/lib/pdf.lib.php @@ -1413,9 +1413,6 @@ function pdf_getlinedesc($object, $i, $outputlangs, $hideref = 0, $hidedesc = 0, $discount->fetch($object->lines[$i]->fk_remise_except); $libelleproduitservice = $outputlangs->transnoentitiesnoconv("DiscountFromExcessPaid", $discount->ref_invoice_supplier_source); } else { - if (dol_textishtml($libelleproduitservice) && !dol_textishtml($desc)) { - $desc = str_replace("\n", '
', $desc); - } if ($idprod) { // Check if description must be output if (!empty($object->element)) { @@ -1431,12 +1428,12 @@ function pdf_getlinedesc($object, $i, $outputlangs, $hideref = 0, $hidedesc = 0, if (!empty($conf->global->HIDE_LABEL_VARIANT_PDF) && $prodser->isVariant()) { $libelleproduitservice = $desc; } else { - $libelleproduitservice .= $desc; + $libelleproduitservice = dol_concatdesc($libelleproduitservice, $desc); } } } } else { - $libelleproduitservice .= $desc; + $libelleproduitservice = dol_concatdesc($libelleproduitservice, $desc); } } }