From e43cd7ed915d1aedc04806058d643d381b792c65 Mon Sep 17 00:00:00 2001 From: Frank Cools Date: Fri, 3 Oct 2025 14:34:30 +0200 Subject: [PATCH] Fix VAT number formatting spacing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Changed from 3 spaces after first 2 chars to 2 extra spaces - Changed from 43 spaces after first 4 chars to 2 extra spaces - Updated method documentation to reflect correct spacing - Example: FR85489417469 → F R 8 5 4 8 9 4 1 7 4 6 9 (with 2 extra spaces after positions 1 and 3) --- core/class/declarationtva_pdf.class.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/core/class/declarationtva_pdf.class.php b/core/class/declarationtva_pdf.class.php index 4bd71ba..ea602a4 100644 --- a/core/class/declarationtva_pdf.class.php +++ b/core/class/declarationtva_pdf.class.php @@ -1110,7 +1110,7 @@ class DeclarationTVA_PDF /** * Format VAT number with special spacing - * Adds space between every character, with 3 spaces after first 2 chars and 43 spaces after first 4 chars + * Adds space between every character, with 2 extra spaces after first 2 chars and 2 extra spaces after first 4 chars * * @param string $vat_number VAT number * @return string Formatted VAT number @@ -1136,14 +1136,14 @@ class DeclarationTVA_PDF $result .= ' '; } - // After first 2 characters, add 3 extra spaces + // After first 2 characters, add 2 extra spaces if ($i == 1) { - $result .= ' '; + $result .= ' '; } - // After first 4 characters, add 43 extra spaces + // After first 4 characters, add 2 extra spaces if ($i == 3) { - $result .= str_repeat(' ', 43); + $result .= ' '; } }