Update SIRET formatting to use 2 extra spaces before last 5 numbers

- Changed from 1 extra space to 2 extra spaces before last 5 characters
- Updated method documentation to reflect the change
- Example: 48941746900033 → 4 8 9 4 1 7 4 6 9    0 0 0 3 3 (with 2 spaces before last 5)
This commit is contained in:
Frank Cools 2025-10-03 13:56:13 +02:00
parent 83cc9016ea
commit 22fffa1d0a

View File

@ -1080,7 +1080,7 @@ class DeclarationTVA_PDF
/** /**
* Format SIRET number with special spacing * Format SIRET number with special spacing
* Adds space between every character, with extra space before last 5 characters * Adds space between every character, with 2 extra spaces before last 5 characters
* *
* @param string $siret SIRET number * @param string $siret SIRET number
* @return string Formatted SIRET * @return string Formatted SIRET
@ -1102,8 +1102,8 @@ class DeclarationTVA_PDF
// Add space between every character in main part // Add space between every character in main part
$formatted_main = implode(' ', str_split($main_part)); $formatted_main = implode(' ', str_split($main_part));
// Add space between every character in last 5, with extra space before // Add space between every character in last 5, with 2 extra spaces before
$formatted_last = ' ' . implode(' ', str_split($last_5)); $formatted_last = ' ' . implode(' ', str_split($last_5));
return $formatted_main . $formatted_last; return $formatted_main . $formatted_last;
} }