Import parteneri: coduri fiscale/CNP invalide se salveaza gol, partenerii straini nu se valideaza romaneste

This commit is contained in:
2026-08-02 10:02:31 +03:00
parent da0fb555d7
commit 349130c369
6 changed files with 291 additions and 25 deletions

12
ALTE/check_cf_litere.ps1 Normal file
View File

@@ -0,0 +1,12 @@
# Ce coduri fiscale NENUMERICE apar in XML-urile Fidelio (posibili parteneri straini)
param([string]$Dir = "D:\PROIECTE\FLORA\FLORA2ROA\EXEMPLE\hotel")
$map = @{}
Get-ChildItem -Path $Dir -Filter 'bts_detalii_facturi_rep_*.xml' | ForEach-Object {
$t = Get-Content $_.FullName -Raw
foreach ($m in [regex]::Matches($t, '(?i)<CODFISCAL_CNP>([^<]*)</CODFISCAL_CNP>')) {
$v = $m.Groups[1].Value.Trim()
if ($v -ne '' -and $v -match '[A-Za-z]') { $map[$v] = 1 }
}
}
"coduri cu litere = $($map.Count)"
$map.Keys | Sort-Object