From d53ffb55285d90af8fa34e3b0745a6164c42a7e9 Mon Sep 17 00:00:00 2001 From: valentina Date: Thu, 12 Dec 2024 16:55:13 +0100 Subject: [PATCH] fix: stampa ddt con sconti --- templates/ddt/body.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/templates/ddt/body.php b/templates/ddt/body.php index c15e830ab..cb9903d81 100755 --- a/templates/ddt/body.php +++ b/templates/ddt/body.php @@ -96,7 +96,7 @@ foreach ($righe as $riga) { $r['descrizione'] = str_replace('Rif. '.strtolower((string) $key), '', $r['descrizione']); if (preg_match("/Rif\.(.*)/s", $r['descrizione'], $rif2)) { - $r['descrizione'] = str_replace('Rif.'.strtolower($rif2[1]), '', $r['descrizione']); + $r['descrizione'] = str_replace('\nRif.'.strtolower($rif2[1]), '', $r['descrizione']); $text .= ''.$rif2[0].''; } @@ -115,7 +115,7 @@ foreach ($righe as $riga) { $autofill->count($text); } } - $r['descrizione'] = preg_replace("/Rif\.(.*)/s", '', (string) $r['descrizione']); + $r['descrizione'] = preg_replace("/(\r\n|\r|\n)Rif\.(.*)/s", '', (string) $r['descrizione']); } $source_type = $riga::class; @@ -162,8 +162,6 @@ foreach ($righe as $riga) { echo '
'.$text.''; - - $autofill->count($text, true); } echo '