Repository: FatturaElettronica/FatturaElettronica.NET Branch: master Commit: 1b3da0aca667 Files: 387 Total size: 1.2 MB Directory structure: gitextract_e56b_87i/ ├── .editorconfig ├── .github/ │ └── workflows/ │ ├── publish.yml │ └── test.yml ├── .gitignore ├── AUTHORS.md ├── CHANGES.md ├── CNAME ├── Common/ │ ├── Allegati.cs │ ├── Anagrafica.cs │ ├── DatiAnagrafici.cs │ ├── DatiDocumento.cs │ ├── DenominazioneNomeCognome.cs │ ├── IdFiscaleIva.cs │ ├── Località.cs │ ├── RappresentanteFiscale.cs │ ├── ScontoMaggiorazione.cs │ └── StabileOrganizzazione.cs ├── Core/ │ ├── BaseClass.cs │ ├── BaseClassSerializable.cs │ ├── DataPropertyAttribute.cs │ ├── IgnoreXmlDateFormat.cs │ ├── JsonOptions.cs │ ├── JsonParseException.cs │ ├── TypeExtensions.cs │ └── XmlOptions.cs ├── Defaults.cs ├── Extensions/ │ ├── DecimalRuleExtensions.cs │ ├── FatturaElettronicaExtensions.cs │ ├── FatturaElettronicaFileNameGenerator/ │ │ ├── FatturaElettronicaFileNameExtensionType.cs │ │ └── FatturaElettronicaFileNameGenerator.cs │ ├── HtmlExtensions.cs │ ├── JsonExtensions.cs │ ├── Resources/ │ │ ├── ErrorMessages.Designer.cs │ │ ├── ErrorMessages.en.resx │ │ └── ErrorMessages.resx │ ├── SignatureException.cs │ ├── SignedFileExtensions.cs │ ├── StreamExtensions.cs │ └── XmlExtensions.cs ├── FUNDING.yml ├── FatturaBase.cs ├── FatturaElettronica.csproj ├── FatturaElettronica.csproj.DotSettings ├── FatturaElettronica.sln ├── FatturaElettronica.sln.DotSettings ├── LICENSE.txt ├── Ordinaria/ │ ├── FatturaElettronicaBody/ │ │ ├── DatiBeniServizi/ │ │ │ ├── AltriDatiGestionali.cs │ │ │ ├── CodiceArticolo.cs │ │ │ ├── DatiBeniServizi.cs │ │ │ ├── DatiRiepilogo.cs │ │ │ └── DettaglioLinee.cs │ │ ├── DatiGenerali/ │ │ │ ├── DatiAnagraficiVettore.cs │ │ │ ├── DatiBollo.cs │ │ │ ├── DatiCassaPrevidenziale.cs │ │ │ ├── DatiContratto.cs │ │ │ ├── DatiConvenzione.cs │ │ │ ├── DatiDDT.cs │ │ │ ├── DatiFattureCollegate.cs │ │ │ ├── DatiGenerali.cs │ │ │ ├── DatiGeneraliDocumento.cs │ │ │ ├── DatiOrdineAcquisto.cs │ │ │ ├── DatiRicezione.cs │ │ │ ├── DatiRitenuta.cs │ │ │ ├── DatiSAL.cs │ │ │ ├── DatiTrasporto.cs │ │ │ ├── FatturaPrincipale.cs │ │ │ └── IndirizzoResa.cs │ │ ├── DatiPagamento/ │ │ │ ├── DatiPagamento.cs │ │ │ └── DettaglioPagamento.cs │ │ ├── DatiVeicoli/ │ │ │ └── DatiVeicoli.cs │ │ └── FatturaElettronicaBody.cs │ ├── FatturaElettronicaHeader/ │ │ ├── CedentePrestatore/ │ │ │ ├── CedentePrestatore.cs │ │ │ ├── Contatti.cs │ │ │ ├── DatiAnagraficiCedentePrestatore.cs │ │ │ ├── IscrizioneRea.cs │ │ │ └── SedeCedentePrestatore.cs │ │ ├── CessionarioCommittente/ │ │ │ ├── CessionarioCommittente.cs │ │ │ ├── DatiAnagraficiCessionarioCommittente.cs │ │ │ ├── RappresentanteFiscaleCessionarioCommittente.cs │ │ │ └── SedeCessionarioCommittente.cs │ │ ├── DatiTrasmissione/ │ │ │ ├── ContattiTrasmittente.cs │ │ │ ├── DatiTrasmissione.cs │ │ │ └── IdTrasmittente.cs │ │ ├── FatturaElettronicaHeader.cs │ │ ├── RappresentanteFiscale/ │ │ │ └── RappresentanteFiscale.cs │ │ └── TerzoIntermediarioOSoggettoEmittente/ │ │ └── TerzoIntermediarioOSoggettoEmittente.cs │ └── FatturaOrdinaria.cs ├── README.md ├── Resources/ │ ├── CausalePagamento.Designer.cs │ ├── CausalePagamento.de.resx │ ├── CausalePagamento.en.resx │ ├── CausalePagamento.resx │ ├── CondizioniPagamento.Designer.cs │ ├── CondizioniPagamento.de.resx │ ├── CondizioniPagamento.en.resx │ ├── CondizioniPagamento.resx │ ├── Divisa.Designer.cs │ ├── Divisa.resx │ ├── EsigibilitaIVA.Designer.cs │ ├── EsigibilitaIVA.de.resx │ ├── EsigibilitaIVA.en.resx │ ├── EsigibilitaIVA.resx │ ├── FormatoTrasmissione.Designer.cs │ ├── FormatoTrasmissione.de.resx │ ├── FormatoTrasmissione.en.resx │ ├── FormatoTrasmissione.resx │ ├── IdPaese.Designer.cs │ ├── IdPaese.de.resx │ ├── IdPaese.en.resx │ ├── IdPaese.resx │ ├── ModalitaPagamento.Designer.cs │ ├── ModalitaPagamento.de.resx │ ├── ModalitaPagamento.en.resx │ ├── ModalitaPagamento.resx │ ├── Natura.Designer.cs │ ├── Natura.de.resx │ ├── Natura.en.resx │ ├── Natura.resx │ ├── NaturaSemplificata.Designer.cs │ ├── NaturaSemplificata.de.resx │ ├── NaturaSemplificata.en.resx │ ├── NaturaSemplificata.resx │ ├── Provincia.Designer.cs │ ├── Provincia.de.resx │ ├── Provincia.en.resx │ ├── Provincia.resx │ ├── RegimeFiscale.Designer.cs │ ├── RegimeFiscale.de.resx │ ├── RegimeFiscale.en.resx │ ├── RegimeFiscale.resx │ ├── ScontoMaggiorazione.Designer.cs │ ├── ScontoMaggiorazione.de.resx │ ├── ScontoMaggiorazione.en.resx │ ├── ScontoMaggiorazione.resx │ ├── SocioUnico.Designer.cs │ ├── SocioUnico.de.resx │ ├── SocioUnico.en.resx │ ├── SocioUnico.resx │ ├── SoggettoEmittente.Designer.cs │ ├── SoggettoEmittente.de.resx │ ├── SoggettoEmittente.en.resx │ ├── SoggettoEmittente.resx │ ├── StatoLiquidazione.Designer.cs │ ├── StatoLiquidazione.de.resx │ ├── StatoLiquidazione.en.resx │ ├── StatoLiquidazione.resx │ ├── TipoCassa.Designer.cs │ ├── TipoCassa.de.resx │ ├── TipoCassa.en.resx │ ├── TipoCassa.resx │ ├── TipoCessionePrestazione.Designer.cs │ ├── TipoCessionePrestazione.de.resx │ ├── TipoCessionePrestazione.en.resx │ ├── TipoCessionePrestazione.resx │ ├── TipoDocumento.Designer.cs │ ├── TipoDocumento.de.resx │ ├── TipoDocumento.en.resx │ ├── TipoDocumento.resx │ ├── TipoDocumentoSemplificata.Designer.cs │ ├── TipoDocumentoSemplificata.de.resx │ ├── TipoDocumentoSemplificata.en.resx │ ├── TipoDocumentoSemplificata.resx │ ├── TipoResa.Designer.cs │ ├── TipoResa.de.resx │ ├── TipoResa.en.resx │ ├── TipoResa.resx │ ├── TipoRitenuta.Designer.cs │ ├── TipoRitenuta.de.resx │ ├── TipoRitenuta.en.resx │ ├── TipoRitenuta.resx │ ├── ValidatorMessages.Designer.cs │ ├── ValidatorMessages.de.resx │ ├── ValidatorMessages.en.resx │ └── ValidatorMessages.resx ├── Semplificata/ │ ├── FatturaElettronicaBody/ │ │ ├── DatiBeniServizi/ │ │ │ ├── DatiBeniServizi.cs │ │ │ └── DatiIVA.cs │ │ ├── DatiGenerali/ │ │ │ ├── DatiFatturaRettificata.cs │ │ │ ├── DatiGenerali.cs │ │ │ └── DatiGeneraliDocumento.cs │ │ └── FatturaElettronicaBody.cs │ ├── FatturaElettronicaHeader/ │ │ ├── CedentePrestatore/ │ │ │ ├── CedentePrestatore.cs │ │ │ ├── IscrizioneRea.cs │ │ │ ├── RappresentanteFiscale.cs │ │ │ └── SedeCedentePrestatore.cs │ │ ├── CessionarioCommittente/ │ │ │ ├── AltriDatiIdentificativi.cs │ │ │ ├── CessionarioCommittente.cs │ │ │ ├── IdentificativiFiscali.cs │ │ │ ├── RappresentanteFiscaleCessionarioCommittente.cs │ │ │ └── SedeCessionarioCommittente.cs │ │ ├── DatiTrasmissione/ │ │ │ ├── DatiTrasmissione.cs │ │ │ └── IdTrasmittente.cs │ │ └── FatturaElettronicaHeader.cs │ └── FatturaSemplificata.cs ├── Tabelle/ │ ├── CausalePagamento.cs │ ├── CondizioniPagamento.cs │ ├── Divisa.cs │ ├── EsigibilitaIVA.cs │ ├── FormatoTrasmissione.cs │ ├── IdPaese.cs │ ├── ModalitaPagamento.cs │ ├── Natura.cs │ ├── NaturaSemplificata.cs │ ├── Provincia.cs │ ├── RegimeFiscale.cs │ ├── ScontoMaggiorazione.cs │ ├── SocioUnico.cs │ ├── SoggettoEmittente.cs │ ├── StatoLiquidazione.cs │ ├── Tabella.cs │ ├── TipoCassa.cs │ ├── TipoCessionePrestazione.cs │ ├── TipoDocumento.cs │ ├── TipoDocumentoSemplificata.cs │ ├── TipoResa.cs │ └── TipoRitenuta.cs ├── Test/ │ ├── BaseClass.cs │ ├── Common/ │ │ ├── AnagraficaValidator.cs │ │ ├── IdFiscaleIva.cs │ │ ├── IdFiscaleValidator.cs │ │ ├── IdTrasmittenteValidator.cs │ │ ├── ScontoMaggiorazioneValidator.cs │ │ └── StabileOrganizzazioneValidator.cs │ ├── Core/ │ │ ├── JsonTest.cs │ │ ├── TestMe.cs │ │ └── XmlTest.cs │ ├── Extensions/ │ │ ├── FilenameGeneratorTest.cs │ │ ├── HtmlExtensionsTest.cs │ │ ├── JsonExtensionsTest.cs │ │ ├── SignedFileExtensionsTest.cs │ │ ├── StreamExtensionsTest.cs │ │ └── XmlExtensionsTest.cs │ ├── FatturaElettronica.Test.csproj │ ├── JSONDeSerialize.cs │ ├── Ordinaria/ │ │ ├── AllegatiValidator.cs │ │ ├── AltriDatiGestionaliValidator.cs │ │ ├── BaseDatiDocumentoValidator.cs │ │ ├── BaseLocalitàValidator.cs │ │ ├── CedentePrestatoreValidator.cs │ │ ├── CessionarioCommittenteValidator.cs │ │ ├── CodiceArticoloValidator.cs │ │ ├── ContattiTrasmittenteValidator.cs │ │ ├── ContattiValidator.cs │ │ ├── DatiAnagraficiCedentePrestatoreValidator.cs │ │ ├── DatiAnagraficiCessionarioCommittenteValidator.cs │ │ ├── DatiAnagraficiVettoreValidator.cs │ │ ├── DatiBeniServiziValidator.cs │ │ ├── DatiBolloValidator.cs │ │ ├── DatiCassaPrevidenzialeValidator.cs │ │ ├── DatiContrattoValidator.cs │ │ ├── DatiConvenzioneValidator.cs │ │ ├── DatiDDTValidator.cs │ │ ├── DatiFattureCollegateValidator.cs │ │ ├── DatiGeneraliDocumentoValidator.cs │ │ ├── DatiGeneraliValidator.cs │ │ ├── DatiOrdineAcquistoValidator.cs │ │ ├── DatiPagamentoValidator.cs │ │ ├── DatiRicezioneValidator.cs │ │ ├── DatiRiepilogoValidator.cs │ │ ├── DatiRitenutaValidator.cs │ │ ├── DatiSALValidator.cs │ │ ├── DatiTrasmissioneValidator.cs │ │ ├── DatiTrasportoValidator.cs │ │ ├── DatiVeicoliValidator.cs │ │ ├── DenominazioneNomeCognomeValidator.cs │ │ ├── DettaglioLineeValidator.cs │ │ ├── DettaglioPagamentoValidator.cs │ │ ├── FatturaCreateInstance.cs │ │ ├── FatturaElettronicaBodyValidator.cs │ │ ├── FatturaElettronicaHeaderValidator.cs │ │ ├── FatturaPrincipaleValidator.cs │ │ ├── FatturaValidator.cs │ │ ├── IscrizioneREAValidator.cs │ │ ├── RappresentanteFiscaleCessionarioCommittenteValidator.cs │ │ ├── RappresentanteFiscaleValidator.cs │ │ ├── SedeCedentePrestatoreValidator.cs │ │ ├── SedeCessionarioCommittenteValidator.cs │ │ └── TerzoIntermediarioOSoggettoEmittenteValidator.cs │ ├── Samples/ │ │ ├── IT01234567890_FPA02.xml │ │ ├── IT01234567890_FPR02.xml │ │ ├── IT01234567890_FSM10.xml │ │ ├── IT02182030391_31.Base64.CRLF.xml.p7m │ │ ├── IT02182030391_31.Base64.xml.p7m │ │ ├── IT02182030391_31.xml.p7m │ │ ├── IT02182030391_31_tampered.Base64.xml.p7m │ │ ├── IT02182030391_31_tampered.xml.p7m │ │ ├── IT02182030391_32.windows-1252.xml │ │ ├── IT02182030391_32.xml │ │ └── fatturaPA_v1.2.1.xsl │ ├── Semplificata/ │ │ ├── AllegatiValidator.cs │ │ ├── AltriDatiIdentificativiValidator.cs │ │ ├── CedentePrestatoreValidator.cs │ │ ├── CessionarioCommittenteValidator.cs │ │ ├── DatiBeniServiziValidator.cs │ │ ├── DatiGeneraliDocumentoValidator.cs │ │ ├── DatiIVAValidator.cs │ │ ├── DatiTrasmissioneValidator.cs │ │ ├── FatturaCreateInstance.cs │ │ ├── FatturaElettronicaBodyValidator.cs │ │ ├── FatturaElettronicaHeaderValidator.cs │ │ ├── FatturaSemplificataValidator.cs │ │ ├── IdentificativiFiscaliValidator.cs │ │ └── XMLDeSerialize.cs │ ├── TestHelpers.cs │ └── XMLDeSerialize.cs ├── Validators/ │ ├── AllegatiValidator.cs │ ├── AltriDatiGestionaliValidator.cs │ ├── AnagraficaValidator.cs │ ├── CausaleValidator.cs │ ├── CedentePrestatoreValidator.cs │ ├── CessionarioCommittenteValidator.cs │ ├── CodiceArticoloValidator.cs │ ├── Constants.cs │ ├── ContattiTrasmittenteValidator.cs │ ├── ContattiValidator.cs │ ├── DatiAnagraficiCedentePrestatoreValidator.cs │ ├── DatiAnagraficiCessionarioCommittenteValidator.cs │ ├── DatiAnagraficiRappresentanteFiscaleValidator.cs │ ├── DatiAnagraficiTerzoIntermediarioValidator.cs │ ├── DatiAnagraficiVettoreValidator.cs │ ├── DatiBeniServiziValidator.cs │ ├── DatiBolloValidator.cs │ ├── DatiCassaPrevidenzialeValidator.cs │ ├── DatiContrattoValidator.cs │ ├── DatiConvenzioneValidator.cs │ ├── DatiDDTValidator.cs │ ├── DatiDocumentoValidator.cs │ ├── DatiFattureCollegateValidator.cs │ ├── DatiGeneraliDocumentoValidator.cs │ ├── DatiGeneraliValidator.cs │ ├── DatiOrdineAcquistoValidator.cs │ ├── DatiPagamentoValidator.cs │ ├── DatiRicezioneValidator.cs │ ├── DatiRiepilogoValidator.cs │ ├── DatiRitenutaValidator.cs │ ├── DatiSALValidator.cs │ ├── DatiTrasmissioneValidator.cs │ ├── DatiTrasportoValidator.cs │ ├── DatiVeicoliValidator.cs │ ├── DenominazioneNomeCognomeValidator.cs │ ├── DettaglioLineeValidator.cs │ ├── DettaglioPagamentoValidator.cs │ ├── FatturaElettronicaBodyValidator.cs │ ├── FatturaElettronicaHeaderValidator.cs │ ├── FatturaOrdinariaValidator.cs │ ├── FatturaPrincipaleValidator.cs │ ├── IdFiscaleIVAValidator.cs │ ├── IdTrasmittenteValidator.cs │ ├── IndirizzoResaValidator.cs │ ├── IsValidValidator.cs │ ├── IscrizioneREAValidator.cs │ ├── LatinValidators.cs │ ├── LocalitàBaseValidator.cs │ ├── RappresentanteFiscaleCessionarioCommittenteValidator.cs │ ├── RappresentanteFiscaleValidator.cs │ ├── RegimeFiscaleValidator.cs │ ├── ScontoMaggiorazioneValidator.cs │ ├── SedeCedentePrestatoreValidator.cs │ ├── SedeCessionarioCommittenteValidator.cs │ ├── Semplificata/ │ │ ├── AllegatiValidator.cs │ │ ├── AltriDatiIdentificativiValidator.cs │ │ ├── CedentePrestatoreValidator.cs │ │ ├── CessionarioCommittenteValidator.cs │ │ ├── DatiBeniServiziValidator.cs │ │ ├── DatiFatturaRettificataValidator.cs │ │ ├── DatiGeneraliDocumentoValidator.cs │ │ ├── DatiGeneraliValidator.cs │ │ ├── DatiIVAValidator.cs │ │ ├── DatiTrasmissioneValidator.cs │ │ ├── DenominazioneNomeCognomeValidator.cs │ │ ├── FatturaElettronicaBodyValidator.cs │ │ ├── FatturaElettronicaHeaderValidator.cs │ │ ├── FatturaSemplificataValidator.cs │ │ ├── IdentificativiFiscaliValidator.cs │ │ ├── IscrizioneREAValidator.cs │ │ ├── RappresentanteFiscaleCessionarioCommittenteValidator.cs │ │ ├── SedeCedentePrestatoreValidator.cs │ │ ├── SedeCessionarioCommittenteValidator.cs │ │ └── StabileOrganizzazioneValidator.cs │ ├── StabileOrganizzazioneValidator.cs │ └── TerzoIntermediarioOSoggettoEmittenteValidator.cs └── docs/ ├── authors.md ├── changelog.md ├── extensions.md ├── faq.md ├── index.md ├── toc.md └── tutorial.md ================================================ FILE CONTENTS ================================================ ================================================ FILE: .editorconfig ================================================ # Suppress: EC103 # EditorConfig is awesome:http://EditorConfig.org # top-most EditorConfig file root = true # Don't use tabs for indentation. [*] indent_style = space # (Please don't specify an indent_size here; that has too many unintended consequences.) # Code files [*.{cs,csx,vb,vbx}] indent_size = 4 # Xml project files [*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj}] indent_size = 2 # Xml config files [*.{props,targets,ruleset,config,nuspec,resx,vsixmanifest,vsct}] indent_size = 2 # JSON files [*.json] indent_size = 2 # Dotnet code style settings: [*.{cs,vb}] # Sort using and Import directives with System.* appearing first dotnet_sort_system_directives_first = true # Avoid "this." and "Me." if not necessary dotnet_style_qualification_for_field = false:suggestion dotnet_style_qualification_for_property = false:suggestion dotnet_style_qualification_for_method = false:suggestion dotnet_style_qualification_for_event = false:suggestion # Use language keywords instead of framework type names for type references dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion dotnet_style_predefined_type_for_member_access = true:suggestion # Suggest more modern language features when available dotnet_style_object_initializer = true:suggestion dotnet_style_collection_initializer = true:suggestion dotnet_style_coalesce_expression = true:suggestion dotnet_style_null_propagation = true:suggestion dotnet_style_explicit_tuple_names = true:suggestion # CSharp code style settings: [*.cs] # Prefer "var" everywhere csharp_style_var_for_built_in_types = true:suggestion csharp_style_var_when_type_is_apparent = true:suggestion csharp_style_var_elsewhere = true:suggestion # Prefer method-like constructs to have a block body csharp_style_expression_bodied_methods = false:none csharp_style_expression_bodied_constructors = false:none csharp_style_expression_bodied_operators = false:none # Prefer property-like constructs to have an expression-body csharp_style_expression_bodied_properties = true:none csharp_style_expression_bodied_indexers = true:none csharp_style_expression_bodied_accessors = true:none # Suggest more modern language features when available csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion csharp_style_pattern_matching_over_as_with_null_check = true:suggestion csharp_style_inlined_variable_declaration = true:suggestion csharp_style_throw_expression = true:suggestion csharp_style_conditional_delegate_call = true:suggestion # Newline settings csharp_new_line_before_open_brace = all csharp_new_line_before_else = true csharp_new_line_before_catch = true csharp_new_line_before_finally = true csharp_new_line_before_members_in_object_initializers = true csharp_new_line_before_members_in_anonymous_types = true ================================================ FILE: .github/workflows/publish.yml ================================================ name: Build and Publish NuGet Package on: push: tags: - 'v*' env: DOTNET_VERSION: '10.0.x' jobs: build-and-publish: runs-on: ubuntu-latest steps: - uses: actions/checkout@v5 - name: Setup .NET uses: actions/setup-dotnet@v5 with: dotnet-version: ${{ env.DOTNET_VERSION }} - name: Build run: dotnet build --configuration Release - name: Run tests run: dotnet test --no-restore --verbosity normal - name: Pack run: dotnet pack --configuration Release --no-build --output nupkgs - name: Push to NuGet run: dotnet nuget push ./nupkgs/*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }} --skip-duplicate ================================================ FILE: .github/workflows/test.yml ================================================ name: Test on: push: branches: - '**' tags-ignore: - '**' pull_request: jobs: build: runs-on: ${{ matrix.os }} strategy: matrix: os: [ubuntu-latest, macOS-latest, windows-latest] steps: - uses: actions/checkout@v5 - name: Setup .NET Core uses: actions/setup-dotnet@v5 with: dotnet-version: 10.0.x - name: Install dependencies run: dotnet restore - name: Build run: dotnet build --configuration Release --no-restore - name: Test run: dotnet test --no-restore --verbosity normal ================================================ FILE: .gitignore ================================================ ## Ignore Visual Studio temporary files, build results, and ## files generated by popular Visual Studio add-ons. # User-specific files *.suo *.user *.sln.docstates # Build results [Dd]ebug/ [Rr]elease/ x64/ build/ [Bb]in/ [Oo]bj/ # Enable "build/" folder in the NuGet Packages folder since NuGet packages use it for MSBuild targets !packages/*/build/ # MSTest test Results [Tt]est[Rr]esult*/ [Bb]uild[Ll]og.* *_i.c *_p.c *.ilk *.meta *.obj *.pch *.pdb *.pgc *.pgd *.rsp *.sbr *.tlb *.tli *.tlh *.tmp *.tmp_proj *.log *.vspscc *.vssscc .builds *.pidb *.log *.scc # Visual C++ cache files ipch/ *.aps *.ncb *.opensdf *.sdf *.cachefile # Visual Studio profiler *.psess *.vsp *.vspx # Guidance Automation Toolkit *.gpState # ReSharper is a .NET coding add-in _ReSharper*/ *.[Rr]e[Ss]harper # TeamCity is a build add-in _TeamCity* # DotCover is a Code Coverage Tool *.dotCover # NCrunch *.ncrunch* .*crunch*.local.xml # Installshield output folder [Ee]xpress/ # DocProject is a documentation generator add-in DocProject/buildhelp/ DocProject/Help/*.HxT DocProject/Help/*.HxC DocProject/Help/*.hhc DocProject/Help/*.hhk DocProject/Help/*.hhp DocProject/Help/Html2 DocProject/Help/html # Click-Once directory publish/ # Publish Web Output *.Publish.xml # NuGet Packages Directory ## TODO: If you have NuGet Package Restore enabled, uncomment the next line #packages/ # Windows Azure Build Output csx *.build.csdef # Windows Store app package directory AppPackages/ # Others sql/ *.Cache ClientBin/ [Ss]tyle[Cc]op.* ~$* *~ *.dbmdl *.[Pp]ublish.xml *.pfx *.publishsettings # RIA/Silverlight projects Generated_Code/ # Backup & report files from converting an old project file to a newer # Visual Studio version. Backup files are not needed, because we have git ;-) _UpgradeReport_Files/ Backup*/ UpgradeLog*.XML UpgradeLog*.htm # SQL Server files App_Data/*.mdf App_Data/*.ldf #LightSwitch generated files GeneratedArtifacts/ _Pvt_Extensions/ ModelManifest.xml # ========================= # Windows detritus # ========================= # Windows image file caches Thumbs.db ehthumbs.db # Folder config file Desktop.ini # Recycle Bin used on file shares $RECYCLE.BIN/ # Mac desktop service store files .DS_Store # packages folder packages !packages/respositories.config # ConsoleApp, used for verifying README code ConsoleApp/ # Visual Studio per-machine and per-user settings .vs/ .vscode/ .idea .ionide/ ================================================ FILE: AUTHORS.md ================================================ Autori ====== FatturaElettronica.NET è un progetto [open source][li] aperto alla collaborazione di tutti. Lo sviluppo avviene su [GitHub][gh]. Autore e maintainer ------------------- - [Nicola Iarocci][NI] Collaboratori ------------- - Claudio Lepri - Diego Artusio - Diego Martelli - Emanuele Curati - Emanuele Zavallone - Fabio Calvigioni - Federico Dipuma - Gaetano Pizzol - Luca Borghini - Luca Marcato - Marco Checchin - Marco Saltarelli - Marco Tessitore - Massimo Linossi - Michael Mairegger - Paolo Manili - Paolo Tatoli - Puma - Seba - ZephirPFS47 - gminutillo - ilserd - username77 - [NI]: https://nicolaiarocci.com [gh]: https://github.com/FatturaElettronica/FatturaElettronica.NET [li]: http://github.com/FatturaElettronica/FatturaElettronica.NET/blob/master/LICENSE.txt ================================================ FILE: CHANGES.md ================================================ # Changelog ## In Development ## Stable ### v 4.0.7 Released on April 2, 2026 - fix: gestione file P7M in formato Base64 con line breaks CRLF tramite `CreateInstanceFromXml`. ### v 4.0.6 Released on March 20, 2026 - fix: supporto encoding `windows-1252` nelle fatture XML e P7M ([#442][442]). [442]: https://github.com/FatturaElettronica/FatturaElettronica.NET/issues/442 ### v 4.0.5 Released on March 19, 2026 - fix: supporto P7M con ASN.1 UniversalString nei certificati ([#442][442]). - new: test suite migrata a .NET 10. ### v 4.0.4 Released on September 17, 2025 - fix: la fix introdotta con v4.0.3 per la validazione di PECDestinatario non copriva tutti i casi ([#440][440]) [440]: https://github.com/FatturaElettronica/FatturaElettronica.NET/issues/440 ### v 4.0.3 Released on September 2, 2025 - fix: migliorata validazione PECDestinatario ([#439][439]) [439]: https://github.com/FatturaElettronica/FatturaElettronica.NET/issues/439 ### v 4.0.2 Released on September 1, 2025 - fix: verifica codice IBAN imprecisa ([#438][438]) - Aggiunto riferimento a [Invoicetronic](http://invoicetronic.com) come progetto "gemello" di FatturaElettronica.NET per la gestione completa della fatturazione elettronica in Italia. [438]: https://github.com/FatturaElettronica/FatturaElettronica.NET/issues/438 ### v 4.0.1 Released on June 18, 2025 - fix: if the input stream Position is not 0, and it is seekable, it will be rewound to Position 0 [#436][436] [436]: https://github.com/FatturaElettronica/FatturaElettronica.NET/pull/436 ### v 4.0.0 Released on June 16, 2025 - BREAKING: attempting to read Tampered documents will now invariably throw `SignatureException` [#434][434] - CI: do not execute the 'test' action on tag pushes (the 'publish' action includes tests) - chore: we're switching to the English language for CHANGELOG updates. [434]: https://github.com/FatturaElettronica/FatturaElettronica.NET/pull/434 ### v 3.6.3 Released on May 6, 2025 - fix: traduzione Inglese allineata a quella ufficiale ([#432][432]) - fix: README typos. [432]: https://github.com/FatturaElettronica/FatturaElettronica.NET/pull/432 ### v 3.6.2 Released on April 2, 2025 -fix: non includere GitHub workflows nel package, per davvero. ### v 3.6.1 Released on March 17, 2025 - fix: non includere GitHub workflows nel package. - new: supporto per lingua Inglese ([#430][430]). [430]: https://github.com/FatturaElettronica/FatturaElettronica.NET/pull/430 ### v 3.6.0 Released on February 24, 2025 - new: supporto per le specifiche tecniche v1.9, in vigore dal 1 Aprile 2025 ([#426][426]) - new: icona per il nuget package, finalmente. - new: package creato e pubblicato via CI. - fix: UnitaMisura è opzionale ([#427][427]) - fix: CI test workflow deve girare su .NET 8 [427]: https://github.com/FatturaElettronica/FatturaElettronica.NET/issues/427 [426]: https://github.com/FatturaElettronica/FatturaElettronica.NET/issues/426 ### v 3.5.2 Released on January 7, 2025 - fix: IVA oltre 100% non deve passare la convalida ([#424][424]) - fix: CVE 2024 30105 ([#423][423]) - fix: rimuovere reference a BouncyCastle nella documentazione ([#422][422]) [424]: https://github.com/FatturaElettronica/FatturaElettronica.NET/pull/424 [423]: https://github.com/FatturaElettronica/FatturaElettronica.NET/pull/423 [422]: https://github.com/FatturaElettronica/FatturaElettronica.NET/pull/422 ### v 3.5.1 Released on September 30, 2024 - fix: multi-lingua, migliorata accessibilità dei Resource file generati ([#420][420]) [420]: https://github.com/FatturaElettronica/FatturaElettronica.NET/pull/420 ### v 3.5.0 Released on September 30, 2024 - new: supporto multi-lingua ([#417][417]). [417]: https://github.com/FatturaElettronica/FatturaElettronica.NET/pull/417 ### v 3.4.16 Released on July 25, 2024 - Abbandonata dipendenza da Portable.BouncyCastle ([#414][414]) - Bump Microsoft.NET.Test.Sdk a v17.6.2 - Bump MSTest.TestAdapter a v3.4.3 - Bump MSTest.TestFramework a v3.4.3 [414]: https://github.com/FatturaElettronica/FatturaElettronica.NET/issues/414 ### v 3.4.15 Released on May 24, 2024 - Fix: Nazione, valore di default non viene de-serializzato da XML ([#413][413]) [413]: https://github.com/FatturaElettronica/FatturaElettronica.NET/issues/413 ### v 3.4.14 Released on March 14, 2024 - Fix: CVE-2023-29331. ([#411][411]) - Fix: `GiorniTerminiPagamento`, `NumeroColli`, `RiferimentoNumeroLinea`, `RiferimentoFase` devono accettare solo valori inclusi nei rispettivi range numerici. ([#410][410]) [411]: https://github.com/FatturaElettronica/FatturaElettronica.NET/issues/411 [410]: https://github.com/FatturaElettronica/FatturaElettronica.NET/issues/410 ### v 3.4.13 Released on January 8, 2024 - Fix: Controllo 00473: recepite novità introdotte dalle [specifiche v1.8](https://www.agenziaentrate.gov.it/portale/web/guest/specifiche-tecniche-versione-1.8) ([#407][407]) [407]: https://github.com/FatturaElettronica/FatturaElettronica.NET/issues/407 ### v 3.4.12 Released on December 5, 2023 - Fix: Controllo validità campi Email e PEC ([#405][405]) - Fix: CI workflow file rilasciato col package nuget ([#404][404]) [405]: https://github.com/FatturaElettronica/FatturaElettronica.NET/issues/405 [404]: https://github.com/FatturaElettronica/FatturaElettronica.NET/issues/404 ### v 3.4.11 Released on October 27, 2023 - Fix: DettaglioLinee.NumeroLinea deve consentire solo valori da 1 a 9999 ([#403][403]) [403]: https://github.com/FatturaElettronica/FatturaElettronica.NET/issues/403 ### v 3.4.10 Released on August 3, 2023 - Fix: Scarto Fattura se presenta uno sconto a 3+ cifre decimali ([#401][401]) - Fix: typos nella documentazione ([#399][399]) [401]: https://github.com/FatturaElettronica/FatturaElettronica.NET/issues/401 [399]: https://github.com/FatturaElettronica/FatturaElettronica.NET/pull/399 ### v 3.4.9 Released on June 19, 2023 - Fix: [Microsoft Security Advisory CVE-2023-29331: .NET Denial of Service vulnerability](https://github.com/advisories/GHSA-555c-2p6r-68mm) - Fix: [Improper Handling of Exceptional Conditions in Newtonsoft.Json](https://github.com/advisories/GHSA-5crp-9r3c-p9vr) - Fix: [.NET Core Information Disclosure](https://github.com/advisories/GHSA-7jgj-8wvc-jh57) - Fix: [Regular Expression Denial of Service in System.Text.RegularExpressions](https://github.com/advisories/GHSA-cmhx-cq75-c4mj) ### v 3.4.8 Released on May 2, 2023 - Fix: Se IdFiscaleIva di Cessionario e Cedente corrispondono, la fattura deve convalidare anche se in Cessionario è assente il codice fiscale. ([#396][396]) [396]: https://github.com/FatturaElettronica/FatturaElettronica.NET/issues/396 ### v 3.4.7 Released on April 5, 2023 - Fix: controlli 00423 e 00421: tolleranza di 1 centesimo deve essere 'larga' ([#394][394]) - Test suite ora gira su .NET 7 - CI: aggiornate GitHub actions per non usare più Node 12, ora obsoleto [394]: https://github.com/FatturaElettronica/FatturaElettronica.NET/issues/394 ### v 3.4.6 Released on October 28, 2022 - Fix: controllo 00472; supporto per ditta individuale che si fattura un prodotto ([#388][388]) [388]: https://github.com/FatturaElettronica/FatturaElettronica.NET/issues/388 ### v 3.4.5 Released on October 14, 2022 - Fix: controllo 00471; recepite novità introdotte dalle [specifiche v1.8](https://www.fatturapa.gov.it/export/documenti/Elenco-Controlli-versione-1.8.pdf) ([#387][387]) - Fix: controllo 00476; supporto per Cessionario.IdFiscaleIva non indicato ([#386][386]) - Fix: controllo 00473; TD28 può essere usato solo se IdPaese del cedente è uguale a "SM" ([#385][385]) [387]: https://github.com/FatturaElettronica/FatturaElettronica.NET/issues/387 [386]: https://github.com/FatturaElettronica/FatturaElettronica.NET/issues/386 [385]: https://github.com/FatturaElettronica/FatturaElettronica.NET/issues/385 ### v3.4.4 Released on October 1, 2022 - Fix: errore nella validazione dei controlli 00401 e 00430 introdotto in v3.4.3 ([#384][384]) [384]: https://github.com/FatturaElettronica/FatturaElettronica.NET/issues/384 ### v3.4.3 Released on October 1, 2022 - Fix: aggiornati i controlli 00401 e 00430 affinché escludano i documenti TD16 ([#382][382]) [382]: https://github.com/FatturaElettronica/FatturaElettronica.NET/issues/382 ### v3.4.2 Released on September 27, 2022 - Fix: Aggiornato messaggio di errore per il controllo 00472 ([#381][381]) [381]: https://github.com/FatturaElettronica/FatturaElettronica.NET/issues/381 ### v 3.4.1 Released on September 26, 2022 - Fix: correzione segnalazioni Controlli 00471 e 00473 ([#378][378] e [#379][379]) [378]: https://github.com/FatturaElettronica/FatturaElettronica.NET/issues/378 [379]: https://github.com/FatturaElettronica/FatturaElettronica.NET/issues/379 ### v 3.4 Released on September 9, 2022 Questa beta release recepisce le specifiche tecniche v1.7.1 che entreranno in vigore il 1 Ottobre 2022. Per maggiori informazioni vedi il ticket ([#376][376]). - New: introdotto nuovo controllo sulle fatture con codice errore 00476 ([#376][376]). - New: TD28, acquisti da San Marino con IVA (fattura cartacea) ([#376][376]). - Fix: modificato il criterio di controllo per l'errore 00472 ([#376][376]). - Fix: modificato il criterio di controllo per l’errore 00471 per i tipi documento TD01, TD02,TD03,TD06,TD24,TD25 e TD28 (fattura ordinaria) e TD07 (fattura semplificata) ([#376][376]). - Fix: aggiornata descrizione dei codici di errore 00401, 00430, 00473, 00475 ([#376][376]). - Fix: aggiornata descrizione della Natura N7 ([#376][376]). [376]: https://github.com/FatturaElettronica/FatturaElettronica.NET/issues/376 ### v 3.3.4 Released on August 4, 2022 - 'EL' (Grecia) aggiunto ai valori convalidati per IdPaese, in alternativa a 'GR' ([#374][374]). - 'OO' (Campione d'Italia e Livigno) aggiunto ai valori convalidati per IdPaese ([#370][370]). [370]: https://github.com/FatturaElettronica/FatturaElettronica.NET/issues/370 [374]: https://github.com/FatturaElettronica/FatturaElettronica.NET/issues/374 ### v 3.3.3 Released on July 11, 2022 - Fix: CodiceFiscale con caratteri minuscoli non deve passare la convalida ([#373][373]) - CI ora gira su dotnet 6. - Bump FluentValidation a v11.1.0 - Bump System.Security.Cryptography.Pkcs a v6.0.1 - Bump System.Text.Json a v6.0.5 [373]: https://github.com/FatturaElettronica/FatturaElettronica.NET/issues/373 ### v 3.3.2 Released on May 24, 2022 - Fix: `WriteHtml` crea un file temporaneo che non viene eliminato in seguito ([#371][371]) [371]: https://github.com/FatturaElettronica/FatturaElettronica.NET/issues/371 ### v 3.3.1 Released on April 6, 2022 - Fix: CodiceArticolo va convalidato come `LatinExtType` ([#368][368]) [368]: https://github.com/FatturaElettronica/FatturaElettronica.NET/issues/368 ### v 3.3.0 Released on February 25, 2022 - New: supporto per tag 'Processing Instructions' in de-serializzazione XML ([#367][367]) - Fix: link rotto alle specifiche tecniche ([#362][362]) - Migrazione a System.Text.Json ([#360][360]) - Rimosso badge dependabot dal README [367]: https://github.com/FatturaElettronica/FatturaElettronica.NET/pull/367 [360]: https://github.com/FatturaElettronica/FatturaElettronica.NET/issues/360 [362]: https://github.com/FatturaElettronica/FatturaElettronica.NET/issues/362 ### v 3.2.0 Released on November 25, 2021 - Questa versione si allinea alle regole di convalida in vigore dal 1 Gennaio 2022. - Allentata convalida dei campi Email ([#358][358]) - Introdotta convalida per nuovo errore 00475 ([#354][354]) - Aggiornata descrizione per i tipi documento TD25 e TD25 ([#354][354]) - Aggiornata descrizione per il codice natura N6.2 ([#354][354]) - Fix: `ToJson()` usa nome sbagliato per proprietà `RappresentanteFiscale` ([#359][359]) - Fix: ripristinato un setter rimosso nella v3.1.5 ([#346][346]) - Aggiornata dipendenza FluentValidation a 10.3.4 ([#337][337]) - Aggiornata dipendenza Newtonsoft.Json a 13.0.1 - Aggiornata dipendenza System.Security.Cryptography.Pkcs to 6.0.0 - Aggiornata dipendenza Portable.BouncyCastle to 1.9.0 [359]: https://github.com/FatturaElettronica/FatturaElettronica.NET/issues/359 [358]: https://github.com/FatturaElettronica/FatturaElettronica.NET/issues/358 [337]: https://github.com/FatturaElettronica/FatturaElettronica.NET/issues/337 [354]: https://github.com/FatturaElettronica/FatturaElettronica.NET/issues/354 [346]: https://github.com/FatturaElettronica/FatturaElettronica.NET/issues/346 ### v 3.1.5 Released on May 14, 2021 - Risolo problema deserializzazione Json per la classe `Allegati` ([#344][344]) [344]: https://github.com/FatturaElettronica/FatturaElettronica.NET/pull/344 ### v 3.1.4 Released on March 21, 2021—Codename 'Spring' - Fix: il codice per Irlanda del Nord è `XI`, non `IX` ([#314][314]) ### v 3.1.3 Released on March 19, 2021 - Aggiunto supporto per il valore `IX` (Irlanda del Nord) al campo `IdPaese` ([#314][314]) [314]: https://github.com/FatturaElettronica/FatturaElettronica.NET/issues/314 ### v 3.1.2 Released on February 20, 2021 - Rimosso warning di obsolescenza in preparazione per FluentValidation 10 ([#321][321]) - Risolto problema di compatibilità con FluentValidation 9.5.1 ([#320][320]) - Aggiornata dipendenza FluentValidation a 9.5.1 [321]: https://github.com/FatturaElettronica/FatturaElettronica.NET/issues/321 [320]: https://github.com/FatturaElettronica/FatturaElettronica.NET/issues/320 ### v 3.1.1 Released on January 25, 2021 - Convalida `TipoResa` allineata a specifiche Incoterms 2020 ([#313][313]) - Validazione `CAP`: deve contenere solo valori numerici ([#310][310]) [313]: https://github.com/FatturaElettronica/FatturaElettronica.NET/issues/313 [310]: https://github.com/FatturaElettronica/FatturaElettronica.NET/issues/310 ### v 3.1.0 Released on December 30, 2020 - Questa versione si allinea alle regole di convalida in vigore dal 1 Gennaio 2021. - Rimosso supporto per valori N2, N3, N6 per il campo `DatiRiepiloto.Natura` ([#307][307]) - Aggiunta convalida per errore 00313 ([#300][300]) - `Defaults.RootElement.ExtraAttributes` diventa una read-write property ([#303][303]) - `Defaults.RootElement.Prefix` diventa una read-write property ([#303][303]) - Migrazione CI dà Azure Pipelines a GitHub Actions (`ubuntu-latest`, `windows-latest`, `macos-latest`) ([#298][298]) - Impostato target framework della test suite a `net5.0` ([#295][295]) - Aggiornata dipendenza Portable.BouncyCastle a 1.8.9 - Aggiornata dipendenza Microsoft.NET.Test.Sdk a 16.8.3 - Aggiornata dipendenza FluentValidation a 9.3.0 - Aggiornata dipendenza System.Security.Cryptography.Pkcs a 5.0.1 [300]: https://github.com/FatturaElettronica/FatturaElettronica.NET/issues/300 [303]: https://github.com/FatturaElettronica/FatturaElettronica.NET/issues/303 [307]: https://github.com/FatturaElettronica/FatturaElettronica.NET/issues/307 [298]: https://github.com/FatturaElettronica/FatturaElettronica.NET/issues/298 [295]: https://github.com/FatturaElettronica/FatturaElettronica.NET/issues/295 ### v 3.0.5 Released on November 26, 2020 - Fix: `SistemaEmittente` non va serializzato come elemento XML ([#294][294]) - Fix: rimossa convalida `DatiRiepilogo.RiferimentoNormativo` è richiesto quando `Natura` è valorizzato ([#284][284]) [294]: https://github.com/FatturaElettronica/FatturaElettronica.NET/issues/294 ### v 3.0.4 Released on November 3, 2020 - Fix: Migliorata la validazione errore 00444 in `DatiRiepilogo` ([#287][287]) - Fix: Migliorata la validazione errore 00443 in `DatiRiepilogo` ([#281][281]) - Fix: Aggiornato attributo `SchemaLocation` ([#282][282], [#286][286]) - Fix: Supporto per `SistemaEmittente` in deserializzazione ([#278][278]) - Fix: `DatiRiepilogo.RiferimentoNormativo` è richiesto quando `Natura` è valorizzato ([#284][284]) - Aggiornata dipendenza FluentValidation a 9.2.2 - Aggiornata dipendenza Newtonsoft.Json a 12.0.3 - Aggiornata dipendenza BouncyCastle a 1.8.8 - Aggiornata dipendenza MSTest.TestFramework a 2.1.2 - Aggiornata dipendenza MSTest.TestAdapter a 2.1.2 - Aggiornata dipendenza Microsoft.NET.Test.Sdk a 16.7.1 - Abbandonata dipendenza obsoleta da `System.Xml.XmlSerializer` [287]: https://github.com/FatturaElettronica/FatturaElettronica.NET/pull/287 [281]: https://github.com/FatturaElettronica/FatturaElettronica.NET/issues/281 [286]: https://github.com/FatturaElettronica/FatturaElettronica.NET/pull/286 [282]: https://github.com/FatturaElettronica/FatturaElettronica.NET/pull/282 [278]: https://github.com/FatturaElettronica/FatturaElettronica.NET/issues/278 [284]: https://github.com/FatturaElettronica/FatturaElettronica.NET/issues/284 ### v 3.0.3 Released on August 25, 2020 - Fix: I tipi decimali dovrebbero essere convalidati per verificare che abbiano 2 o 11 decimali ([#275][275]) - Fix: `CodiceDestinatario` dovrebbe essere maiuscolo e non contenere altri caratteri al di fuori di A-Z 0-9 ([#272][272]) [275]: https://github.com/FatturaElettronica/FatturaElettronica.NET/pull/275 [272]: https://github.com/FatturaElettronica/FatturaElettronica.NET/issues/272 ### v 3.0.2 Released on July 7, 2020 - Aggiornata dipendenza FluentValidation a 9.0 ([#271][271]) [271]: https://github.com/FatturaElettronica/FatturaElettronica.NET/issues/271 ### v 3.0.1 Released on July 6, 2020 - Fix: Validazione per errore 00444 dovrebbe tenere conto dei valori null ([#269][269]) [269]: https://github.com/FatturaElettronica/FatturaElettronica.NET/issues/269 ### v 3.0 Released on June 5, 2020 - Fix: CessionarioCommittente.IdFiscaleIva va convalidato solo quando valorizzato ([#263][263]) [263]: https://github.com/FatturaElettronica/FatturaElettronica.NET/issues/263 ### v 3.0-beta.6 Released on May 21, 2020 - Passaggio a C# 8.0 e (piccolo) refactoring. ### v 3.0-beta.5 Released on April 20, 2020 - Tabella `CausalePagamento` accetta valori Y, K,V2,Z durante il periodo di transizione ([#259][259]) [259]: https://github.com/FatturaElettronica/FatturaElettronica.NET/issues/259 ### v 3.0-beta.4 Released on April 15, 2020 - `CreateInstanceFromXml` accetta argomento `validateSignature` con default a `false` ([#258][258]) [258]: https://github.com/FatturaElettronica/FatturaElettronica.NET/issues/258 ### v 3.0-beta.3 Released on April 9, 2020 - `CreateInstanceFromXml` ora leggere anche file firmati digitalmente (.p7m) ([#256][256]) - Incorporato FatturaElettronica.Core ([#255][255]) - Incorporato FatturaElettronica.Extensions ([#255][255]) - Persa dipendenza da FatturaElettronica.Core ([#255][255]) - Persa dipendenza da FatturaElettronica.Extensions ([#255][255]) - Ricordarsi di rimuovere le dipendenze da FatturaElettronica.Extensions e FatturaElettronica.Core. - La API di FatturaElettronica.Core, ora incorporata in questo package, è stata spostata dal namespace `FatturaElettronica.Common` a `FatturaElettronica.Core`. [256]: https://github.com/FatturaElettronica/FatturaElettronica.NET/issues/256 ### v 3.0-beta.2 Released on April 6, 2020 - Fix: NullReferenceException nel metodo Equals ([Core#42][Core#42]) - Aggiornata dipendenza FatturaElettronica.Core a 2.0.1. [255]: https://github.com/FatturaElettronica/FatturaElettronica.NET/issues/255 [Core#42]: https://github.com/FatturaElettronica/FatturaElettronica.Core/issues/42 ### v 3.0-beta.1 Released on March 20, 2020 - Supporto per le specifiche tecniche v1.6 aggiornate il 28.2.2020 e utilizzabili a partire dal 4 maggio 2020. Si veda: - [Allegato A - Specifiche tecniche versione 1.6 (pdf)](https://www.agenziaentrate.gov.it/portale/documents/20143/2370834/Allegato+A+-+Specifiche+tecniche+vers+1.6_.pdf/a9917ec2-29a3-4f4a-a7d0-93af96fcaad5) ### v 2.1.1 Released on March 20, 2020 - Fix: Attributo `schemaLocation` causava problemi con alcuni client Java. ([#250][250]) [250]: https://github.com/FatturaElettronica/FatturaElettronica.NET/pull/250 ### v 2.1.0 Released on February 7, 2020 - New: `FatturaBase.CreateInstanceFromXml()` carica stream XML e restituisce una istanza di FatturaOrdinaria o FatturaSemplificata ([#240][240]) - Fix: Semplificata.DatiBeniServizi.DatiIVA: Aliquota o Importo obbligatori ([#238][238]) - Fix: Semplificata.CessionarioCommittente.IdFiscaleIva va convalidato se valorizzato ([#242][242]) [240]: https://github.com/FatturaElettronica/FatturaElettronica.NET/issues/240 [238]: https://github.com/FatturaElettronica/FatturaElettronica.NET/issues/238 [242]: https://github.com/FatturaElettronica/FatturaElettronica.NET/issues/242 ### v2.0.8 Released on December 2, 2019 - Fix: convalida fattura semplificata, importo massimo portato a 400 euro ([#233][233]) ### v2.0.7 Released on November 28, 2019 - Fix: errore nell'ordine dei campi CedentePrestatore in fattura semplificata ([#220][220]) - Test suite aggiornata a NetCore 3.0 - Fix: refuso in TOC.md ([#221][221]) - Fix: Aggiunto il Kosovo alla tabella IdPaese ([#214][214]) - Tutorial: Aggiunto `IgnoreProcessingInstructions` a `XmlReaderSettings` per evitare crash quando nodi "processing instructions" (es: `xml-stylesheet`) sono presenti nel XML. ([#209][209]) [233]: https://github.com/FatturaElettronica/FatturaElettronica.NET/issues/233 [220]: https://github.com/FatturaElettronica/FatturaElettronica.NET/issues/220 [221]: https://github.com/FatturaElettronica/FatturaElettronica.NET/pull/221 [214]: https://github.com/FatturaElettronica/FatturaElettronica.NET/issues/214 [209]: https://github.com/FatturaElettronica/FatturaElettronica.NET/issues/209 ### v2.0.6 Released on May 24, 2019 - Fix: FatturaSemplificata convalidata con TipoDocumento valido per Ordinaria ([#205][205]) - Fix: FatturaSemplificata convalidata con Natura valida per Ordinaria ([#205][205]) - Fix: Validazione AltriDatiIdentificativi in FatturaSemplificata ([#203][203]) - Fix: UnitaMisura vuota deve sollevare errore di validazione ([#204][204]) - Fix: DatiFatturaRettificata.DataFR dovrebbe essere nullabile ([#200][200]) - Fix: CausalePagamento: ZO e M2 sostituiti rispettivamente da Z e M ([#191][191c]) [205]: https://github.com/FatturaElettronica/FatturaElettronica.NET/issues/205 [203]: https://github.com/FatturaElettronica/FatturaElettronica.NET/issues/203 [204]: https://github.com/FatturaElettronica/FatturaElettronica.NET/issues/204 [200]: https://github.com/FatturaElettronica/FatturaElettronica.NET/issues/200 [191c]: https://github.com/FatturaElettronica/FatturaElettronica.NET/issues/191#issuecomment-493911791 ### v2.0.5 Released on April 23, 2019 - Fix: validatore CausalePagamento da aggiornare per unico 2019 ([#191][191]) - Test refactoring and cleanup. [191]: https://github.com/FatturaElettronica/FatturaElettronica.NET/issues/191 ### v2.0.4 Released on April 16, 2019 - Fix: falso errore 00418 "Data antecedente a data fattura rettificata" ([#190][190]) - Aggiunto badge NuGet al README ([#188][188]) - `LatinBaseValidator` ora indica quali sono i caratteri non accettati ([#185][185]) [190]: https://github.com/FatturaElettronica/FatturaElettronica.NET/issues/190 [188]: https://github.com/FatturaElettronica/FatturaElettronica.NET/issues/188 [185]: https://github.com/FatturaElettronica/FatturaElettronica.NET/issues/185 ### v2.0.3 Released on April 8, 2019 - Fix: errore validazione DettaglioLinee.TotalPrice ([#181][181]) - Refactoring: classe Allegati spostata in FatturaElettronica.Common ([#179][179]) - Docs: aggiunto folder `docs` con documentazione progetto. [181]: https://github.com/FatturaElettronica/FatturaElettronica.NET/issues/181 [179]: https://github.com/FatturaElettronica/FatturaElettronica.NET/issues/179 ### v2.0.2 Released on March 19, 2019 - Fix: il root node della fattura semplificata ha il namespace sbagliato. Addresses #176. ### v2.0.1 Released on March 19, 2019 - Fix: il root node della fattura semplificata ha il nome sbagliato. Closes #176. ### v2.0 Released on March 13, 2019 - New: Supporto per fattura semplificata (Gaetano Pizzol). Closes #137. - BREAKING: classe Fattura (Fattura.cs) rinominata FatturaOrdinaria (Ordinaria/FatturaOrdinaria.cs). - BREAKING: gerarchia di classi per fattura ordinaria spostata nel namespace FatturaElettronica.Ordinaria. - Fix: warning NU5125: The 'licenseUrl' element will be deprecated. Closes #166. - Fix: Proprietà di tipo oggetto opzionali sollevano "Object reference not set to an instance of an object" quando nulle. Closes #165. - Fix: DatiTrasporto.PesoLordo e DatiTrasporto.PesoNetto non possono superare il valore 9999.99m. Closes #157. - Bump FatturaElettronica.Core a 2.0. - Bump Microsoft.NET.Test.Sdk to 16.0.1. - Bump FluentValidation to 8.1.3. - Bump Newtonsoft.Json to 12.0.1. - Bump MSTest.TestAdapter to 1.4.0 - Bump MSTest.TestFramework to 1.4.0 - Switch CI da AppVeyor ad Azure Pipelines. ### v1.1.5 Released on February 2, 2019 - Fix: Tabella CausalePagamento aggiornata al 2019. Closes #151. ### v1.1.4 Released on January 31, 2019 - Fix: ScontoMaggiorazione può accettare sia Importo che Percentuale. Closes #146. - Fix: IdPaese.Irlanda è duplicato mentre Islanda è assente. Closes #144. - README: aggiunto esempio di inserimento elemento Body. Addresses #141. ### v1.1.3 Released on January 23, 2019 - New: nuovo logo per il progetto FatturaElettronica, by Roberto "Kalamun" Pasini. Closes 101. - Fix: Link obsoleto alle specifiche tecniche ufficiali. Closes #139. - Fix: ScontoMaggiorazione deve accettare Importo o Percentuale a 0. Addresses #136. - Fix: ScontoMaggiorazione non deve accettare Importo e Percentuale entrambi valorizzati. Addresses #136. ### v1.1.2 Released on January 21, 2019 - Fix: Validazione ScontoMaggiorazione dovrebbe accettare Importo o Percentuale a 0. Closes #136. ### v1.1.1 Released on January 17, 2019 - Fix: Tabella CausalePagamento completata coi nomi di ogni pagamento (Michael Mairegger). Pull #127. - Fix: Convalida Provincia non conforme ai controlli lato AgEntrate. Closes #129. - Fix: CessionarioCommittente.RappresentanteFiscale, errore "sequenza tag errata". Closes #133. - Fix: Supporto per 8 decimali nel PrezzoUnitario (Claudio Lepri). Pull #130; Closes #125. - Bump FatturaElettronica.Core a 1.1.1. ### v1.1 Released on January 6, 2019 - New: NetStandard 2.0 aggiunto ai target framework (Federico Dipuma). Closes #119. - New: costruttore classe Fattura ora è pubblico. Closes #99. - New: performance migliorata (Federico Dipuma). See #120. - Fix: Quantità non può assumere valore negativo. Closes #115. - Fix: Small typos. Closes #116. ### v1.0.4 Released on January 2, 2019 - Fix: Aggiunta "Sud Sardegna" alla lista provincie (Massimo Linossi). Pull #111. ### v1.0.3 Released on December 30, 2018 - Fix: UnitaMisura è opzionale. Addresses #102. ### v1.0.2 Released on December 20, 2018. - Fix: Titolo e CodEORI ignorano ordinamento. Closes #103. - Fix: controllo UnitaMisura consente campo vuoto. Closes #102. ### v1.0.1 Released on November 9, 2018. - Bump: FatturaElettronica.Core to 1.0. ### v1.0 Released on November 9, 2018. - BREAKING: proprietà Fattura.Header rinominata in FatturaElettronicaHeader. Closes #83. - BREAKING: proprietà Fattura.Body rinominata in FatturaElettronicaBody. Closes #83. - BREAKING: namespace FatturaElettronica.Impostazioni rinominato FatturaElettronica.Defaults. - Fix: Aggiornati codici INCOTERMS (Marco Tessitore). Pull #89; Pull #91. - Fix: Rimosso controllo 00426 su campo PECDestinatario (Gaetano Pizzol). Pull #88. - Fix: Anagrafica.CognomeNome non deve essere serializzato in JSON. Closes #86. - Fix: DettaglioPagamento.IBAN deve essere formalmente corretto. Closes #84. - Fix: Campo RiferimentoNumero dovrebbe essere opzionale (Gaetano Pizzol). Pull #82. - Fix: Aggiunto setter mancante a DettaglioLinee.AltriDatiGestionali. Addresses #81. - Fix: Header e Body vanno JSON-serializzati come FatturaElettronicaHeader e FatturaElettronicaBody. Closes #83. - Bump: FatturaElettronica.Core to 0.5. - Bump: Newtonsoft.Json to 11.0.2. - Bump: MSTest.TestFramework to 1.3.2. - Bump: MSTest.TestAdapter to 1.3.2. - Bump: Microsoft.NET.Test.Sdk to 15.9.0. ### v0.9 Released on October 26, 2018. - New: FromJson() de-serializza stream JSON. - Fix: PECDestinatario può essere vuoto quando CodiceDestinatario è 0000000. Closes #75. - Fix: Le proprietà di tipo Class non sono scrivibili. Closes #76. - Fix: ToJson() serializza proprietà che non dovrebbero comparire nel JON. - I test ora girano come app NetCore 2.1. Addresses FatturaElettronica/FatturaElettronica.Core#4. ### v0.8.5 Released on October 16, 2018. - New: Validazione errore 00426 per campo 1.1.6 PECDestinatario. Closes #74. - Fix: errore descrizione in RegimeFiscale "RF17". Closes #72. - Fix: "Nullable object must have a value" in validazione di blocco ScontoMaggiorazione con Importo = 0. Closes #71. ### v0.8.4 Released on October 4, 2018. - Upgrade: FluentValidation to v8.0.100. ### v0.8.3 Released on October 2, 2018. - Fix: DettaglioLineeValidator: 00423 non supporta tolleranza di 1 centesimo. Closes #66. ### v0.8.2 Released on October 1, 2018. - FatturaElettronica.Core dependency bumped to v0.2. - Cleanup and refactoring: use auto-properties; remove unnecessary usings. ### v0.8.1 Rilasciata il 4.7.2018 - Fix: errore lunghezza PECDestinatario in v0.8. Closes #58. ### v0.8 Rilasciata il 3.7.2018 - Recepite specifiche tecniche Allegato A del 22.6.2018. Closes #52. - New: rimossi controlli su campo PECDestinatario. Addresses #52. - New: supporto per TipoDocumento TD020 autofattura. Addresses #52 - Passata la test suite da NET461 a NETCore. Closes #57. ### v0.7 Rilasciata il 4.10.2017 - Spostata serializzazione su package indipendente FatturaElettronica.Core. - Abbandonato il profilo PCL in favore di NetStandard 1.1. ### v0.6.3 Rilasciata il 17.7.2017 - Fix: RappresentanteFiscale viene erroneamente serializzato come 'Rappresentante' causando errore convalida 200 da parte del sistema PA. Closes #49. - README: Aggiunta opzione IgnoreComments a XmlReader per evitare crash nel caso di commenti nel XML. Closes #45. ### v0.6.2 Rilasciata il 23.5.2017. - Fix: Falso errore di convalida 00423 quando PrezzoTotale è valorizzato con piu di due decimali. Closes #45. ### v0.6.1 Rilasciata il 5.5.2017. - Fix: Falso errore di convalida 00415 quando DatiCassaPrevidenziale è valorizzato ma non ha Ritenuta="SI". Closes #44. ### v0.6.0 Rilasciata il 27.4.2017. - Assembly non più strong-named. Closes #41. - README: aggiunti esempi di introspezione e modifica degli elementi FatturaElettronicaBody. Closes #38. ### v0.5.1 Rilasciata il 26.4.2017. - Fix: Errore 00421 non tiene conto della tolleranza garantita di 0.01 centesimi. Closes #43. ### v0.5.0 Rilasciata il 30.3.2017. Questa versione recepisce le modifiche introdotte con la v1.2.1 delle specifiche tecniche PA. - Regime Fiscale RF03 è abrogato. Viene restituito errore 00459 se utilizzato. - Natura N5: descrizione aggiornata a "regime del margine / IVA non esposta in fattura". - Le proprietà e Nome della classe astratta Tabella non sono più protette in scrittura. ### v0.4.3 Rilasciata il 23.3.2017. - Fix: Validazione conformità gruppi IsBasicLatin e IsLatin-1Supplement. Closes #29. - Fix: Non includere il folder Artwork nel package NuGet. Closes #37. ### v0.4.2 Rilasciata il 17.3.2017. - Fix: Convalida DatiCassaPrevidenziale.Natura va fatta solo quando Aliquota uguale a zero. Closes #36. ### v0.4.1 Rilasciata il 14.3.2017. - Fix: Nomi delle nazioni ISO-3166 Alpha 2 sono in Inglese. Closes #35. - Fix: Elementi FatturaElettronicaBody sono serializzati come 'Body'. Closes #34. - Aggiunto file .editconfig ### v0.4.0 Rilasciata il 9.3.2017. - Rinominata classe FatturaElettronica in Fattura. - Rinominata classe FatturaElettronicaHeader in Header. - Rinominata classe FatturaElettronicaBody in Body. - Rinominata proprietà Fattura.FatturaElettronicaHeader in Fattura.Header. - Rinominata proprietà Fattura.FatturaElettronicaBody in Fattura.Body. - Alcune classi spostate da FatturaElettronica.Common a FatturaElettronica.Tabelle - Classe BusinessObjects.BusinessObjectBase rinominata FatturaElettronica.BaseClass. - Classe BusinessObjects.BusinessObject rinominata FatturaElettronica.BaseClassSerializable. - Classe FatturaElettronica.Common.BusinessObject eliminata. - Persa dipendenza dal package BusinessObjects. - Acquisita dipendenza dal package FluentValidation. - Aggiunto namespace FatturaElettronica.Validators. - Aggiunta serie di classi dedicate alla convalida (FatturaValidator; HeaderValidator; ecc.) - Rimosso metodo IsValid(). Al suo posto usare proprietà ValidationResult.IsValid. - Rimossa proprietà Error. Al suo posto usare ValidationFailure.Errors. - Nuovo extension method Fattura.Validate(). Equivalente a FatturaValidator.Validate() (shortcut). - Consultare il README per esempi di codice aggiornati. ### v0.3.7 Rilasciata il 7.3.2017. - Fix: Errore in convalida del campo Riferimento Testo: sono consentiti fino a 60 caratteri. Closes #33. ### v0.3.6 Rilasciata il 10.2.2017. - Aggiunto supporto per .NET Core. - Abbandonato supporto per .NET Framework 4.0 e Silverlight. - Fix: Falso negativo (errore 423) in convalida DettaglioLinee. Closes #31. - Fix: Correzione messaggio di errore per Divisa non corretta (Fabio Calvigioni). ### v0.3.5 Rilasciata il 2.2.2017. - Fix: Crash con ScontoMaggiorazione.Importo non impostato (null). Closes #28. ### v0.3.4 Rilasciata il 1.2.2017. - Fix: Crash quando ScontoMaggiorazione.Importo ha valore negativo. Closes #27. ### v0.3.3 Rilasciata il 18.1.2017. - Fix: Consenti serializzazione di valori numerici fino a 5 decimali (minimo 2). - Fix: Arrotonda valori numerici fino a 5 decimali (minimo 2). ### v0.3.2 Rilasciata il 17.1.2017. - Fix: Convalida errore 00415. Se almeno un DatiCassaPrevidenziale ha Ritenuta = "SI", allora DatiRitenuta deve essere valorizzato. Closes #22. - Fix: Convalida errore 00411. Se almeno un DettaglioLinee ha Ritenuta = "SI", allora DatiRitenuta deve essere valorizzato. Closes #22. - Fix: Convalida errore 00423 nel caso di campo Quantità a null. Closes #20. ### v0.3.1 Rilasciata il 16.1.2017. - New: aggiunte proprietà Sigla e Sigle[] alla classe FormatoTrasmissione - New: aggiunta proprietà Descrizione alla classe FormatoTrasmissione ### v0.3 Rilasciata il 13.1.2017 #### BREAKING CHANGES Questa release introduce una serie di cambianti importanti che rompono la compatibilità con l'API precedente. - Il package NuGet cambia nome. Ora si chiama FatturaElettronica (era FatturaElettronicaPA). - Il namespace diventa FatturaElettronica (era FatturaElettronicaPA) - Il package FatturaElettronicaPA verrà marcato come obsoleto su NuGet. - Il costruttore della classe FatturaElettronica è ora protetto. - Usare il factory method CreateInstance() per ottenere una istanza della classe. - CreateInstance() consente di scegliere se ottenere una fattura tra soggetti privati o per la Pubblica Amministrazione. - La fattura restituita da CreateInstance() ha già il campo FormatoTrasmissione correttamente impostato a FPA12 o FPR12. - Nel caso di fattura tra privati, per default la fattura ha il CodiceDestinatario impostato a "0000000" (sarà cura del utente impostare in seguito il nuovo campo PECDestinatario o aggiornare il CodiceDestinatario col codice canale del destinatario) #### Altre modifiche - New: attributo xmlns:ds nel root elemento del documento xml. - New: attributo xmlns:xsi nel root elemento del documento xml. - New: attributo xsi:schemaLocation nel root elemento del documento xml. - New: campo 1.4.4 RappresentanteFiscale. - New: campo 1.4.3 StabileOrganizzazione. - New: campo 1.1.6 PECDestinatario e relative convalide. - Fix: modificato campo 2.4.2.13 IBAN per recepire da 15 a 34 caratteri. - Fix: aggiunto valore N7 ai campi 2.2.2.2 e 2.1.1.7.7 Natura. - Fix: aggiunto valore MP22 al campo 2.4.2.2 ModalitaPagamento. - Fix: campo 1.1.4 FormatoTrasmissione supporta valori FPA12 (Pubblica Amministrazione) e FPR12 (Privati) - Fix: campo 1.1.4 CodiceDestinatario, adeguate le convalide per tenere conto del FormatoTrasmissione impostato. - Aggiunta la test suite. Mancano test delle convalide implementate prima della v0.3. ### v0.2.6 Rilasciata il 13.1.2017 - Questa release serve solo a segnalare su NuGet che FatturaElettronicaPA è obsoleto. - Scaricare e installare il package FatturaElettronica v0.3 e successivi da ora in poi. ### v0.2.5 Rilasciata il 17.6.2016 - Fix: PrezzoTotale ora prevede tolleranza "accettabile" su seconda cifra decimale. Closes #19. ### v0.2.4 Rilasciata il 25.5.2016 - Fix: Validazione 00423: calcolo in base a percentuale sconto. Closes #18. ### v0.2.3 Rilasciata il 24.5.2016 - Fix: Serializzare valori decimali con piu' di 2 decimali. ### v0.2.2 Rilasciata il 24.5.2016 - New: Errore 00400 aggiunto alla convalida. - New: Errore 00401 aggiunto alla convalida. - Fix: Errore 00424 non consente aliquota IVA impostata al valore 1. ### v0.2.1 Rilasciata il 23.5.2016 - New: Errore 00422, aggiunta tolleranza di 1 Euro come da specifiche PA aggiornate. ### v0.2 Rilasciata il 20.5.2016 - New: Errore 00418 aggiunto alla convalida. Addresses #16. - New: Errore 00419 aggiunto alla convalida. Addresses #16. - New: Errore 00420 aggiunto alla convalida. Addresses #16. - New: Errore 00421 aggiunto alla convalida. Addresses #16. - New: Errore 00422 aggiunto alla convalida. Addresses #16. - New: Errore 00423 aggiunto alla convalida. Closes #17. Addresses #16. - New: Errore 00424 aggiunto alla convalida. Addresses #16. - New: Errore 00425 aggiunto alla convalida. Addresses #16. ### v0.1.8 Rilasciata il 24.8.2015 - Fix: 2.1.8.3 RiferimentoNumeroLinea in deserializzazione manda applicazione in loop. Closes #14. ### v0.1.7 Rilasciata il 7.8.2015 - Fix: 2.1.9.4 NumeroColli in deserializzazione si ha errore conversione Nullable. Closes #12. - Fix: 2.4.2.4 GiorniTerminiPagamento in deserializzazione si ha errore conversione Nullable. Closes #12. - Upgrade to BusinessObjects v0.1.4 ### v0.1.6 Rilasciata il 31.7.2015 - Upgrade to BusinessObjects v0.1.3 - New: Convalida per 2.1.1.11 Causale. - Fix: 2.1.2.1 RiferimentoNumeroLinea non gestito come lista 0..N, ma come valore singolo. - Fix: 2.1.2.1 RiferimentoNumeroLinea in deserializzazione si ha errore conversione Nullable. Closes #9. - Fix: 2.1.1.11 Causale. Se sono presenti 2+ righe allora il codice va in loop. Closes #8. - Fix: Crash in deserializzazione di tag XML vuoti (es: ``). Closes #7. - Fix: 2.1.9.13 DataOraConsegna serializza a MinValue quando non valorizzato. Closes #10. - Fix: 2.2.1.16.4 RiferimentoData serializza a MinValue quando non valorizzato. - Fix: 2.4.2.5 DataScadenzaPagamento serializza a MinValue quando non valorizzato. Closes #10. - Fix: 2.4.2.18 DataLimitePagamentoAnticipato è di tipo errato (decimal? invece di DateTime?). ### v0.1.5 Rilasciata il 15.7.2015 - Fix: 2.2.1.10.1 ScontoMaggiorazione.Tipo: convalida valori corretti SC e MG. - Fix: 2.4.2.2 ModalitaPagamento: non veniva convalidato valore MP05. ### v0.1.4 Rilasciata il 14.7.2015 - Upgrade to BusinessObject v0.1.2 - Fix: Convalida di FatturaElettronicaBody. Chiude #4. ### v0.1.3 Rilasciata il 7.4.2015 - Upgrade to BusinessObject v0.1.1 - Upgrade to Json.NET v6.0.8 - Fix: ReadXML crash su valori Decimal? ### v0.1.2 Rilasciata il 16.2.2015 - Supporto per valori L1, M1, O1, V1 per DatiRitenuta.CausalePagamento. - Risolto problema col validatore di DatiRitenuta.CausalePagamento. - Supporto per valore RF19 per campo RegimeFiscale. ### v0.1.1 Rilasciata il 16.2.2015 - Supporto per Split Payment. ### v0.1 Rilasciata il 9.2.2015 - Release iniziale. ================================================ FILE: CNAME ================================================ fatturaelettronicaopensource.org ================================================ FILE: Common/Allegati.cs ================================================ using System.Xml; namespace FatturaElettronica.Common { /// /// Dati relativi ad eventuale allegato. /// public class Allegati : Core.BaseClassSerializable { public Allegati() { } public Allegati(XmlReader r) : base(r) { } /// /// Nome dell'allegato. /// [Core.DataProperty] public string NomeAttachment { get; set; } /// /// Algoritmo usato per comprimere l'attachment (ad es. ZIP, RAR, ...) /// [Core.DataProperty] public string AlgoritmoCompressione { get; set; } /// /// Formato dell'attachment (ad es: TXT, XML, DOC, PDF, ...) /// [Core.DataProperty] public string FormatoAttachment { get; set; } /// /// Descrizione del documento. /// [Core.DataProperty] public string DescrizioneAttachment { get; set; } /// /// Contiene il documento allegato alla fattura; il contenuto è demandato agli accordi tra PA e fornitore. /// [Core.DataProperty] public byte[] Attachment { get; set; } } } ================================================ FILE: Common/Anagrafica.cs ================================================ using System.Xml; namespace FatturaElettronica.Common { /// /// Represents a Anagrafica object /// public class Anagrafica : DenominazioneNomeCognome { public Anagrafica() { } public Anagrafica(XmlReader r) : base(r) { } /// IMPORTANT /// Each data property must be flagged with the Order attribute or it will be ignored. /// Also, properties must be listed with the precise order in the specification. /// /// Gets or sets the Titolo. /// [Core.DataProperty(order: 3)] public string Titolo { get; set; } /// /// Gets or sets the CodEORI. /// [Core.DataProperty(order: 4)] // ReSharper disable once InconsistentNaming public string CodEORI { get; set; } } } ================================================ FILE: Common/DatiAnagrafici.cs ================================================ using System.Xml; namespace FatturaElettronica.Common { /// /// Represents a DatiAnagrafici object /// public class DatiAnagrafici : Core.BaseClassSerializable { /// /// Dati anagrafici, professionali e fiscali /// public DatiAnagrafici() { IdFiscaleIVA = new(); Anagrafica = new(); } public DatiAnagrafici(XmlReader r) : base(r) { } /// /// Numero di identificazione fiscale ai fini IVA; i primi due caratteri rappresentano il paese ed i restanti il codice /// vero e proprio che, per i residenti in Italia, corrisponde al numero di partita IVA. /// [Core.DataProperty(order: 0)] public IdFiscaleIVA IdFiscaleIVA { get; set; } /// /// Numero di Codice Fiscale. /// [Core.DataProperty(order: 1)] public string CodiceFiscale { get; set; } /// /// Dati anagrafici identificativi del soggetto. /// [Core.DataProperty(order: 2)] public Anagrafica Anagrafica { get; set; } } } ================================================ FILE: Common/DatiDocumento.cs ================================================ using System; using System.Collections.Generic; using System.Xml; namespace FatturaElettronica.Common { /// /// Informazioni relative ad un documento a cui si fa riferimento. /// public abstract class DatiDocumento : Core.BaseClassSerializable { protected DatiDocumento() { RiferimentoNumeroLinea = new(); } protected DatiDocumento(XmlReader r) : base(r) { } /// IMPORTANT /// Each data property must be flagged with the Order attribute or it will be ignored. /// Also, properties must be listed with the precise order in the specification. /// /// Linee di dettaglio della fattura a cui si fa riferimento. /// /// Se il riferimento è all'intera fattura non viene valorizzato. [Core.DataProperty] public List RiferimentoNumeroLinea { get; set; } /// /// Numero del documento a cui si fa riferimento. /// [Core.DataProperty] public string IdDocumento { get; set; } /// /// Data del documento a cui si fa riferimento. /// [Core.DataProperty] public DateTime? Data { get; set; } /// /// Identificativo della singola voce all'interno del documento /// (ad esempio, nel caso di ordine di acquisto, è il numero della linea dell'ordine di acquisto, oppure, nel caso di /// contratto, è il numero della linea del contratto, etc.) /// [Core.DataProperty] public string NumItem { get; set; } /// /// Codice della commessa o della convenzione. /// [Core.DataProperty] public string CodiceCommessaConvenzione { get; set; } /// /// Codice gestito dal CIPE che caratterizza ogni progetto di investimento pubblico (Codice Unitario Progetto). /// [Core.DataProperty] // ReSharper disable once InconsistentNaming public string CodiceCUP { get; set; } /// /// Codice Identificativo della Gara. /// [Core.DataProperty] // ReSharper disable once InconsistentNaming public string CodiceCIG { get; set; } } } ================================================ FILE: Common/DenominazioneNomeCognome.cs ================================================ using System.Text.Json.Serialization; using System.Xml; namespace FatturaElettronica.Common { /// /// Represents a Anagrafica object /// public class DenominazioneNomeCognome : Core.BaseClassSerializable { public DenominazioneNomeCognome() { } public DenominazioneNomeCognome(XmlReader r) : base(r) { } /// IMPORTANT /// Each data property must be flagged with the Order attribute or it will be ignored. /// Also, properties must be listed with the precise order in the specification. /// /// Gets or sets the Denominazione. /// [Core.DataProperty(order: 0)] public string Denominazione { get; set; } /// /// Gets or sets the Nome. /// [Core.DataProperty(order: 1)] public string Nome { get; set; } /// /// Gets or sets the Cognome. /// [Core.DataProperty(order: 2)] public string Cognome { get; set; } /// /// Returns Cognome and Nome as a single value. /// /// This is not a OrderedDataProperty so it will not be serialized to XML. [JsonIgnore] public string CognomeNome { get { var r = ((Cognome ?? string.Empty) + " " + (Nome ?? string.Empty)).Trim(); return string.IsNullOrEmpty(r) ? null : r; } } } } ================================================ FILE: Common/IdFiscaleIva.cs ================================================ using System.Xml; namespace FatturaElettronica.Common { /// /// Numero di identificazione fiscale ai fini IVA; i primi due caratteri rappresentano il paese ed i restanti il codice /// vero e proprio che, per i residenti in Italia, corrisponde al numero di partita IVA. /// public class IdFiscaleIVA : Core.BaseClassSerializable { public IdFiscaleIVA() { } public IdFiscaleIVA(XmlReader r) : base(r) { } /// /// Codice della nazione espresso secondo lo standard ISO 3166-1 alpha-2 code. /// [Core.DataProperty] public string IdPaese { get; set; } /// /// Codice identificativo fiscale. /// [Core.DataProperty] public string IdCodice { get; set; } public override string ToString() { return IdPaese + IdCodice; } } } ================================================ FILE: Common/Località.cs ================================================ using System.ComponentModel; using System.Xml; namespace FatturaElettronica.Common { /// /// Represents a Anagrafica object /// public abstract class Località : Core.BaseClassSerializable { /// /// Constructor. /// protected Località() { } protected Località(XmlReader r) : base(r) { } /// IMPORTANT /// Each data property must be flagged with the Order attribute or it will be ignored. /// Also, properties must be listed with the precise order in the specification. /// /// Indirizzo (nome della via, piazza etc.) /// [Core.DataProperty] public string Indirizzo { get; set; } /// /// Numero civico riferito all'indirizzo (non indicare se già presente nel campo indirizzo). /// [Core.DataProperty] public string NumeroCivico { get; set; } /// /// Codice Avviamento Postale. /// [Core.DataProperty] public string CAP { get; set; } /// /// Comune. /// [Core.DataProperty] public string Comune { get; set; } /// /// Sigla della provincia di appartenenza del comune. /// [Core.DataProperty] public string Provincia { get; set; } /// /// Codice della nazione espresso secondo lo standard ISO 3166-1 alpha-2 code. /// [Core.DataProperty] [DefaultValue("IT")] public string Nazione { get; set; } } } ================================================ FILE: Common/RappresentanteFiscale.cs ================================================ using System.Xml; namespace FatturaElettronica.Common { /// /// Dati relativi al rappresentante fiscale del cedente / prestatore. /// public abstract class RappresentanteFiscale : Core.BaseClassSerializable { /// /// Dati relativi al rappresentante fiscale del cedente / prestatore. /// public RappresentanteFiscale() { DatiAnagrafici = new(); } public RappresentanteFiscale(XmlReader r) : base(r) { } /// IMPORTANT /// Each data property must be flagged with the Order attribute or it will be ignored. /// Also, properties must be listed with the precise order in the specification. /// /// Dati anagrafici del rappresentante fiscale del cedente / prestatore. /// [Core.DataProperty] public DatiAnagrafici DatiAnagrafici { get; set; } } } ================================================ FILE: Common/ScontoMaggiorazione.cs ================================================ namespace FatturaElettronica.Common { /// /// Eventuale sconto o maggiorazione applicati sul totale documento. /// public class ScontoMaggiorazione : Core.BaseClassSerializable { /// IMPORTANT /// Each data property must be flagged with the Order attribute or it will be ignored. /// Also, properties must be listed with the precise order in the specification. /// /// Indica se trattasi di sconto o di maggiorazione. /// [Core.DataProperty] public string Tipo { get; set; } /// /// Percentuale di sconto o di maggiorazione. /// [Core.DataProperty] public decimal? Percentuale { get; set; } /// /// Importo dello sconto o della maggiorazione. /// [Core.DataProperty] public decimal? Importo { get; set; } } } ================================================ FILE: Common/StabileOrganizzazione.cs ================================================ using System.Xml; namespace FatturaElettronica.Common { public class StabileOrganizzazione : Località { public StabileOrganizzazione() { } public StabileOrganizzazione(XmlReader r) : base(r) { } } } ================================================ FILE: Core/BaseClass.cs ================================================ using System; using System.Collections; using System.Collections.Generic; using System.ComponentModel; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; namespace FatturaElettronica.Core { /// /// The class all domain objects must inherit from. /// /// Currently supports: /// - IEquatable so you can easily compare complex BusinessObjects togheter. /// - Binding (INotififyPropertyChanged and IDataErrorInfo). /// /// TODO: /// - BeginEdit()/EndEdit() combination, and rollbacks for cancels (IEditableObject). /// public abstract class BaseClass : INotifyPropertyChanged, IEquatable { /// /// Occurs when any properties are changed on this object. /// public event PropertyChangedEventHandler PropertyChanged; protected bool SetProperty(ref T storage, T value, [CallerMemberName] string propertyName = null) { if (Equals(storage, value)) { return false; } storage = value; OnPropertyChanged(propertyName); return true; } private void OnPropertyChanged([CallerMemberName] string propertyName = null) { PropertyChanged?.Invoke(this, new(propertyName)); } /// /// Cleans a string by ensuring it isn't null and trimming it. /// /// The string to clean. protected string CleanString(string s) { return (s ?? string.Empty).Trim(); } /// /// Checks wether a BusinessObject instance is empty. /// /// Returns true if the object is empty; false otherwise. public virtual bool IsEmpty() { // TODO support more data types. Also refactor: can be improved. var props = GetAllDataProperties().ToList(); var i = 0; foreach (var prop in props) { // Default value for Lists is Count if (prop.PropertyType.IsGenericList() && ((IList) prop.GetValue(this, null)).Count == 0) { i++; continue; } var v = prop.GetValue(this, null); switch (v) { case null: i++; continue; case string s when string.IsNullOrEmpty(s): i++; continue; } if (IsNumericType(prop.PropertyType) && v.Equals(0)) { i++; continue; } switch (v) { case DateTime _ when v.Equals(DateTime.MinValue): i++; continue; case BaseClass @class when @class.IsEmpty(): i++; break; } } return i == props.Count; } /// /// Provides a list of actual data properties for the current BusinessObject instance, sorted by writing order. /// /// Only properties flagged with the OrderedDataProperty attribute will be returned. /// A enumerable list of PropertyInfo instances. protected IEnumerable GetAllDataProperties() { return GetType() .GetRuntimeProperties() .Where(pi => pi.GetCustomAttributes(true).Any()) .OrderBy(pi => pi.GetCustomAttribute(true).Order); } protected PropertyInfo GetKnownNonDataProperty(string name) { var knownNonDataProperties = new[] {"SistemaEmittente"}; return knownNonDataProperties.Contains(name) ? GetType().GetRuntimeProperty(name) : null; } public bool Equals(BaseClass other) { if (other == null) return false; foreach (var prop in GetAllDataProperties()) { var v1 = prop.GetValue(this, null); var v2 = prop.GetValue(other, null); if (prop.PropertyType.IsGenericList() && prop.PropertyType == typeof(List)) { // We only support List. if (!((List) v1).SequenceEqual((List) v2)) { return false; } } else { // Other types, and BusinessObject type. if (v1 != null && v2 != null && v1 != v2 && !v1.Equals(v2)) { return false; } } } return true; } public override bool Equals(object obj) { if (obj == null) return false; var o = obj as BaseClass; return o != null && GetType().Name == o.GetType().Name && Equals(o); } public static bool operator ==(BaseClass o1, BaseClass o2) { if ((object) o1 == null || (object) o2 == null) return Equals(o1, o2); return o1.Equals(o2); } public static bool operator !=(BaseClass o1, BaseClass o2) { if (o1 == null || o2 == null) return !Equals(o1, o2); return !o1.Equals(o2); } public override int GetHashCode() { return ObjectExtensions.GetHashCodeFromFields(GetAllDataProperties()); } private static readonly HashSet NumericTypes = new() { typeof(int), typeof(uint), typeof(double), typeof(decimal), }; private static bool IsNumericType(Type type) { return NumericTypes.Contains(type) || NumericTypes.Contains(Nullable.GetUnderlyingType(type)); } } public static class ObjectExtensions { private const int SeedPrimeNumber = 691; private const int FieldPrimeNumber = 397; /// /// Allows GetHashCode() method to return a Hash based ont the object properties. /// /// The list of fields to include in the hash generation. /// public static int GetHashCodeFromFields(params object[] fields) { unchecked { //unchecked to prevent throwing overflow exception var hashCode = SeedPrimeNumber; foreach (var b in fields) if (b != null) hashCode *= FieldPrimeNumber + b.GetHashCode(); return hashCode; } } } } ================================================ FILE: Core/BaseClassSerializable.cs ================================================ using System; using System.Collections; using System.Collections.Generic; using System.ComponentModel; using System.Globalization; using System.Linq; using System.Reflection; using System.Text.Json; using System.Xml; using System.Xml.Schema; using System.Xml.Serialization; namespace FatturaElettronica.Core { /// /// - XML (de)serialization; /// - JSON (de)serialization. /// public class BaseClassSerializable : BaseClass, IXmlSerializable { /// /// Constructor. /// protected BaseClassSerializable() { XmlOptions = new() { DateTimeFormat = "yyyy-MM-dd", DecimalFormat = "0.00######" }; } protected BaseClassSerializable(XmlReader r) { ReadXml(r); } protected XmlOptions XmlOptions { get; set; } private readonly Stack _stack = new(); /// /// Deserializes the current BusinessObject from a json stream. /// /// Active json stream reader /// Side effects on parse handling public virtual void FromJson(Utf8JsonReader r) { _stack.Clear(); PropertyInfo prop = null; while (r.Read()) { Type objectType; JsonProperty current; Type elementType; switch (r.TokenType) { case JsonTokenType.StartObject: current = null; if (_stack.Any()) current = _stack.Peek(); if (current != null) { current.Child = prop; if (current.Child != null) { objectType = current.Child.PropertyType; if (objectType.IsGenericList()) { elementType = objectType.GetTypeInfo().GenericTypeArguments.Single(); var newObject = Activator.CreateInstance(elementType); var add = objectType.GetMethod("Add"); try { if (add != null) add.Invoke(current.Value, new[] { newObject }); } catch (Exception) { throw new JsonParseException($"Unexpected element type {elementType}", r); } current = new(newObject); } else { if (!objectType.IsSubclassOfBusinessObject()) throw new JsonParseException( $"Unexpected property type {objectType.FullName}", r); current = new(current.Child.GetValue(current.Value, null)); } } } else current = new(this); _stack.Push(current); break; case JsonTokenType.EndObject: if (_stack.Count > 0) _stack.Pop(); // Restore parent property from stack prop = null; if (_stack.Count > 1) prop = _stack.ElementAt(1).Child; break; case JsonTokenType.PropertyName: if (!_stack.Any()) throw new JsonParseException("Malformed JSON", r); current = _stack.Peek(); var name = r.GetString(); prop = GetPropertyInfo((BaseClassSerializable)current.Value, name); if (prop == null) throw new JsonParseException($"Unexpected property {name}", r); current.Child = prop; break; case JsonTokenType.StartArray: current = null; if (_stack.Any()) current = _stack.Peek(); if (current != null && current.Child != null) { objectType = current.Child.PropertyType; if (!objectType.IsGenericList()) throw new JsonParseException($"Unexpected property type {objectType.FullName}", r); var value = current.Child.GetValue(current.Value, null); var clear = objectType.GetMethod("Clear"); if (clear != null) clear.Invoke(value, null); current = new(current.Child, value); } else current = new(this); _stack.Push(current); break; case JsonTokenType.EndArray: if (_stack.Count > 0) _stack.Pop(); // Restore parent property from stack prop = null; if (_stack.Count > 1) prop = _stack.ElementAt(1).Child; break; case JsonTokenType.Number: case JsonTokenType.String: case JsonTokenType.True: case JsonTokenType.False: current = null; if (_stack.Any()) current = _stack.Peek(); if (current != null) { objectType = prop?.PropertyType; if (current.Value.GetType().IsGenericList()) { elementType = objectType.GetTypeInfo().GenericTypeArguments.Single(); var add = objectType?.GetMethod("Add"); var value = Cast(elementType, r); try { if (add != null) add.Invoke(current.Value, new[] { value }); } catch (Exception) { throw new JsonParseException($"Unexpected element type {elementType}", r); } } else { var value = Cast(objectType, r); current.Child.SetValue(current.Value, value, null); } } else throw new JsonParseException("Malformed JSON", r); break; case JsonTokenType.Null: current = null; if (_stack.Any()) current = _stack.Peek(); if (current != null) { objectType = prop?.PropertyType; if (current.Value.GetType().IsGenericList()) { elementType = objectType.GetTypeInfo().GenericTypeArguments.Single(); var add = objectType?.GetMethod("Add"); try { if (add != null) add.Invoke(current.Value, null); } catch (Exception) { throw new JsonParseException($"Unexpected element type {elementType}", r); } } else { current.Child.SetValue(current.Value, null, null); } } else throw new JsonParseException("Malformed JSON", r); break; default: throw new JsonParseException($"Unexpected token {r.TokenType}", r); } } } /// /// Helper method to cast json properties /// /// target type /// Active json stream reader /// private static object Cast(Type target, Utf8JsonReader r) { if (target == typeof(int) || target == typeof(int?)) return r.GetInt32(); if (target == typeof(decimal) || target == typeof(decimal?)) return r.GetDecimal(); if (target == typeof(DateTime) || target == typeof(DateTime?)) return r.GetDateTime(); if (target == typeof(string)) return r.GetString(); if (target == typeof(bool)) return r.GetBoolean(); if (target == typeof(byte[])) return r.GetBytesFromBase64(); return null; } /// /// Helper method to get a named property /// /// /// /// private static PropertyInfo GetPropertyInfo(BaseClassSerializable value, string name) { var property = value.GetKnownNonDataProperty(name); if (property != null) return property; var dataProperties = value.GetAllDataProperties().ToList(); // XmlElementAttribute comes first property = dataProperties .FirstOrDefault(prop => prop.GetCustomAttributes(typeof(XmlElementAttribute), false) .Any(ca => ((XmlElementAttribute)ca).ElementName.Equals(name, StringComparison.OrdinalIgnoreCase))); // Fallback to property name if (property == null) property = dataProperties.FirstOrDefault(n => n.Name.Equals(name, StringComparison.OrdinalIgnoreCase)); return property; } /// /// Serializes the instance to JSON /// /// A JSON string representing the class instance. public virtual string ToJson() { return ToJson(JsonOptions.None); } /// /// Serializes the class to JSON. /// /// JSON formatting options. /// A JSON string representing the class instance. public virtual string ToJson(JsonOptions jsonOptions) { var json = JsonSerializer.Serialize(this, GetType(), new JsonSerializerOptions { WriteIndented = jsonOptions == JsonOptions.Indented }); return json; } public XmlSchema GetSchema() { return null; } /// /// Serializes the current BusinessObject instance to a XML stream. /// /// Active XML stream writer. /// Writes only its inner content, not the outer element. Leaves the writer at the same depth. public virtual void WriteXml(XmlWriter w) { foreach (var property in GetAllDataProperties()) { var attribute = property.GetCustomAttributes(typeof(XmlElementAttribute), false) .Cast() .FirstOrDefault(); var propertyName = attribute == null ? property.Name : attribute.ElementName; var value = property.GetValue(this, null); if (value == null && !XmlOptions.SerializeNullValues) continue; var child = value as BaseClassSerializable; if (child != null) { if (child.IsEmpty() && XmlOptions.SerializeEmptyBusinessObjects == false) continue; w.WriteStartElement(propertyName); child.WriteXml(w); w.WriteEndElement(); continue; } if (property.PropertyType.IsGenericList()) { WriteXmlList(propertyName, value, w); continue; } switch (value) { case string _: { if (!string.IsNullOrEmpty(value.ToString()) || XmlOptions.SerializeEmptyStrings) { w.WriteElementString(propertyName, value.ToString()); } continue; } case DateTime dateTime when XmlOptions.DateTimeFormat != null && !property.GetCustomAttributes().Any(): w.WriteElementString(propertyName, dateTime.ToString(XmlOptions.DateTimeFormat)); continue; case decimal decimalValue when XmlOptions.DecimalFormat != null: w.WriteElementString(propertyName, decimalValue.ToString(XmlOptions.DecimalFormat, CultureInfo.InvariantCulture)); continue; } // all else fail so just let the value flush straight to XML. w.WriteStartElement(propertyName); if (value != null) { w.WriteValue(value); } w.WriteEndElement(); } } /// /// Deserializes a List of BusinessObject or strings to one or more XML elements. /// /// Property name. /// Property value. /// Active XML stream writer. private static void WriteXmlList(string propertyName, object value, XmlWriter w) { var type = value.GetType(); var e = type.GetMethod("GetEnumerator")?.Invoke(value, null) as IEnumerator; while (e != null && e.MoveNext()) { if (e.Current == null) continue; var current = e.Current; w.WriteStartElement(propertyName); { switch (current) { case BaseClassSerializable serializable: serializable.WriteXml(w); break; case string s: w.WriteString(s); break; default: w.WriteValue(e.Current); break; } } w.WriteEndElement(); } } protected virtual void ReadAndHandleXmlStartElement(XmlReader r) { r.ReadStartElement(); if (r.NodeType == XmlNodeType.ProcessingInstruction) r.Skip(); } /// /// Deserializes the current BusinessObject from a XML stream. /// /// Active XML stream reader. /// Reads the outer element. Leaves the reader at the same depth. public virtual void ReadXml(XmlReader r) { var isEmpty = r.IsEmptyElement; ReadAndHandleXmlStartElement(r); if (isEmpty) return; var properties = GetAllDataProperties().ToList(); while (r.NodeType == XmlNodeType.Element) { var property = properties .FirstOrDefault(prop => prop .GetCustomAttributes(typeof(XmlElementAttribute), false) .Any(ca => ((XmlElementAttribute)ca).ElementName == r.Name)); if (property == null) property = properties.FirstOrDefault(n => n.Name.Equals(r.Name)); if (property == null) { r.Skip(); continue; } var type = property.PropertyType; var value = property.GetValue(this, null); if (type.IsSubclassOfBusinessObject()) { ((BaseClassSerializable)value).ReadXml(r); continue; } // if property type is List, try to fetch the list from XML. if (type.IsGenericList()) { ReadXmlList(value, type, r.Name, r); continue; } // ReadElementContentAs won't accept a nullable type. if (type == typeof(DateTime?)) type = typeof(DateTime); if (type == typeof(decimal?)) type = typeof(decimal); if (type == typeof(int?)) type = typeof(int); var content = r.ReadElementContentAs(type, null); if (string.IsNullOrEmpty(content.ToString())) { var defaultValue = property.GetCustomAttributes().FirstOrDefault()?.Value; if (defaultValue is not null) content = defaultValue; } property.SetValue(this, content, null); } if (r.NodeType == XmlNodeType.Text) r.Skip(); r.ReadEndElement(); } /// /// Serializes one or more XML elements into a List of BusinessObjects. /// /// Property value. Must be a List of BusinessObject instances. /// /// Element name. /// Active XML stream reader. private static void ReadXmlList(object propertyValue, Type propertyType, string elementName, XmlReader r) { var argumentType = propertyType.GetTypeInfo().GenericTypeArguments.Single(); // note that the 'canonical' call to GetRuntimeMethod returns null for some reason, // see http://stackoverflow.com/questions/21307845/runtimereflectionextensions-getruntimemethod-does-not-work-as-expected //var method = propertyType.GetRuntimeMethod("Clear", new[] { propertyType }); var clear = propertyType.GetMethod("Clear"); if (clear != null) clear.Invoke(propertyValue, null); var add = propertyType.GetMethod("Add"); while (r.NodeType == XmlNodeType.Element && r.Name == elementName) { if (argumentType.IsSubclassOfBusinessObject()) { // list items are expected to be of BusinessObject type. var bo = Activator.CreateInstance(argumentType); ((BaseClassSerializable)bo).ReadXml(r); if (add != null) add.Invoke(propertyValue, new[] { bo }); continue; } if (argumentType == typeof(string)) { if (add != null) add.Invoke(propertyValue, new object[] { r.ReadElementContentAsString() }); continue; } if (argumentType != typeof(int)) continue; if (add != null) add.Invoke(propertyValue, new[] { r.ReadElementContentAs(argumentType, null) }); } } private class JsonProperty { public PropertyInfo Child { get; set; } public object Value { get; set; } public JsonProperty(PropertyInfo property, object value) { Child = property; Value = value; } public JsonProperty(object value) : this(null, value) { } public override string ToString() { return $"Child {Child} - Value {Value}"; } } } } ================================================ FILE: Core/DataPropertyAttribute.cs ================================================ using System; using System.Runtime.CompilerServices; namespace FatturaElettronica.Core { /// /// Use this attribute to flag DataObject properties which are meant to be represent actual Business Object values /// (i.e. LastName, but not IsValid). Also, in order for the Read/Write XML methods to work properly, remember /// that these properties should be defined in the same order with which they are expected to appear in the XML file. /// [AttributeUsage(AttributeTargets.Property)] public sealed class DataProperty : Attribute { public DataProperty([CallerLineNumber] int order = 0) { Order = order; } public int Order { get; } } } ================================================ FILE: Core/IgnoreXmlDateFormat.cs ================================================ using System; namespace FatturaElettronica.Core { /// /// Use this attribute to flag DateTime properties which should not be serialized to XML using the class XmlDateFormat property. /// [AttributeUsage(AttributeTargets.Property)] public sealed class IgnoreXmlDateFormat : Attribute { } } ================================================ FILE: Core/JsonOptions.cs ================================================ namespace FatturaElettronica.Core { /// /// Provides formatting optons for JSON output. /// /// Currently a wrapper around Newtonsoft.Json.Formatting. We provide it so in the future we can remove json.net /// dependancy without changing the external API. public enum JsonOptions { None = 0, Indented = 1, } } ================================================ FILE: Core/JsonParseException.cs ================================================ using System; using System.Text.Json; namespace FatturaElettronica.Core { /// /// Json parsing exception /// public class JsonParseException : Exception { private int LineNumber { get; } private int LinePosition { get; } public JsonParseException(string message, Utf8JsonReader reader) : base(message) { //Not available atm. //As mentioned here https://github.com/dotnet/runtime/issues/28482 will be available from System.Text.Json vers.7.0.0 //LineNumber = textReader.LineNumber; //LinePosition = textReader.textReader; } } } ================================================ FILE: Core/TypeExtensions.cs ================================================ using System; using System.Collections.Generic; using System.Linq; using System.Reflection; namespace FatturaElettronica.Core { public static class TypeExtensions { public static MethodInfo GetMethod(this Type type, string name) { return type.GetRuntimeMethods().First(x => x.Name.Contains(name)); } public static bool IsSubclassOfBusinessObject(this Type type) { return typeof(BaseClassSerializable).GetTypeInfo().IsAssignableFrom(type.GetTypeInfo()); } public static bool IsGenericList(this Type type) { return type.GetTypeInfo().IsGenericType && type.GetGenericTypeDefinition() == typeof(List<>); } } } ================================================ FILE: Core/XmlOptions.cs ================================================ namespace FatturaElettronica.Core { /// /// XML serialization options for BusinessObject instances. /// public class XmlOptions { /// /// Format string to be applied on DateTime properties. This format will be ignored if the IgnoreXmlDateFormat attribute has been set /// for the property. /// public string DateTimeFormat { get; set; } /// /// Format string to be applied on Decimal properties. /// public string DecimalFormat { get; set; } /// /// Whether null properties should be serialized or not. Defaults to false. /// public bool SerializeNullValues { get; set; } /// /// Whether empty BusinessObject children should be serialized or not. Defaults to false. /// public bool SerializeEmptyBusinessObjects { get; set; } /// /// Wether emty strings should be serialized or not. Defaults to false. /// public bool SerializeEmptyStrings { get; set; } } } ================================================ FILE: Defaults.cs ================================================ namespace FatturaElettronica.Defaults { public enum Instance { PubblicaAmministrazione, Privati, Semplificata }; public static class Versione { public static string Trasmissione { get { return "1.2"; } } public static string Controlli { get { return "1.4"; } } public static string TrasmissioneSemplificata { get { return "1.0"; } } } public static class FormatoTrasmissione { public static string PubblicaAmministrazione { get { return $"FPA{Versione.Trasmissione.Replace(".", "")}"; } } public static string Privati { get { return $"FPR{Versione.Trasmissione.Replace(".", "")}"; } } public static string Semplificata { get { return $"FSM{Versione.TrasmissioneSemplificata.Replace(".", "")}"; } } } public class RootElement { public static string Prefix { get; set; } = "p"; public static XmlAttributeString[] ExtraAttributes { get; set; } = new XmlAttributeString[] { new() { Prefix = "xmlns", LocalName = "ds", ns = null, value = "http://www.w3.org/2000/09/xmldsig#" }, new() { Prefix = "xmlns", LocalName = "xsi", ns = null, value = "http://www.w3.org/2001/XMLSchema-instance" }, new() { Prefix = "xsi", LocalName = "schemaLocation", ns = null, value = "http://ivaservizi.agenziaentrate.gov.it/docs/xsd/fatture/v1.2 https://www.fatturapa.gov.it/export/documenti/fatturapa/v1.2.1/Schema_del_file_xml_FatturaPA_versione_1.2.1a.xsd" } }; public class XmlAttributeString { public string Prefix; public string LocalName; public string ns; public string value; } } } ================================================ FILE: Extensions/DecimalRuleExtensions.cs ================================================ using FluentValidation; namespace FatturaElettronica.Extensions { internal static class DecimalRuleExtensions { public static void ScalePrecision8DecimalType(this IRuleBuilder ruleBuilder) { ruleBuilder.PrecisionScale(19, 8, false); } public static void ScalePrecision2DecimalType(this IRuleBuilder ruleBuilder) { ruleBuilder.PrecisionScale(13, 2, false); } public static void ScalePrecision8DecimalType(this IRuleBuilder ruleBuilder) { ruleBuilder.PrecisionScale(19, 8, false); } public static void ScalePrecision2DecimalType(this IRuleBuilder ruleBuilder) { ruleBuilder.PrecisionScale(13, 2, false); } public static void ScalePrecisionPercentualeDecimalType(this IRuleBuilder ruleBuilder) { ruleBuilder.PrecisionScale(6, 2, false); } } } ================================================ FILE: Extensions/FatturaElettronicaExtensions.cs ================================================ using System; using System.Collections.Concurrent; using System.Reflection; using FatturaElettronica.Core; using FluentValidation; using FluentValidation.Results; namespace FatturaElettronica.Extensions { public static class FatturaElettronicaExtensions { private static readonly ConcurrentDictionary ValidatorsCache = new(); public static ValidationResult Validate(this T obj) where T : BaseClassSerializable { var t = typeof(T); if(t.GetTypeInfo().IsAbstract) t = obj.GetType(); var name = (t.FullName.Contains("Semplificata") ? "Semplificata." : string.Empty) + t.Name; var validator = ValidatorsCache.GetOrAdd(name, n => { var type = Type.GetType($"FatturaElettronica.Validators.{n}Validator"); return (IValidator)Activator.CreateInstance(type); }); var context = new ValidationContext(obj); return validator.Validate(context); } } } ================================================ FILE: Extensions/FatturaElettronicaFileNameGenerator/FatturaElettronicaFileNameExtensionType.cs ================================================ namespace FatturaElettronica.Extensions { public enum FatturaElettronicaFileNameExtensionType { Plain, Signed } } ================================================ FILE: Extensions/FatturaElettronicaFileNameGenerator/FatturaElettronicaFileNameGenerator.cs ================================================ using FatturaElettronica.Common; using FatturaElettronica.Extensions.Resources; using System; namespace FatturaElettronica.Extensions { /// /// Factory per la creazione del filename /// public class FatturaElettronicaFileNameGenerator { private readonly IdFiscaleIVA _idFiscaleIVA; private readonly FatturaElettronicaFileNameExtensionType _fatturaExtensionType; public FatturaElettronicaFileNameGenerator(IdFiscaleIVA idFiscale, FatturaElettronicaFileNameExtensionType fatturaType = FatturaElettronicaFileNameExtensionType.Plain) { _idFiscaleIVA = idFiscale ?? throw new ArgumentNullException(ErrorMessages.IdFiscaleIsMissing); if (_idFiscaleIVA.IdPaese == null || _idFiscaleIVA.IdPaese.Length < 2) throw new ArgumentException(ErrorMessages.IdPaeseIsWrongOrMissing); if (_idFiscaleIVA.IdCodice == null) throw new ArgumentException(ErrorMessages.IdCodiceIsMissing); _fatturaExtensionType = fatturaType; } /// /// Restituisce il nome del file partendo dall'ultimo numero di fattura staccata /// /// /// public string GetNextFileName(int lastBillingNumber) => $"{_idFiscaleIVA.IdPaese}{_idFiscaleIVA.IdCodice}_{GetNext(lastBillingNumber)}{Extension}"; /// /// Restituisce il nome del file partendo dall'ultimo nome del file generato /// /// /// public string GetNextFileName(string lastBillingNumber) => $"{_idFiscaleIVA.IdPaese}{_idFiscaleIVA.IdCodice}_{GetNext(lastBillingNumber)}{Extension}"; private readonly char[] _baseChars = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z' }; public int? CurrentIndex { get; set; } private string Extension => _fatturaExtensionType == FatturaElettronicaFileNameExtensionType.Plain ? ".xml" : ".xml.p7m"; /// /// Restituisce il Progressivo Invio Successivo /// /// /// private string GetNext(int lastNumber) { CurrentIndex = ++lastNumber; var value = ToString(CurrentIndex.Value); if (value.Length > 5) throw new ArgumentException(ErrorMessages.LastBillingNumberIsTooLong); return value.PadLeft(5, '0'); } /// /// Restituisce il Progressivo Invio Successivo /// /// /// private string GetNext(string lastStringNumber) { return GetNext(ToInteger(lastStringNumber)); } /// /// Da numero a stringa valida /// /// /// private string ToString(int value) { var i = 32; var buffer = new char[i]; var targetBase = _baseChars.Length; do { buffer[--i] = _baseChars[value % targetBase]; value = value / targetBase; } while (value > 0); var result = new char[32 - i]; Array.Copy(buffer, i, result, 0, 32 - i); return new(result); } /// /// Da Stringa valida a numero /// /// /// private int ToInteger(string value) { var k = value.Length - 1; value = Reverse(value); var targetBase = _baseChars.Length; var result = 0; do { for (var j = _baseChars.Length - 1; j > 0; j--) { if (_baseChars[j] != value[k]) continue; result = result + j * (int) Math.Pow(targetBase, k); break; } k--; } while (k >= 0); return result; } /// /// String Reverse /// /// /// private static string Reverse(string s) { var charArray = s.ToCharArray(); Array.Reverse(charArray); return new(charArray); } } } ================================================ FILE: Extensions/HtmlExtensions.cs ================================================ using System; using System.IO; using System.Text; using System.Xml; using System.Xml.XPath; using System.Xml.Xsl; namespace FatturaElettronica.Extensions { public static class HtmlExtensions { public static void WriteHtml(this FatturaBase fattura, string outPath, string xslPath) { if (outPath == null) { throw new ArgumentNullException(nameof(outPath)); } if (xslPath == null) { throw new ArgumentNullException(nameof(xslPath)); } var xt = new XslCompiledTransform(); xt.Load(xslPath); using (var memoryStream = new MemoryStream()) { using (var w = new XmlTextWriter(memoryStream, Encoding.UTF8) {Formatting = Formatting.Indented}) { fattura.WriteXml(w); w.Flush(); memoryStream.Seek(0, SeekOrigin.Begin); var xPathDocument = new XPathDocument(memoryStream); using (var writer = File.OpenWrite(outPath)) { xt.Transform(xPathDocument, null, writer); } } } } } } ================================================ FILE: Extensions/JsonExtensions.cs ================================================ using System.Text; using System.Text.Json; namespace FatturaElettronica.Extensions { public static class JsonExtensions { public static void FromJson(this FatturaBase fattura, string json) { fattura.FromJson(new Utf8JsonReader(Encoding.UTF8.GetBytes(json))); } } } ================================================ FILE: Extensions/Resources/ErrorMessages.Designer.cs ================================================ //------------------------------------------------------------------------------ // // This code was generated by a tool. // Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ namespace FatturaElettronica.Extensions.Resources { using System; [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] public class ErrorMessages { private static System.Resources.ResourceManager resourceMan; private static System.Globalization.CultureInfo resourceCulture; [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] internal ErrorMessages() { } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] public static System.Resources.ResourceManager ResourceManager { get { if (object.Equals(null, resourceMan)) { System.Resources.ResourceManager temp = new System.Resources.ResourceManager("FatturaElettronica.Extensions.Resources.ErrorMessages", typeof(ErrorMessages).Assembly); resourceMan = temp; } return resourceMan; } } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] public static System.Globalization.CultureInfo Culture { get { return resourceCulture; } set { resourceCulture = value; } } public static string FirmaException { get { return ResourceManager.GetString("FirmaException", resourceCulture); } } public static string IdCodiceIsMissing { get { return ResourceManager.GetString("IdCodiceIsMissing", resourceCulture); } } public static string IdFiscaleIsMissing { get { return ResourceManager.GetString("IdFiscaleIsMissing", resourceCulture); } } public static string IdPaeseIsWrongOrMissing { get { return ResourceManager.GetString("IdPaeseIsWrongOrMissing", resourceCulture); } } public static string PfxIsMissing { get { return ResourceManager.GetString("PfxIsMissing", resourceCulture); } } public static string ProgressivoOverflow { get { return ResourceManager.GetString("ProgressivoOverflow", resourceCulture); } } public static string SignatureException { get { return ResourceManager.GetString("SignatureException", resourceCulture); } } public static string LastBillingNumberIsTooLong { get { return ResourceManager.GetString("ProgressivoOverflow", resourceCulture); } } } } ================================================ FILE: Extensions/Resources/ErrorMessages.en.resx ================================================ text/microsoft-resx 1.3 System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 ================================================ FILE: Extensions/Resources/ErrorMessages.resx ================================================  text/microsoft-resx 2.0 System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Impossibile firmare il contenuto del file IdCodice non specificato IdFiscale non specificato IdPaese non specificato oppure errato Il file pfx non esiste Il progressivo è troppo elevato Una firma non corrisponde al certificato contenuto nel file ================================================ FILE: Extensions/SignatureException.cs ================================================ using System; namespace FatturaElettronica.Extensions { public class SignatureException : Exception { public SignatureException(string message) : base(message) { } public SignatureException(string message, Exception innerException) : base(message, innerException) { } } } ================================================ FILE: Extensions/SignedFileExtensions.cs ================================================ using System; using System.IO; using System.Security.Cryptography; using System.Security.Cryptography.Pkcs; using System.Security.Cryptography.X509Certificates; namespace FatturaElettronica.Extensions { public static class SignedFileExtensions { /// /// This method will Read the Signed XML whether it is Base64Encoded or plain /// /// /// /// /// If there is an error validating invoice signature /// If it is dealing with a Base64 input and it fails to decode it" public static void ReadXmlSigned(this FatturaBase fattura, string filePath, bool validateSignature = true) { using var inputStream = new FileStream(filePath, FileMode.Open, FileAccess.Read); using var contentStream = StreamExtensions.PreprocessStreamEncoding(inputStream); ReadXmlSigned(fattura, contentStream, validateSignature); } public static void ReadXmlSignedBase64(this FatturaBase fattura, string filePath, bool validateSignature = true) { ReadXmlSigned(fattura, new MemoryStream(Convert.FromBase64String(File.ReadAllText(filePath))), validateSignature); } public static void ReadXmlSigned(this FatturaBase fattura, Stream stream, bool validateSignature = true) { using var parsed = ParseSignature(stream, validateSignature); fattura.ReadXml(parsed); } /// /// Retrieves the Fattura XML as a Stream from an input Signed content Stream. /// It should be invoked on Signed content that is not base encoded, and supports signature validation /// /// A Signed Content stream /// If we should validate the content matches the signature /// A Stream that can be Read into a Fattura object /// If ValidateSignature is true and the content doesn't match the signature /// If the stream is encoded or there is an error Decoding the signature and ValidateSignature is false public static MemoryStream ParseSignature(Stream stream, bool validateSignature) { var fileContent = ReadAllBytes(stream); var content = new ContentInfo(fileContent); var signedFile = new SignedCms(SubjectIdentifierType.IssuerAndSerialNumber, content, false); try { signedFile.Decode(fileContent); if (validateSignature) { signedFile.CheckSignature(true); } } catch (CryptographicException ce) { throw new SignatureException(Resources.ErrorMessages.SignatureException, ce); } var memoryStream = new MemoryStream(); memoryStream.Write(signedFile.ContentInfo.Content, 0, signedFile.ContentInfo.Content.Length); return memoryStream; static byte[] ReadAllBytes(Stream stream) { if (stream is MemoryStream mem) return mem.ToArray(); using var ms = new MemoryStream(); var buffer = new byte[8192]; int bytesRead; while ((bytesRead = stream.Read(buffer, 0, buffer.Length)) > 0) ms.Write(buffer, 0, bytesRead); return ms.ToArray(); } } public static void WriteXmlSigned(this FatturaBase fattura, string pfxFile, string pfxPassword, string p7mFilePath) { if (!File.Exists(pfxFile)) throw new SignatureException(Resources.ErrorMessages.PfxIsMissing); var cert = new X509Certificate2(pfxFile, pfxPassword); WriteXmlSigned(fattura, cert, p7mFilePath); } public static void WriteXmlSigned(this FatturaBase fattura, X509Certificate2 cert, string p7mFilePath) { var tempFile = Path.GetTempFileName(); if (!p7mFilePath.ToLowerInvariant().EndsWith(".p7m")) p7mFilePath += ".p7m"; try { fattura.WriteXml(tempFile); var content = new ContentInfo(new("1.2.840.113549.1.7.1", "PKCS 7 Data"), File.ReadAllBytes(tempFile)); var signedCms = new SignedCms(SubjectIdentifierType.IssuerAndSerialNumber, content, false); var signer = new CmsSigner(cert) { IncludeOption = X509IncludeOption.EndCertOnly, DigestAlgorithm = new("2.16.840.1.101.3.4.2.1", "SHA256") }; signer.SignedAttributes.Add(new Pkcs9SigningTime(DateTime.Now)); //PKCS7 format signedCms.ComputeSignature(signer, false); var signature = signedCms.Encode(); File.WriteAllBytes(p7mFilePath, signature); } catch (Exception) { throw new SignatureException(Resources.ErrorMessages.FirmaException); } finally { if (File.Exists(tempFile)) File.Delete(tempFile); } } } } ================================================ FILE: Extensions/StreamExtensions.cs ================================================ using System; using System.IO; using System.Text.RegularExpressions; namespace FatturaElettronica.Extensions { public static class StreamExtensions { /// /// This helper performs preliminary checks to determine if content is likely to be Base64 encoded and if it is it attempts to Decode it and returns. /// For better consistency with previous implementations if the input stream Position is not 0 and it is seekable, it will be rewound to Position = 0 /// /// The Stream to be processed /// If the input stream was Base encoded and was successfully decoded it returns a new Stream containing the decoded data. ///Else it rewinds and returns the original stream ///Although unlikely, if provided with an invalid base encoded Stream that still got through the length check and regex it will throw a FormatException public static Stream PreprocessStreamEncoding(Stream fileContents) { ///Previous versions of the library worked independently of the stream position, so we should maintain this behavior where possible if (fileContents.Position != 0 && fileContents.CanSeek) { fileContents.Position = 0; } //Using the full constructor to prevent stream collection using var reader = new StreamReader(fileContents, System.Text.Encoding.UTF8, true, 1024, true); var content = reader.ReadToEnd(); //The length check is a bit faster separate instead of inserted in the regex match if (content.Length % 4 != 0 || !Regex.IsMatch(content, "^[A-Za-z0-9+/]*([AQgw]==|[AEIMQUYcgkosw048]=)?$")) { //Unlikely to be B64,we rewind the stream for caller convenience fileContents.Position = 0; return fileContents; } //Returning a B64Decoded Stream return new MemoryStream(Convert.FromBase64String(content)); } } } ================================================ FILE: Extensions/XmlExtensions.cs ================================================ using System.IO; using System.Xml; namespace FatturaElettronica.Extensions { public static class XmlExtensions { public static void ReadXml(this FatturaBase fattura, string filePath) { using var r = XmlReader.Create(filePath, new() { IgnoreWhitespace = true, IgnoreComments = true, IgnoreProcessingInstructions = true }); fattura.ReadXml(r); } public static void ReadXml(this FatturaBase fattura, Stream stream) { stream.Position = 0; using var r = XmlReader.Create(stream, new() { IgnoreWhitespace = true, IgnoreComments = true, IgnoreProcessingInstructions = true }); fattura.ReadXml(r); } public static void WriteXml(this FatturaBase fattura, string filePath) { using var w = XmlWriter.Create(filePath, new() {Indent = true}); fattura.WriteXml(w); } } } ================================================ FILE: FUNDING.yml ================================================ github: nicolaiarocci ================================================ FILE: FatturaBase.cs ================================================ using System; using System.IO; using System.Security.Cryptography; using System.Text; using System.Xml; using FatturaElettronica.Defaults; using FatturaElettronica.Extensions; using FatturaElettronica.Ordinaria; using BaseClassSerializable = FatturaElettronica.Core.BaseClassSerializable; namespace FatturaElettronica { public abstract class FatturaBase : BaseClassSerializable { static FatturaBase() { Encoding.RegisterProvider(CodePagesEncodingProvider.Instance); } public override void ReadXml(XmlReader r) { r.MoveToContent(); base.ReadXml(r); } public override void WriteXml(XmlWriter w) { w.WriteStartElement(RootElement.Prefix, GetLocalName(), GetNameSpace()); w.WriteAttributeString("versione", GetFormatoTrasmissione()); if (!string.IsNullOrEmpty(SistemaEmittente)) { w.WriteAttributeString("SistemaEmittente", SistemaEmittente); } foreach (var a in RootElement.ExtraAttributes) { w.WriteAttributeString(a.Prefix, a.LocalName, a.ns, a.value); } base.WriteXml(w); w.WriteEndElement(); } public static FatturaBase CreateInstanceFromXml(Stream stream, bool validateSignature = false) { using var contentStream = StreamExtensions.PreprocessStreamEncoding(stream); try { return CreateInstanceFromPlainXml(contentStream); } catch (XmlException) { stream.Position = 0; return CreateInstanceFromXmlSigned(contentStream, validateSignature); } } private static FatturaBase CreateInstanceFromPlainXml(Stream stream) { FatturaBase ret; using (var r = XmlReader.Create(stream, new() { IgnoreWhitespace = true, IgnoreComments = true, IgnoreProcessingInstructions = true })) { while (r.Read() && !r.LocalName.Contains("Fattura")) { } var att = r.GetAttribute("versione"); if (att == FormatoTrasmissione.Semplificata) ret = Semplificata.FatturaSemplificata.CreateInstance(Instance.Semplificata); else ret = FatturaOrdinaria.CreateInstance( att == FormatoTrasmissione.PubblicaAmministrazione ? Instance.PubblicaAmministrazione : Instance.Privati); stream.Position = 0; } using (var r = XmlReader.Create(stream, new() { IgnoreWhitespace = true, IgnoreComments = true, IgnoreProcessingInstructions = true })) { ret.ReadXml(r); } return ret; } private static FatturaBase CreateInstanceFromXmlSigned(Stream stream, bool validateSignature = true) { try { using var parsed = SignedFileExtensions.ParseSignature(stream, validateSignature); var newStream = new MemoryStream(); parsed.WriteTo(newStream); newStream.Position = 0; return CreateInstanceFromXml(newStream); } catch (Exception ex) when (ex is CryptographicException or SignatureException) { stream.Position = 0; return CreateInstanceFromXmlSignedBase64(stream, validateSignature); } } private static FatturaBase CreateInstanceFromXmlSignedBase64(Stream stream, bool validateSignature = true) { byte[] converted; using (var reader = new StreamReader(stream)) { converted = Convert.FromBase64String(reader.ReadToEnd()); } return CreateInstanceFromXmlSigned(new MemoryStream(converted), validateSignature); } protected override void ReadAndHandleXmlStartElement(XmlReader r) { SistemaEmittente = r.GetAttribute("SistemaEmittente"); base.ReadAndHandleXmlStartElement(r); } public string SistemaEmittente { get; set; } public abstract string GetFormatoTrasmissione(); protected abstract string GetLocalName(); protected abstract string GetNameSpace(); } } ================================================ FILE: FatturaElettronica.csproj ================================================  netstandard2.0 true 4.0.7 FatturaElettronica Nicola Iarocci CIR 2000 FatturaElettronica.NET Fattura elettronica per le aziende e la pubblica amministrazione italiana Copyright © CIR2000 2017-2022 https://fatturaelettronicaopensource.org https://github.com/FatturaElettronica/FatturaElettronica.NET LICENSE.txt README.md latest icon.png PublicResXFileCodeGenerator %(Filename).Designer.cs ================================================ FILE: FatturaElettronica.csproj.DotSettings ================================================  True ================================================ FILE: FatturaElettronica.sln ================================================  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 VisualStudioVersion = 15.0.26730.12 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FatturaElettronica", "FatturaElettronica.csproj", "{0A1CFCCB-0061-43E5-8392-C78B4156D2CA}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FatturaElettronica.Test", "Test\FatturaElettronica.Test.csproj", "{C2CAC490-0AF7-4435-8585-03236454FCCB}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Debug|x64 = Debug|x64 Debug|x86 = Debug|x86 Release|Any CPU = Release|Any CPU Release|x64 = Release|x64 Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {0A1CFCCB-0061-43E5-8392-C78B4156D2CA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {0A1CFCCB-0061-43E5-8392-C78B4156D2CA}.Debug|Any CPU.Build.0 = Debug|Any CPU {0A1CFCCB-0061-43E5-8392-C78B4156D2CA}.Debug|x64.ActiveCfg = Debug|Any CPU {0A1CFCCB-0061-43E5-8392-C78B4156D2CA}.Debug|x64.Build.0 = Debug|Any CPU {0A1CFCCB-0061-43E5-8392-C78B4156D2CA}.Debug|x86.ActiveCfg = Debug|Any CPU {0A1CFCCB-0061-43E5-8392-C78B4156D2CA}.Debug|x86.Build.0 = Debug|Any CPU {0A1CFCCB-0061-43E5-8392-C78B4156D2CA}.Release|Any CPU.ActiveCfg = Release|Any CPU {0A1CFCCB-0061-43E5-8392-C78B4156D2CA}.Release|Any CPU.Build.0 = Release|Any CPU {0A1CFCCB-0061-43E5-8392-C78B4156D2CA}.Release|x64.ActiveCfg = Release|Any CPU {0A1CFCCB-0061-43E5-8392-C78B4156D2CA}.Release|x64.Build.0 = Release|Any CPU {0A1CFCCB-0061-43E5-8392-C78B4156D2CA}.Release|x86.ActiveCfg = Release|Any CPU {0A1CFCCB-0061-43E5-8392-C78B4156D2CA}.Release|x86.Build.0 = Release|Any CPU {C2CAC490-0AF7-4435-8585-03236454FCCB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {C2CAC490-0AF7-4435-8585-03236454FCCB}.Debug|Any CPU.Build.0 = Debug|Any CPU {C2CAC490-0AF7-4435-8585-03236454FCCB}.Debug|x64.ActiveCfg = Debug|Any CPU {C2CAC490-0AF7-4435-8585-03236454FCCB}.Debug|x64.Build.0 = Debug|Any CPU {C2CAC490-0AF7-4435-8585-03236454FCCB}.Debug|x86.ActiveCfg = Debug|Any CPU {C2CAC490-0AF7-4435-8585-03236454FCCB}.Debug|x86.Build.0 = Debug|Any CPU {C2CAC490-0AF7-4435-8585-03236454FCCB}.Release|Any CPU.ActiveCfg = Release|Any CPU {C2CAC490-0AF7-4435-8585-03236454FCCB}.Release|Any CPU.Build.0 = Release|Any CPU {C2CAC490-0AF7-4435-8585-03236454FCCB}.Release|x64.ActiveCfg = Release|Any CPU {C2CAC490-0AF7-4435-8585-03236454FCCB}.Release|x64.Build.0 = Release|Any CPU {C2CAC490-0AF7-4435-8585-03236454FCCB}.Release|x86.ActiveCfg = Release|Any CPU {C2CAC490-0AF7-4435-8585-03236454FCCB}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {D75DC96A-3736-41A2-8139-C56A1235CEC7} EndGlobalSection EndGlobal ================================================ FILE: FatturaElettronica.sln.DotSettings ================================================  ABI BIC CAB CAP CF CIG CUP DDT FPA FPR IBAN IVA PEC REA XML ================================================ FILE: LICENSE.txt ================================================ Copyright (c) 2017 by Nicola Iarocci, Gestionali Amica and contributors. See AUTHORS for more details. Some rights reserved. Redistribution and use in source and binary forms of the software as well as documentation, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * The names of the contributors may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE AND DOCUMENTATION IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE AND DOCUMENTATION, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ================================================ FILE: Ordinaria/FatturaElettronicaBody/DatiBeniServizi/AltriDatiGestionali.cs ================================================ using System; using System.Xml; using BaseClassSerializable = FatturaElettronica.Core.BaseClassSerializable; namespace FatturaElettronica.Ordinaria.FatturaElettronicaBody.DatiBeniServizi { /// /// Blocco che consente di inserire, con riferimento ad una linea di dettaglio, diverse tipologie di informazioni utili ai fini /// amministrativi, gestionali, etc. /// public class AltriDatiGestionali : BaseClassSerializable { public AltriDatiGestionali() { } public AltriDatiGestionali(XmlReader r) : base(r) { } /// /// Codice che identifica la tipologia di informazione /// [Core.DataProperty] public string TipoDato { get; set; } /// /// Campo in cui inserire un valore alfanumerico riferito alla tipologia di informazione. /// [Core.DataProperty] public string RiferimentoTesto { get; set; } /// /// Campo in cui inserire un valore numerico riferito alla tipologia di informazione. /// [Core.DataProperty] public decimal? RiferimentoNumero { get; set; } /// /// Campo in cui inserire una data riferita alla tiplogia di informazione. /// [Core.DataProperty] public DateTime? RiferimentoData { get; set; } } } ================================================ FILE: Ordinaria/FatturaElettronicaBody/DatiBeniServizi/CodiceArticolo.cs ================================================ using System.Xml; using BaseClassSerializable = FatturaElettronica.Core.BaseClassSerializable; namespace FatturaElettronica.Ordinaria.FatturaElettronicaBody.DatiBeniServizi { /// /// Eventuale codifica dell'articolo. /// public class CodiceArticolo : BaseClassSerializable { public CodiceArticolo() { } public CodiceArticolo(XmlReader r) : base(r) { } /// /// Indica la tipologia di codice articolo (TARIC, CPV, EAN, SSC, ...) /// [Core.DataProperty] public string CodiceTipo { get; set; } /// /// Indica il valore del codice articolo corrispondente alla tipologia riportata nel campo CodiceTipo. /// [Core.DataProperty] public string CodiceValore { get; set; } } } ================================================ FILE: Ordinaria/FatturaElettronicaBody/DatiBeniServizi/DatiBeniServizi.cs ================================================ using System.Collections.Generic; using System.Xml; using BaseClassSerializable = FatturaElettronica.Core.BaseClassSerializable; namespace FatturaElettronica.Ordinaria.FatturaElettronicaBody.DatiBeniServizi { /// /// Blocco sempre obbligatorio contenente natura, qualità e quantità dei beni / servizi formanti oggetto dell'operazione. /// public class DatiBeniServizi : BaseClassSerializable { /// /// Blocco sempre obbligatorio contenente natura, qualità e quantità dei beni / servizi formanti oggetto dell'operazione. /// public DatiBeniServizi() { DettaglioLinee = new(); DatiRiepilogo = new(); } public DatiBeniServizi(XmlReader r) : base(r) { } /// IMPORTANT /// Each data property must be flagged with the Order attribute or it will be ignored. /// Also, properties must be listed with the precise order in the specification. /// /// Dati generali del documento principale. /// [Core.DataProperty] public List DettaglioLinee { get; set; } /// /// Blocco sempre obbligatorio contenente i dati di riepilogo per ogni aliquota IVA o natura. /// [Core.DataProperty] public List DatiRiepilogo { get; set; } } } ================================================ FILE: Ordinaria/FatturaElettronicaBody/DatiBeniServizi/DatiRiepilogo.cs ================================================ using System.Xml; using BaseClassSerializable = FatturaElettronica.Core.BaseClassSerializable; namespace FatturaElettronica.Ordinaria.FatturaElettronicaBody.DatiBeniServizi { /// /// Blocco sempre obbligatorio contenente i dati di riepilogo per ogni aliquota IVA o natura. /// public class DatiRiepilogo : BaseClassSerializable { public DatiRiepilogo() { } public DatiRiepilogo(XmlReader r) : base(r) { } /// /// Aliquota (%) IVA. /// [Core.DataProperty] public decimal AliquotaIVA { get; set; } /// /// Natura delle operazioni qualora non rientrino tra quelle imponibili. /// [Core.DataProperty] public string Natura { get; set; } /// /// Corrispettivi relativi alle cessioni accessorie (es. imballaggi etc.) qualora presenti. /// [Core.DataProperty] public decimal? SpeseAccessorie { get; set; } /// /// Arrotondamento sull'imponibili o sull'imposta. /// [Core.DataProperty] public decimal? Arrotondamento { get; set; } /// /// Questo valore rappresenta: base imponibile per le operazioni soggette ad IVA; importo, per le operazioni che non /// rientrano tra quelle imponibili. /// [Core.DataProperty] public decimal ImponibileImporto { get; set; } /// /// Imposta risultante dall'applicazione dell'aliquota IVA all'imponibile. /// [Core.DataProperty] public decimal Imposta { get; set; } /// /// Eseigibilità IVA (immediata ai sensi Art. 6 comma 5 del DPR 633 1972, oppure differita). /// [Core.DataProperty] public string EsigibilitaIVA { get; set; } /// /// Norma di riferimento (obbligatoria nei casi in cui Natura è valorizzato). /// [Core.DataProperty] public string RiferimentoNormativo { get; set; } } } ================================================ FILE: Ordinaria/FatturaElettronicaBody/DatiBeniServizi/DettaglioLinee.cs ================================================ using System; using System.Collections.Generic; using System.Xml; using FatturaElettronica.Common; using BaseClassSerializable = FatturaElettronica.Core.BaseClassSerializable; namespace FatturaElettronica.Ordinaria.FatturaElettronicaBody.DatiBeniServizi { /// /// Linee di dettaglio del documento (i campi del blocco si ripetono per ogni riga di dettaglio). /// public class DettaglioLinee : BaseClassSerializable { /// /// Linee di dettaglio del documento (i campi del blocco si ripetono per ogni riga di dettaglio). /// public DettaglioLinee() { CodiceArticolo = new(); ScontoMaggiorazione = new(); AltriDatiGestionali = new(); } public DettaglioLinee(XmlReader r) : base(r) { } /// /// Numero della riga di dettaglio del documento. /// [Core.DataProperty] public int NumeroLinea { get; set; } /// /// Da valorizzare nei soli casi di sconto, premio, abbuono, spesa accessoria. /// [Core.DataProperty] public string TipoCessionePrestazione { get; set; } /// /// Eventuale codifica dell'articolo (la molteplicità N del blocco consente di gestire la presenza di più codifiche). /// [Core.DataProperty] public List CodiceArticolo { get; set; } /// /// Natura e quantità dell'oggetto della cessione/prestazione; può fare anche riferimento ad un precedente documento emesso /// a titolo di anticipo/acconto, nel qual caso il valore del campo PrezzoUnitario e PrezzoTotale sarà negativo. /// [Core.DataProperty] public string Descrizione { get; set; } /// /// Numero di unità cedute / prestate. /// [Core.DataProperty] public decimal? Quantita { get; set; } /// /// Unità di misura riferita alla quantità. /// [Core.DataProperty] public string UnitaMisura { get; set; } /// /// Data iniziale del periodo di riferimento cui si riferisce l'eventuale servizio prestato. /// [Core.DataProperty] public DateTime? DataInizioPeriodo { get; set; } /// /// Data finale del periodo di riferimento cui si riferisce l'eventuale servizio prestato. /// [Core.DataProperty] public DateTime? DataFinePeriodo { get; set; } /// /// Prezzo unitario del bene/servizio; nel caso di beni ceduti a titolo di sconto, premio o abbuono, l'importo indicato rappresenta il "valore normale". /// [Core.DataProperty] public decimal PrezzoUnitario { get; set; } /// /// Eventuale sconto o maggiorazione applicati (la molteciplità N del blocco consente di gestire la presenza di più sconti o /// maggiorazioni a "cascata"). /// [Core.DataProperty] public List ScontoMaggiorazione { get; set; } /// /// Importo totale del bene/servizio (che tiene conto di eventuali sconti/maggiorazioni) IVA esclusa. /// [Core.DataProperty] public decimal PrezzoTotale { get; set; } /// /// Aliquota (%) IVA applicata al bene/servizio. /// [Core.DataProperty] public decimal AliquotaIVA { get; set; } /// /// Da valorizzare solo in caso di cessione/prestazione soggetta a ritenuta di acconto. /// [Core.DataProperty] public string Ritenuta { get; set; } /// /// Natura dell'operazione se non rientra tra quelle imponibili (il campo Aliquota IVA deve essere valorizzato a zero). /// [Core.DataProperty] public string Natura { get; set; } /// /// Codice identificativo ai fini amministrativo-contabili. /// [Core.DataProperty] public string RiferimentoAmministrazione { get; set; } /// /// Blocco che consente di inserire, con riferimento ad una linea di dettaglio, diverse tipologie di informazioni utili ai /// fini amministrativi, gestionali, etc. /// [Core.DataProperty] public List AltriDatiGestionali { get; set; } } } ================================================ FILE: Ordinaria/FatturaElettronicaBody/DatiGenerali/DatiAnagraficiVettore.cs ================================================ using System.Xml; using FatturaElettronica.Common; namespace FatturaElettronica.Ordinaria.FatturaElettronicaBody.DatiGenerali { public class DatiAnagraficiVettore : DatiAnagrafici { public DatiAnagraficiVettore() { } public DatiAnagraficiVettore(XmlReader r) : base(r) { } /// /// Numero identificativo della licenza di guida (es. numero patente). /// [Core.DataProperty] public string NumeroLicenzaGuida { get; set; } } } ================================================ FILE: Ordinaria/FatturaElettronicaBody/DatiGenerali/DatiBollo.cs ================================================ using System.Xml; using BaseClassSerializable = FatturaElettronica.Core.BaseClassSerializable; namespace FatturaElettronica.Ordinaria.FatturaElettronicaBody.DatiGenerali { /// /// Dati relativi al bollo. /// public class DatiBollo : BaseClassSerializable { public DatiBollo() { } public DatiBollo(XmlReader r) : base(r) { } /// IMPORTANT /// Each data property must be flagged with the Order attribute or it will be ignored. /// Also, properties must be listed with the precise order in the specification. /// /// Bollo virtuale. /// [Core.DataProperty] public string BolloVirtuale { get; set; } /// /// Importo del bollo. /// [Core.DataProperty] public decimal? ImportoBollo { get; set; } } } ================================================ FILE: Ordinaria/FatturaElettronicaBody/DatiGenerali/DatiCassaPrevidenziale.cs ================================================ using System.Xml; using BaseClassSerializable = FatturaElettronica.Core.BaseClassSerializable; namespace FatturaElettronica.Ordinaria.FatturaElettronicaBody.DatiGenerali { /// /// Dati relativi alla cassa previdenziale di appartenenza. /// public class DatiCassaPrevidenziale : BaseClassSerializable { public DatiCassaPrevidenziale() { } public DatiCassaPrevidenziale(XmlReader r) : base(r) { } /// IMPORTANT /// Each data property must be flagged with the Order attribute or it will be ignored. /// Also, properties must be listed with the precise order in the specification. /// /// Tipologia della cassa previdenziale di appartenenza. /// [Core.DataProperty] public string TipoCassa { get; set; } /// /// Aliquota (%) del contributo, se previsto, per la cassa di appartenenza. /// [Core.DataProperty] public decimal AlCassa { get; set; } /// /// Importo del contributo per la cassa di appartenenza. /// [Core.DataProperty] public decimal ImportoContributoCassa { get; set; } /// /// Importo sul quale applicare il contributo cassa previdenziale. /// [Core.DataProperty] public decimal ImponibileCassa { get; set; } /// /// Aliquota (%) IVA applicata. /// [Core.DataProperty] public decimal AliquotaIVA { get; set; } /// /// Indica se il contributo cassa è soggetto a ritenuta. /// [Core.DataProperty] public string Ritenuta { get; set; } /// /// Nei casi di Aliquota IVA pari a zero. /// [Core.DataProperty] public string Natura { get; set; } /// /// Codice identificativo ai fini amministrativo-contabili. /// [Core.DataProperty] public string RiferimentoAmministrazione { get; set; } } } ================================================ FILE: Ordinaria/FatturaElettronicaBody/DatiGenerali/DatiContratto.cs ================================================ using System.Xml; namespace FatturaElettronica.Ordinaria.FatturaElettronicaBody.DatiGenerali { /// /// Informazioni relative al contratto. /// public class DatiContratto : Common.DatiDocumento { public DatiContratto() { } public DatiContratto(XmlReader r) : base(r) { } } } ================================================ FILE: Ordinaria/FatturaElettronicaBody/DatiGenerali/DatiConvenzione.cs ================================================ using System.Xml; namespace FatturaElettronica.Ordinaria.FatturaElettronicaBody.DatiGenerali { /// /// Informazioni relative alla convenzione. /// public class DatiConvenzione : Common.DatiDocumento { public DatiConvenzione() { } public DatiConvenzione(XmlReader r) : base(r) { } } } ================================================ FILE: Ordinaria/FatturaElettronicaBody/DatiGenerali/DatiDDT.cs ================================================ using System; using System.Collections.Generic; using System.Xml; using BaseClassSerializable = FatturaElettronica.Core.BaseClassSerializable; namespace FatturaElettronica.Ordinaria.FatturaElettronicaBody.DatiGenerali { /// /// Nei casi di fattura differita per indicare il documento con cui è stato consegnato il bene. /// // ReSharper disable once InconsistentNaming public class DatiDDT : BaseClassSerializable { /// /// Nei casi di fattura differita per indicare il documento con cui è stato consegnato il bene. /// public DatiDDT() { RiferimentoNumeroLinea = new(); } public DatiDDT(XmlReader r) : base(r) { } /// IMPORTANT /// Each data property must be flagged with the Order attribute or it will be ignored. /// Also, properties must be listed with the precise order in the specification. /// /// Numero del documento di trasporto. /// [Core.DataProperty] // ReSharper disable once InconsistentNaming public string NumeroDDT { get; set; } /// /// Data del documento di trasporto. /// [Core.DataProperty] // ReSharper disable once InconsistentNaming public DateTime DataDDT { get; set; } /// /// Linea di dettaglio della fattura cui si riferisce il DDT (non viene valorizzato se il riferimento è all'intera fattura). /// [Core.DataProperty] public List RiferimentoNumeroLinea { get; set; } } } ================================================ FILE: Ordinaria/FatturaElettronicaBody/DatiGenerali/DatiFattureCollegate.cs ================================================ using System.Xml; namespace FatturaElettronica.Ordinaria.FatturaElettronicaBody.DatiGenerali { /// /// Informazioni relative alle fatture precedentemente trasmesse e alle quali si collega il documento presente. /// /// Riguarda i casi di invio di nota di credito e/o fatture di conguaglio a fronte di precedenti fatture di acconto. public class DatiFattureCollegate : Common.DatiDocumento { public DatiFattureCollegate() { } public DatiFattureCollegate(XmlReader r) : base(r) { } } } ================================================ FILE: Ordinaria/FatturaElettronicaBody/DatiGenerali/DatiGenerali.cs ================================================ using System.Collections.Generic; using System.Xml; using BaseClassSerializable = FatturaElettronica.Core.BaseClassSerializable; namespace FatturaElettronica.Ordinaria.FatturaElettronicaBody.DatiGenerali { /// /// Dati generali del documento principale e dati dei documenti correlati. /// public class DatiGenerali : BaseClassSerializable { /// /// Dati generali del documento principale e dati dei documenti correlati. /// public DatiGenerali() { DatiGeneraliDocumento = new(); DatiOrdineAcquisto = new(); DatiContratto = new(); DatiConvenzione = new(); DatiRicezione = new(); DatiFattureCollegate = new(); DatiSAL = new(); DatiDDT = new(); DatiTrasporto = new(); FatturaPrincipale = new(); } public DatiGenerali(XmlReader r) : base(r) { } /// IMPORTANT /// Each data property must be flagged with the Order attribute or it will be ignored. /// Also, properties must be listed with the precise order in the specification. /// /// Dati generali del documento principale. /// [Core.DataProperty] public DatiGeneraliDocumento DatiGeneraliDocumento { get; set; } /// /// Informazioni relative agli ordini di acquisto. /// [Core.DataProperty] public List DatiOrdineAcquisto { get; set; } /// /// Informazioni relative ai contratti. /// [Core.DataProperty] public List DatiContratto { get; set; } /// /// Informazioni relative alle convenzioni. /// [Core.DataProperty] public List DatiConvenzione { get; set; } /// /// Informazioni relative ai dati presenti sul sistema gestionale in uso presso la PA (Agenzie Fiscali) riguardanti la fase di ricezione. /// [Core.DataProperty] public List DatiRicezione { get; set; } /// /// Informazioni relative alle fatture precedentemente trasmesse e alle quali si collega il documento presente. /// Riguarda i casi di invio di nota di credito e/o di fatture di conguaglio a fronte di precedenti fatture di accounto. /// [Core.DataProperty] public List DatiFattureCollegate { get; set; } /// /// Blocco da valorizzare nei casi di fattura per stato di avanzamento. /// [Core.DataProperty] // ReSharper disable once InconsistentNaming public List DatiSAL { get; set; } /// /// Da valorizzarei nei casi di fattura differita per indicare il documento con cui è stato consegnato il bene. /// I campi del blocco possono essere ripetuti se la fattura fa riferimento a più consegne e quindi a più documenti di trasporto. /// [Core.DataProperty] // ReSharper disable once InconsistentNaming public List DatiDDT { get; set; } /// /// Blocco da valorizzare nei casi di fattura accompagnatoria per inserire informazioni relative al trasporto. /// [Core.DataProperty] public DatiTrasporto DatiTrasporto { get; set; } /// /// Da valorizzare nei casi di fatture per operazioni accessorie, emesse dagli autotrasportatori per usufruire delle /// agevolazioni in materia di registrazioni e pagamento dell'IVA. /// [Core.DataProperty] public FatturaPrincipale FatturaPrincipale { get; set; } } } ================================================ FILE: Ordinaria/FatturaElettronicaBody/DatiGenerali/DatiGeneraliDocumento.cs ================================================ using System; using System.Collections.Generic; using System.Xml; using FatturaElettronica.Common; using BaseClassSerializable = FatturaElettronica.Core.BaseClassSerializable; namespace FatturaElettronica.Ordinaria.FatturaElettronicaBody.DatiGenerali { /// /// Dati generali del documento principale ed i dati dei documenti correlati. /// public class DatiGeneraliDocumento : BaseClassSerializable { /// /// Dati generali del documento principale ed i dati dei documenti correlati. /// public DatiGeneraliDocumento() { DatiRitenuta = new(); DatiBollo = new(); DatiCassaPrevidenziale = new(); ScontoMaggiorazione = new(); Causale = new(); } public DatiGeneraliDocumento(XmlReader r) : base(r) { } /// IMPORTANT /// Each data property must be flagged with the Order attribute or it will be ignored. /// Also, properties must be listed with the precise order in the specification. /// /// Dati generali del documento principale. /// [Core.DataProperty] public string TipoDocumento { get; set; } /// /// Codice espresso secondo lo standard ISO 4217 alpha-3:2001 della valuta utilizzata per l'indicazione degli importi. /// [Core.DataProperty] public string Divisa { get; set; } /// /// Data del documento. /// [Core.DataProperty] public DateTime Data { get; set; } /// /// Numero progressivo del documento. /// [Core.DataProperty] public string Numero { get; set; } /// /// Dati della ritenuta. /// [Core.DataProperty] public List DatiRitenuta { get; set; } /// /// Dati del bollo. /// [Core.DataProperty] public DatiBollo DatiBollo { get; set; } /// /// Blocco dati relativi alla cassa previdenziale di appartenenenza. /// [Core.DataProperty] public List DatiCassaPrevidenziale { get; set; } /// /// Eventuali sconti o maggiorazioni applicati sul totale documento. /// [Core.DataProperty] public List ScontoMaggiorazione { get; set; } /// /// Importo totale del documento al netto dell'eventuale sconto e comprensivo di imposta a debito del cessionario /committente. /// [Core.DataProperty] public decimal? ImportoTotaleDocumento { get; set; } /// /// Eventuale arrotondamento sul totale documento (ammette anche il segno negativo). /// [Core.DataProperty] public decimal? Arrotondamento { get; set; } /// /// Descrizione della causale del documento. /// [Core.DataProperty] public List Causale { get; set; } /// /// Indica se il documento è stato emesso secondo modalità e termini stabiliti con decreto ministeriale ai sensi art. 73 /// DPR 633/72 (ciò consente al cedente/prestatore l'emissione nello stesso anno di più documenti aventi lo stesso numero). /// [Core.DataProperty] public string Art73 { get; set; } } } ================================================ FILE: Ordinaria/FatturaElettronicaBody/DatiGenerali/DatiOrdineAcquisto.cs ================================================ using System.Xml; namespace FatturaElettronica.Ordinaria.FatturaElettronicaBody.DatiGenerali { /// /// Informazioni relative all'ordine di acquisto. /// public class DatiOrdineAcquisto : Common.DatiDocumento { public DatiOrdineAcquisto() { } public DatiOrdineAcquisto(XmlReader r) : base(r) { } } } ================================================ FILE: Ordinaria/FatturaElettronicaBody/DatiGenerali/DatiRicezione.cs ================================================ using System.Xml; namespace FatturaElettronica.Ordinaria.FatturaElettronicaBody.DatiGenerali { /// /// Informazioni relative ai dati presenti sul sistema gestionale in uso presso la PA (Agenzie Fiscali) riguardanti la fase di ricezione. /// public class DatiRicezione : Common.DatiDocumento { public DatiRicezione() { } public DatiRicezione(XmlReader r) : base(r) { } } } ================================================ FILE: Ordinaria/FatturaElettronicaBody/DatiGenerali/DatiRitenuta.cs ================================================ using System.Xml; using BaseClassSerializable = FatturaElettronica.Core.BaseClassSerializable; namespace FatturaElettronica.Ordinaria.FatturaElettronicaBody.DatiGenerali { /// /// Dati relativi alla ritenuta. /// public class DatiRitenuta : BaseClassSerializable { public DatiRitenuta() { } public DatiRitenuta(XmlReader r) : base(r) { } /// IMPORTANT /// Each data property must be flagged with the Order attribute or it will be ignored. /// Also, properties must be listed with the precise order in the specification. /// /// Tipologia della ritenuta. /// [Core.DataProperty] public string TipoRitenuta { get; set; } /// /// Importo dellla ritenuta. /// [Core.DataProperty] public decimal ImportoRitenuta { get; set; } /// /// Aliquota (%) della ritenuta. /// [Core.DataProperty] public decimal AliquotaRitenuta { get; set; } /// /// Causale del pagamento (quella del modello 770). /// [Core.DataProperty] public string CausalePagamento { get; set; } } } ================================================ FILE: Ordinaria/FatturaElettronicaBody/DatiGenerali/DatiSAL.cs ================================================ using System.Xml; using BaseClassSerializable = FatturaElettronica.Core.BaseClassSerializable; namespace FatturaElettronica.Ordinaria.FatturaElettronicaBody.DatiGenerali { /// /// Da valorizzare nei casi di fattura per stato di avanzamento. /// // ReSharper disable once InconsistentNaming public class DatiSAL : BaseClassSerializable { public DatiSAL() { } public DatiSAL(XmlReader r) : base(r) { } /// IMPORTANT /// Each data property must be flagged with the Order attribute or it will be ignored. /// Also, properties must be listed with the precise order in the specification. /// /// Fase dello stato di avanzamento cui il documento si riferisce. /// [Core.DataProperty] public int RiferimentoFase { get; set; } } } ================================================ FILE: Ordinaria/FatturaElettronicaBody/DatiGenerali/DatiTrasporto.cs ================================================ using System; using System.Xml; using BaseClassSerializable = FatturaElettronica.Core.BaseClassSerializable; namespace FatturaElettronica.Ordinaria.FatturaElettronicaBody.DatiGenerali { /// /// Da valorizzare nel caso di fattura accompagnatoria per inserire informazioni relative al trasporto. /// public class DatiTrasporto : BaseClassSerializable { /// /// Da valorizzare nel caso di fattura accompagnatoria per inserire informazioni relative al trasporto. /// public DatiTrasporto() { DatiAnagraficiVettore = new(); IndirizzoResa = new(); } public DatiTrasporto(XmlReader r) : base(r) { } /// IMPORTANT /// Each data property must be flagged with the Order attribute or it will be ignored. /// Also, properties must be listed with the precise order in the specification. /// /// Dati fiscali e anagrafici del vettore. /// [Core.DataProperty] public DatiAnagraficiVettore DatiAnagraficiVettore { get; set; } /// /// Mezzo utilizzato per il trasporto. /// [Core.DataProperty] public string MezzoTrasporto { get; set; } /// /// Causale del trasporto. /// [Core.DataProperty] public string CausaleTrasporto { get; set; } /// /// Numero dei colli trasportati. /// [Core.DataProperty] public int? NumeroColli { get; set; } /// /// Descrizione (natura, qualità, aspetto...) relativa ai colli trasportati. /// [Core.DataProperty] public string Descrizione { get; set; } /// /// Unità di misura riferita al peso della merce. /// [Core.DataProperty] public string UnitaMisuraPeso { get; set; } /// /// Peso lordo della merce. /// [Core.DataProperty] public decimal? PesoLordo { get; set; } /// /// Peso netto della merce. /// [Core.DataProperty] public decimal? PesoNetto { get; set; } /// /// Data e ora del ritiro della merce. /// [Core.DataProperty] [Core.IgnoreXmlDateFormat] public DateTime? DataOraRitiro { get; set; } /// /// Data e ora del trasporto. /// [Core.DataProperty] public DateTime? DataInizioTrasporto { get; set; } /// /// Codifica del termine di resa espresso secondo lo standard ICC-Camera di Commercio Internazionale (Incoterms). /// [Core.DataProperty] public string TipoResa { get; set; } /// /// Indirizzo di resa. /// [Core.DataProperty] public IndirizzoResa IndirizzoResa { get; set; } /// /// Data e ora della consegna della merce. /// [Core.DataProperty] [Core.IgnoreXmlDateFormat] public DateTime? DataOraConsegna { get; set; } } } ================================================ FILE: Ordinaria/FatturaElettronicaBody/DatiGenerali/FatturaPrincipale.cs ================================================ using System; using System.Xml; using BaseClassSerializable = FatturaElettronica.Core.BaseClassSerializable; namespace FatturaElettronica.Ordinaria.FatturaElettronicaBody.DatiGenerali { /// /// Da valorizzare nei casi di fatture per operazione accessorie, emesse dagli autotraportatori per usufruire delle /// agevolazioni in mteria di registrazione e pagamento IVA. /// public class FatturaPrincipale : BaseClassSerializable { public FatturaPrincipale() { } public FatturaPrincipale(XmlReader r) : base(r) { } /// IMPORTANT /// Each data property must be flagged with the Order attribute or it will be ignored. /// Also, properties must be listed with the precise order in the specification. /// /// Numero della fattura relativa al trasporto di beni, da indicare sulle fatture emesse dagli autotrasportatori per /// certificare le operazioni accessorie. /// [Core.DataProperty] public string NumeroFatturaPrincipale { get; set; } /// /// Data della fattura relativa al trasporto di beni. /// [Core.DataProperty] public DateTime? DataFatturaPrincipale { get; set; } } } ================================================ FILE: Ordinaria/FatturaElettronicaBody/DatiGenerali/IndirizzoResa.cs ================================================ using System.Xml; namespace FatturaElettronica.Ordinaria.FatturaElettronicaBody.DatiGenerali { public class IndirizzoResa : Common.Località { public IndirizzoResa() { } public IndirizzoResa(XmlReader r) : base(r) { } } } ================================================ FILE: Ordinaria/FatturaElettronicaBody/DatiPagamento/DatiPagamento.cs ================================================ using System.Collections.Generic; using System.Xml; using BaseClassSerializable = FatturaElettronica.Core.BaseClassSerializable; namespace FatturaElettronica.Ordinaria.FatturaElettronicaBody.DatiPagamento { /// /// Dati relativi al pagamento. /// public class DatiPagamento : BaseClassSerializable { /// /// Dati relativi al pagamento. /// public DatiPagamento() { DettaglioPagamento = new(); } public DatiPagamento(XmlReader r) : base(r) { } /// /// Condizioni di pagamento. /// [Core.DataProperty] public string CondizioniPagamento { get; set; } /// /// Dati di dettaglio del pagamento. /// [Core.DataProperty] public List DettaglioPagamento { get; set; } } } ================================================ FILE: Ordinaria/FatturaElettronicaBody/DatiPagamento/DettaglioPagamento.cs ================================================ using System; using System.Xml; using BaseClassSerializable = FatturaElettronica.Core.BaseClassSerializable; namespace FatturaElettronica.Ordinaria.FatturaElettronicaBody.DatiPagamento { /// /// Dati di dettaglio del pagamento. /// public class DettaglioPagamento : BaseClassSerializable { public DettaglioPagamento() { } public DettaglioPagamento(XmlReader r) : base(r) { } /// /// Beneficiario del pagamento (utilizzabile se si intende indicare un beneficiario diverso dal cedente/prestatore). /// [Core.DataProperty] public string Beneficiario { get; set; } /// /// Modalità di pagamento. /// [Core.DataProperty] public string ModalitaPagamento { get; set; } /// /// Data dalla quale decorrono i termini di pagamento. /// [Core.DataProperty] public DateTime? DataRiferimentoTerminiPagamento { get; set; } /// /// Termini di pagamento espressi in giorni a partire dalla data di riferimento di cui al campo DataRiferimentoTerminiPagamento. /// Vale 0 per i gamenti a vista. /// [Core.DataProperty] public int? GiorniTerminiPagamento { get; set; } /// /// Data di scadenza del pagamento da indicare nei casi in cui ha senso sulla base delle condizioni di pagamento /// previste. /// [Core.DataProperty] public DateTime? DataScadenzaPagamento { get; set; } /// /// Importo relativo al pagamento. /// [Core.DataProperty] public decimal ImportoPagamento { get; set; } /// /// Nei casi di modalità di pagamento in cui ha senso l'indicazione dellìufficio postale. /// [Core.DataProperty] public string CodUfficioPostale { get; set; } /// /// Cognome del quietanziante (nel caso di campo ModalitaPagamento = MP04). /// [Core.DataProperty] public string CognomeQuietanzante { get; set; } /// /// Nome del quietanziante (nel caso di campo ModalitaPagamento = MP04). /// [Core.DataProperty] public string NomeQuietanzante { get; set; } /// /// Codice fiscale del quietanziante (nel caso di campo ModalitaPagamento = MP04). /// [Core.DataProperty] // ReSharper disable once InconsistentNaming public string CFQuietanzante { get; set; } /// /// Titolo del quietanziante (nel caso di campo ModalitaPagamento = MP04). /// [Core.DataProperty] public string TitoloQuietanzante { get; set; } /// /// Nome dell'istituto finanziario. /// [Core.DataProperty] public string IstitutoFinanziario { get; set; } /// /// International Bank Account Number (coordinata bancaria internazionale che consente di identificare, in maniera standard, /// il conto corrente del beneficiario). /// [Core.DataProperty] // ReSharper disable once InconsistentNaming public string IBAN { get; set; } /// /// Codice ABI. /// [Core.DataProperty] // ReSharper disable once InconsistentNaming public string ABI { get; set; } /// /// Codice CAB. /// [Core.DataProperty] // ReSharper disable once InconsistentNaming public string CAB { get; set; } /// /// Bank Identifier Code (codice che identifica la banca del destinatario). /// [Core.DataProperty] // ReSharper disable once InconsistentNaming public string BIC { get; set; } /// /// Ammontare dello sconto per pagamento anticipato. /// [Core.DataProperty] public decimal? ScontoPagamentoAnticipato { get; set; } /// /// Data limite stabilita per il pagamento anticipato. /// [Core.DataProperty] public DateTime? DataLimitePagamentoAnticipato { get; set; } /// /// Ammontare della penalità dovuta per pagamenti ritardati. /// [Core.DataProperty] public decimal? PenalitaPagamentiRitardati { get; set; } /// /// Data di decorrenza della penale. /// [Core.DataProperty] public DateTime? DataDecorrenzaPenale { get; set; } /// /// Codice per la riconciliazione degli incassi da parte del cedente/prestatore. /// [Core.DataProperty] public string CodicePagamento { get; set; } } } ================================================ FILE: Ordinaria/FatturaElettronicaBody/DatiVeicoli/DatiVeicoli.cs ================================================ using System; using System.Xml; using BaseClassSerializable = FatturaElettronica.Core.BaseClassSerializable; namespace FatturaElettronica.Ordinaria.FatturaElettronicaBody.DatiVeicoli { /// /// Dati relativi ai veicoli di cui all'art. 38 comma 4 del ddl 331 del 1993. /// public class DatiVeicoli : BaseClassSerializable { public DatiVeicoli() { } public DatiVeicoli(XmlReader r) : base(r) { } /// /// Data di prima immatricolazione o iscrizione nei pubblici registri. /// [Core.DataProperty] public DateTime? Data { get; set; } /// /// Totale chilometri percorsi, oppure totale ora navigate o volate. /// [Core.DataProperty] public string TotalePercorso { get; set; } } } ================================================ FILE: Ordinaria/FatturaElettronicaBody/FatturaElettronicaBody.cs ================================================ using System.Collections.Generic; using System.Xml; using FatturaElettronica.Common; using BaseClassSerializable = FatturaElettronica.Core.BaseClassSerializable; namespace FatturaElettronica.Ordinaria.FatturaElettronicaBody { public class FatturaElettronicaBody : BaseClassSerializable { /// /// FatturaOrdinaria inclusa nella conunicazione. /// public FatturaElettronicaBody() { DatiGenerali = new(); DatiBeniServizi = new(); DatiVeicoli = new(); DatiPagamento = new(); Allegati = new(); } public FatturaElettronicaBody(XmlReader r) : base(r) { } /// /// Dati generali del documento principale. /// [Core.DataProperty] public DatiGenerali.DatiGenerali DatiGenerali { get; set; } /// /// Blocco sempre obbligatorio contenente natura qualità e quantità dei beni/servizi oggetto dell'operazione. /// [Core.DataProperty] public DatiBeniServizi.DatiBeniServizi DatiBeniServizi { get; set; } /// /// Dati relativi ai veicoli di cui all'art. 38 del dl 331 del 1993. /// [Core.DataProperty] public DatiVeicoli.DatiVeicoli DatiVeicoli { get; set; } /// /// Dati relativi al pagamento. /// [Core.DataProperty] public List DatiPagamento { get; set; } /// /// Dati relativi ad eventuali allegati. /// [Core.DataProperty] public List Allegati { get; set; } } } ================================================ FILE: Ordinaria/FatturaElettronicaHeader/CedentePrestatore/CedentePrestatore.cs ================================================ using System.Xml; using FatturaElettronica.Common; using BaseClassSerializable = FatturaElettronica.Core.BaseClassSerializable; namespace FatturaElettronica.Ordinaria.FatturaElettronicaHeader.CedentePrestatore { /// /// Dati relativi al cedente / prestatore. /// public class CedentePrestatore : BaseClassSerializable { /// /// Dati relativi al cedente / prestatore. /// public CedentePrestatore() { DatiAnagrafici = new(); Sede = new(); StabileOrganizzazione = new(); IscrizioneREA = new(); Contatti = new(); } public CedentePrestatore(XmlReader r) : base(r) { } /// IMPORTANT /// Each data property must be flagged with the Order attribute or it will be ignored. /// Also, properties must be listed with the precise order in the specification. /// /// Dati anagrafici, professionali e fiscali del cedente / prestatore. /// [Core.DataProperty] public DatiAnagraficiCedentePrestatore DatiAnagrafici { get; set; } /// /// Dati della sede del cedente / prestatore. /// [Core.DataProperty] public SedeCedentePrestatore Sede { get; set; } /// /// Nei casi di cedente / prestatore non residente. /// [Core.DataProperty] public StabileOrganizzazione StabileOrganizzazione { get; set; } /// /// Nei casi di società iscritte nel registro delle imprese ai sensi dell'art. 2250 del codice civile. /// [Core.DataProperty] public IscrizioneREA IscrizioneREA { get; set; } /// /// Contatti del cedente / prestatore. /// [Core.DataProperty] public Contatti Contatti { get; set; } /// /// Codice identificativo del cedente / prestatore a fini amministrativi-contabili. /// [Core.DataProperty] public string RiferimentoAmministrazione { get; set; } } } ================================================ FILE: Ordinaria/FatturaElettronicaHeader/CedentePrestatore/Contatti.cs ================================================ using System.Xml; using BaseClassSerializable = FatturaElettronica.Core.BaseClassSerializable; namespace FatturaElettronica.Ordinaria.FatturaElettronicaHeader.CedentePrestatore { /// /// Represents a Contatti object /// public class Contatti : BaseClassSerializable { public Contatti() { } public Contatti(XmlReader r) : base(r) { } //public override string XmlName { get { return "Contatti"; } } /// /// Contatto telefonico fisso o mobile. /// [Core.DataProperty] public string Telefono { get; set; } /// /// Numero di fax. /// [Core.DataProperty] public string Fax { get; set; } /// /// Indirizzo di posta elettronica. /// [Core.DataProperty] public string Email { get; set; } } } ================================================ FILE: Ordinaria/FatturaElettronicaHeader/CedentePrestatore/DatiAnagraficiCedentePrestatore.cs ================================================ using System; using System.Xml; using FatturaElettronica.Common; namespace FatturaElettronica.Ordinaria.FatturaElettronicaHeader.CedentePrestatore { public class DatiAnagraficiCedentePrestatore : DatiAnagrafici { /// /// Dati anagrafici, professionali e fiscali del cedente / prestatore. /// public DatiAnagraficiCedentePrestatore() { } public DatiAnagraficiCedentePrestatore(XmlReader r) : base(r) { } /// /// Nome dell'albo professionale. /// [Core.DataProperty (order:10)] public string AlboProfessionale { get; set; } /// /// Sigla della provincia di competenza dell'albo professionale. /// [Core.DataProperty (order:11)] public string ProvinciaAlbo { get; set; } /// /// Numero di iscrizione all'albo professionale. /// [Core.DataProperty (order:12)] public string NumeroIscrizioneAlbo { get; set; } /// /// Data di iscrizione all'albo professionale. /// [Core.DataProperty (order:13)] public DateTime? DataIscrizioneAlbo { get; set; } /// /// Regime fiscale. /// [Core.DataProperty (order:14)] public string RegimeFiscale { get; set; } } } ================================================ FILE: Ordinaria/FatturaElettronicaHeader/CedentePrestatore/IscrizioneRea.cs ================================================ using System.Xml; using BaseClassSerializable = FatturaElettronica.Core.BaseClassSerializable; namespace FatturaElettronica.Ordinaria.FatturaElettronicaHeader.CedentePrestatore { /// /// Represents a DatiAnagrafici object /// public class IscrizioneREA : BaseClassSerializable { public IscrizioneREA() { } public IscrizioneREA(XmlReader r) : base(r) { } /// /// Sigla della provincia dell'Ufficio del registro delle imprese presso il quale è registata la società. /// [Core.DataProperty] public string Ufficio { get; set; } /// /// Numero di iscrizione al registro delle imprese. /// [Core.DataProperty] // ReSharper disable once InconsistentNaming public string NumeroREA { get; set; } /// /// Nei soli casi di società di capitali (Spa, SApA, SRL), il campo va valorizzato per indicare il capitale sociale. /// [Core.DataProperty] public decimal? CapitaleSociale { get; set; } /// /// Nei soli casi di SRL, il campo va valorizzato per indicare se vi è un socio unico oppure se vi sono più soci. /// [Core.DataProperty] public string SocioUnico { get; set; } /// /// Indica se la Società si trova in stato di liquidazione oppure no. /// [Core.DataProperty] public string StatoLiquidazione { get; set; } } } ================================================ FILE: Ordinaria/FatturaElettronicaHeader/CedentePrestatore/SedeCedentePrestatore.cs ================================================ using System.Xml; namespace FatturaElettronica.Ordinaria.FatturaElettronicaHeader.CedentePrestatore { public class SedeCedentePrestatore : Common.Località { public SedeCedentePrestatore() { } public SedeCedentePrestatore(XmlReader r) : base(r) { } } } ================================================ FILE: Ordinaria/FatturaElettronicaHeader/CessionarioCommittente/CessionarioCommittente.cs ================================================ using System.Xml; using FatturaElettronica.Common; using BaseClassSerializable = FatturaElettronica.Core.BaseClassSerializable; namespace FatturaElettronica.Ordinaria.FatturaElettronicaHeader.CessionarioCommittente { /// /// Dati relativi al cessionario/ committente. /// public class CessionarioCommittente : BaseClassSerializable { /// /// Dati relativi al cessionario / committente. /// public CessionarioCommittente() { DatiAnagrafici = new(); Sede = new(); StabileOrganizzazione = new(); RappresentanteFiscale = new(); } public CessionarioCommittente(XmlReader r) : base(r) { } /// IMPORTANT /// Each data property must be flagged with the Order attribute or it will be ignored. /// Also, properties must be listed with the precise order in the specification. /// /// Dati anagrafici, professionali e fiscali del cessionario / committente. /// [Core.DataProperty] public DatiAnagraficiCessionarioCommittente DatiAnagrafici { get; set; } /// /// Dati della sede del cessionario / committente. /// [Core.DataProperty] public SedeCessionarioCommittente Sede { get; set; } /// /// Blocco da valorizzare se e solo se l'elemento informativo 1.1.3 FormatoTrasmissione = "FPR12" (fattura tra privati), nel caso di cessionario/committente non residente e con stabile organizzazione in Italia. /// [Core.DataProperty] public StabileOrganizzazione StabileOrganizzazione { get; set; } /// /// Blocco da valorizzare se e solo se l'elemento informativo 1.1.3 FormatoTrasmissione = "FPR12" (fattura tra privati), nel caso di cessionario/committente che si avvale di rappresentante fiscale in Italia. /// [Core.DataProperty] public RappresentanteFiscaleCessionarioCommittente RappresentanteFiscale { get; set; } } } ================================================ FILE: Ordinaria/FatturaElettronicaHeader/CessionarioCommittente/DatiAnagraficiCessionarioCommittente.cs ================================================ using System.Xml; using FatturaElettronica.Common; namespace FatturaElettronica.Ordinaria.FatturaElettronicaHeader.CessionarioCommittente { public class DatiAnagraficiCessionarioCommittente : DatiAnagrafici { /// /// Dati anagrafici, professionali e fiscali del cessionario / committente. /// public DatiAnagraficiCessionarioCommittente() { } public DatiAnagraficiCessionarioCommittente(XmlReader r) : base(r) { } } } ================================================ FILE: Ordinaria/FatturaElettronicaHeader/CessionarioCommittente/RappresentanteFiscaleCessionarioCommittente.cs ================================================ using System.Xml; using FatturaElettronica.Common; namespace FatturaElettronica.Ordinaria.FatturaElettronicaHeader.CessionarioCommittente { /// /// Represents a CessionarioCommittente.RappresentanteFiscale object. /// public class RappresentanteFiscaleCessionarioCommittente : DenominazioneNomeCognome { public RappresentanteFiscaleCessionarioCommittente() { IdFiscaleIVA = new(); } public RappresentanteFiscaleCessionarioCommittente(XmlReader r) : base(r) { } /// /// Numero di identificazione fiscale ai fini IVA; i primi due caratteri rappresentano il paese ed i restanti il codice /// vero e proprio che, per i residenti in Italia, corrisponde al numero di partita IVA. /// [Core.DataProperty(order: -1)] public IdFiscaleIVA IdFiscaleIVA { get; set; } } } ================================================ FILE: Ordinaria/FatturaElettronicaHeader/CessionarioCommittente/SedeCessionarioCommittente.cs ================================================ using System.Xml; namespace FatturaElettronica.Ordinaria.FatturaElettronicaHeader.CessionarioCommittente { public class SedeCessionarioCommittente : Common.Località { public SedeCessionarioCommittente() { } public SedeCessionarioCommittente(XmlReader r) : base(r) { } } } ================================================ FILE: Ordinaria/FatturaElettronicaHeader/DatiTrasmissione/ContattiTrasmittente.cs ================================================ using System.Xml; using BaseClassSerializable = FatturaElettronica.Core.BaseClassSerializable; namespace FatturaElettronica.Ordinaria.FatturaElettronicaHeader.DatiTrasmissione { /// /// Represents a ContattiTrasmittente object /// public class ContattiTrasmittente : BaseClassSerializable { public ContattiTrasmittente() { } public ContattiTrasmittente(XmlReader r) : base(r) { } /// /// Contatto telefonico fisso o mobile. /// [Core.DataProperty] public string Telefono { get; set; } /// /// Indirizzo di posta elettronica. /// [Core.DataProperty] public string Email { get; set; } } } ================================================ FILE: Ordinaria/FatturaElettronicaHeader/DatiTrasmissione/DatiTrasmissione.cs ================================================ using System.Xml; using BaseClassSerializable = FatturaElettronica.Core.BaseClassSerializable; namespace FatturaElettronica.Ordinaria.FatturaElettronicaHeader.DatiTrasmissione { /// /// Informazioni che identificano univocamente il soggetto che trasmette, il documento trasmesso, /// il formato in cui è stato trasmesso il documento, il soggetto destinatario. /// public class DatiTrasmissione : BaseClassSerializable { /// /// Constructor. /// public DatiTrasmissione() { ContattiTrasmittente = new(); IdTrasmittente = new(); } public DatiTrasmissione(XmlReader r) : base(r) { } /// IMPORTANT /// Each data property must be flagged with the Order attribute or it will be ignored. /// Also, properties must be listed with the precise order in the specification. /// /// Identificativo univoco del soggetto trasmittente. /// [Core.DataProperty] public IdTrasmittente IdTrasmittente { get; set; } /// /// Progressivo univoco, attribuito dal soggetto che trasmette, relativo ad ogni singolo documento fattura. /// [Core.DataProperty] public string ProgressivoInvio { get; set; } /// /// Codice identificativo del formato/versione con cui è stato trasmesso il documento fattura. /// [Core.DataProperty] public string FormatoTrasmissione { get; set; } /// /// Codice dell'ufficio dell'amministrazione dello stato destinatario della fattura, definito dall'amministrazione /// di appartenenza come riportato nella rubrica "Indice PA". /// [Core.DataProperty] public string CodiceDestinatario { get; set; } /// /// Dati relativi ai contatti del trasmittente. /// [Core.DataProperty] public ContattiTrasmittente ContattiTrasmittente { get; set; } /// /// Inidirizzo PEC al quale inviare il documento. /// [Core.DataProperty] public string PECDestinatario { get; set; } } } ================================================ FILE: Ordinaria/FatturaElettronicaHeader/DatiTrasmissione/IdTrasmittente.cs ================================================ using System.Xml; using FatturaElettronica.Common; namespace FatturaElettronica.Ordinaria.FatturaElettronicaHeader.DatiTrasmissione { public class IdTrasmittente : IdFiscaleIVA { public IdTrasmittente() { } public IdTrasmittente(XmlReader r) : base(r) { } } } ================================================ FILE: Ordinaria/FatturaElettronicaHeader/FatturaElettronicaHeader.cs ================================================ using System.Text.Json.Serialization; using System.Xml; using System.Xml.Serialization; namespace FatturaElettronica.Ordinaria.FatturaElettronicaHeader { public class FatturaElettronicaHeader : Core.BaseClassSerializable { /// /// Intestazione della FatturaOrdinaria Elettronica. /// public FatturaElettronicaHeader() { DatiTrasmissione = new(); CedentePrestatore = new(); Rappresentante = new(); CessionarioCommittente = new(); TerzoIntermediarioOSoggettoEmittente = new(); } public FatturaElettronicaHeader(XmlReader r) : base(r) { } /// IMPORTANT /// Each data property must be flagged with the Order attribute or it will be ignored. /// Also, properties must be listed with the precise order in the specification. /// /// Informazioni che identificano univocamente il soggetto che trasmette, il documento trasmesso, /// il formato in cui è stato trasmesso il documento, il soggetto destinatario. /// [Core.DataProperty] public DatiTrasmissione.DatiTrasmissione DatiTrasmissione { get; set; } /// /// Dati relativi al cedente / prestatore. /// [Core.DataProperty] public CedentePrestatore.CedentePrestatore CedentePrestatore { get; set; } /// /// Dati relativi al rappresentante fiscale del cedente / prestatore. /// [Core.DataProperty] [XmlElement(ElementName = "RappresentanteFiscale")] [JsonPropertyName("RappresentanteFiscale")] public RappresentanteFiscale.RappresentanteFiscale Rappresentante { get; set; } /// /// Dati relativi al cessionario / committente /// [Core.DataProperty] public CessionarioCommittente.CessionarioCommittente CessionarioCommittente { get; set; } /// /// Dati relativi al soggetto che emette fattura per conto del cedente / prestatore. /// [Core.DataProperty] public TerzoIntermediarioOSoggettoEmittente.TerzoIntermediarioOSoggettoEmittente TerzoIntermediarioOSoggettoEmittente { get; set; } /// /// Nei casi di documenti emessi da un soggetto diverso dal cedente / prestatore, indica se la fattura sia stata /// emessa o da parte del cessionario / committente oppure da parte di un terzo per conto del cedente / prestatore. /// [Core.DataProperty] public string SoggettoEmittente { get; set; } } } ================================================ FILE: Ordinaria/FatturaElettronicaHeader/RappresentanteFiscale/RappresentanteFiscale.cs ================================================ namespace FatturaElettronica.Ordinaria.FatturaElettronicaHeader.RappresentanteFiscale { /// /// Dati relativi al rappresentante fiscale del cedente / prestatore. /// public class RappresentanteFiscale : Common.RappresentanteFiscale { } } ================================================ FILE: Ordinaria/FatturaElettronicaHeader/TerzoIntermediarioOSoggettoEmittente/TerzoIntermediarioOSoggettoEmittente.cs ================================================ namespace FatturaElettronica.Ordinaria.FatturaElettronicaHeader.TerzoIntermediarioOSoggettoEmittente { /// /// Dati relativi al soggetto terzo che emette fattura per conto del cedente / prestatore. /// public class TerzoIntermediarioOSoggettoEmittente : Common.RappresentanteFiscale { } } ================================================ FILE: Ordinaria/FatturaOrdinaria.cs ================================================ using System.Collections.Generic; using FatturaElettronica.Defaults; namespace FatturaElettronica.Ordinaria { public class FatturaOrdinaria : FatturaBase { public FatturaOrdinaria() { FatturaElettronicaHeader = new(); FatturaElettronicaBody = new(); } public static FatturaOrdinaria CreateInstance(Instance formato) { var fattura = new FatturaOrdinaria(); switch (formato) { case Instance.PubblicaAmministrazione: fattura.FatturaElettronicaHeader.DatiTrasmissione.FormatoTrasmissione = FormatoTrasmissione.PubblicaAmministrazione; break; case Instance.Privati: fattura = new(); fattura.FatturaElettronicaHeader.DatiTrasmissione.FormatoTrasmissione = FormatoTrasmissione.Privati; fattura.FatturaElettronicaHeader.DatiTrasmissione.CodiceDestinatario = new('0', 7); break; } return fattura; } public override string GetFormatoTrasmissione() { return FatturaElettronicaHeader.DatiTrasmissione.FormatoTrasmissione; } protected override string GetLocalName() { return "FatturaElettronica"; } protected override string GetNameSpace() { return "http://ivaservizi.agenziaentrate.gov.it/docs/xsd/fatture/v1.2"; } /// IMPORTANT /// Each data property must be flagged with the Order attribute or it will be ignored. /// Also, properties must be listed with the precise order in the specification. /// /// Intestazione della comunicazione. /// [Core.DataProperty] public FatturaElettronicaHeader.FatturaElettronicaHeader FatturaElettronicaHeader { get; set; } /// /// Lotto di fatture incluse nella comunicazione. /// /// Il blocco ha molteciplità 1 nel caso di fattura singola; nel caso di lotto di fatture, si ripete /// per ogni fattura componente il lotto stesso. [Core.DataProperty] public List FatturaElettronicaBody { get; set; } } } ================================================ FILE: README.md ================================================ # Fattura Elettronica per .NET ![Test](https://github.com/FatturaElettronica/FatturaElettronica.NET/workflows/Test/badge.svg) [![NuGet version](https://badge.fury.io/nu/FatturaElettronica.svg)](https://badge.fury.io/nu/FatturaElettronica) ## Caratteristiche - Lettura e scrittura nel formato XML conforme alle [specifiche tecniche ufficiali][pa]. - Convalida offline in osservanza alle specifiche tecniche. - Fatture elettroniche ordinarie. - Fatture elettroniche semplificate. - De/serializzazione JSON. - Supporto multi-lingua. - Compatibile con [NET Standard v2.0][netstandard]. ## Installazione FatturaElettronica è su [NuGet][nuget]. Dalla command line, con .NET Core: ```Shell dotnet add package FatturaElettronica ``` Dalla Package Console, in Visual Studio: ```PowerShell PM> Install-Package FatturaElettronica ``` Oppure usare il comando equivalente nella UI di Visual Studio. ## Licenza Fattura Elettronica è un progetto di [Nicola Iarocci][ni] per [__Invoicetronic__][it]. È [libero][bsd], [sviluppato in pubblico][gh], aperto alla collaborazione di tutti. ## Documentazione - [Sito web](https://fatturaelettronicaopensource.org/) ## Powered by [Invoicetornic logo.](https://invoicetronic.com) Realizzata dagli stessi autori di FatturaElettronica.NET, [__Invoicetronic API__][it] ti permette di integrare facilmente nella tua app l'intero ciclo della fattura elettronica: invio, ricezione, applicazione di firme digitali, convalida, notifiche via webhook e altro, il tutto su una piattaforma moderna che astrae le complessità di SDI/FatturaPA. Invoicetronic include gli SDK per i linguaggi di programmazione più diffusi, comandi CLI per lo scripting, Web app, OpenAPI, e un completo ambiente di prova gratuita. Visita il sito [__Invoicetronic__][it] per saperne di più. [pa]: https://www.agenziaentrate.gov.it/portale/web/guest/specifiche-tecniche-versione-1.8 [bsd]: http://github.com/FatturaElettronica/FatturaElettronica.NET/blob/master/LICENSE.txt [ga]: http://gestionaleamica.com [ni]: https://nicolaiarocci.com [nuget]: https://www.nuget.org/packages/FatturaElettronica/ [netstandard]: https://github.com/dotnet/standard/blob/master/docs/versions/netstandard2.0.md [rp]: http://www.kalamun.org/ [ghs]: https://github.com/sponsors/nicolaiarocci [it]: https://invoicetronic.com [gh]: https://github.com/FatturaElettronica/FatturaElettronica.NET ================================================ FILE: Resources/CausalePagamento.Designer.cs ================================================ //------------------------------------------------------------------------------ // // This code was generated by a tool. // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ namespace FatturaElettronica.Resources { using System; /// /// A strongly-typed resource class, for looking up localized strings, etc. /// // This class was auto-generated by the StronglyTypedResourceBuilder // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] public class CausalePagamento { private static global::System.Resources.ResourceManager resourceMan; private static global::System.Globalization.CultureInfo resourceCulture; [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] internal CausalePagamento() { } /// /// Returns the cached ResourceManager instance used by this class. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] public static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("FatturaElettronica.Resources.CausalePagamento", typeof(CausalePagamento).Assembly); resourceMan = temp; } return resourceMan; } } /// /// Overrides the current thread's CurrentUICulture property for all /// resource lookups using this strongly typed resource class. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] public static global::System.Globalization.CultureInfo Culture { get { return resourceCulture; } set { resourceCulture = value; } } /// /// Looks up a localized string similar to prestazioni di lavoro autonomo rientranti nell’esercizio di arte o professione abituale. /// public static string A { get { return ResourceManager.GetString("A", resourceCulture); } } /// /// Looks up a localized string similar to utilizzazione economica, da parte dell’autore o dell’inventore, di opere dell’ingegno, di brevetti industriali e di processi, formule o informazioni relativi ad esperienze acquisite in campo industriale, commerciale o scientifico. /// public static string B { get { return ResourceManager.GetString("B", resourceCulture); } } /// /// Looks up a localized string similar to utili derivanti da contratti di associazione in partecipazione e da contratti di cointeressenza, quando l’apporto è costituito esclusivamente dalla prestazione di lavoro. /// public static string C { get { return ResourceManager.GetString("C", resourceCulture); } } /// /// Looks up a localized string similar to utili spettanti ai soci promotori ed ai soci fondatori delle società di capitali. /// public static string D { get { return ResourceManager.GetString("D", resourceCulture); } } /// /// Looks up a localized string similar to levata di protesti cambiari da parte dei segretari comunali. /// public static string E { get { return ResourceManager.GetString("E", resourceCulture); } } /// /// Looks up a localized string similar to indennità corrisposte ai giudici onorari di pace e ai vice procuratori onorari. /// public static string F { get { return ResourceManager.GetString("F", resourceCulture); } } /// /// Looks up a localized string similar to indennità corrisposte per la cessazione di attività sportiva professionale. /// public static string G { get { return ResourceManager.GetString("G", resourceCulture); } } /// /// Looks up a localized string similar to indennità corrisposte per la cessazione dei rapporti di agenzia delle persone fisiche e delle società di persone con esclusione delle somme maturate entro il 31 dicembre 2003, già imputate per competenza e tassate come reddito d’impresa. /// public static string H { get { return ResourceManager.GetString("H", resourceCulture); } } /// /// Looks up a localized string similar to indennità corrisposte per la cessazione da funzioni notarili. /// public static string I { get { return ResourceManager.GetString("I", resourceCulture); } } /// /// Looks up a localized string similar to compensi corrisposti ai raccoglitori occasionali di tartufi non identificati ai fini dell’imposta sul valore aggiunto, in relazione alla cessione di tartufi. /// public static string J { get { return ResourceManager.GetString("J", resourceCulture); } } /// /// Looks up a localized string similar to assegni di servizio civile universale di cui all’art.16 del D.lgs. n. 40 del 6 marzo 2017. /// public static string K { get { return ResourceManager.GetString("K", resourceCulture); } } /// /// Looks up a localized string similar to redditi derivanti dall’utilizzazione economica di opere dell’ingegno, di brevetti industriali e di processi, formule e informazioni relativi a esperienze acquisite in campo industriale, commerciale o scientifico, che sono percepiti dagli aventi causa a titolo gratuito (ad es. eredi e legatari dell’autore e inventore). /// public static string L { get { return ResourceManager.GetString("L", resourceCulture); } } /// /// Looks up a localized string similar to redditi derivanti dall’utilizzazione economica di opere dell’ingegno, di brevetti industriali e di processi, formule e informazioni relativi a esperienze acquisite in campo industriale, commerciale o scientifico, che sono percepiti da soggetti che abbiano acquistato a titolo oneroso i diritti alla loro utilizzazione. /// public static string L1 { get { return ResourceManager.GetString("L1", resourceCulture); } } /// /// Looks up a localized string similar to prestazioni di lavoro autonomo non esercitate abitualmente. /// public static string M { get { return ResourceManager.GetString("M", resourceCulture); } } /// /// Looks up a localized string similar to redditi derivanti dall’assunzione di obblighi di fare, di non fare o permettere. /// public static string M1 { get { return ResourceManager.GetString("M1", resourceCulture); } } /// /// Looks up a localized string similar to prestazioni di lavoro autonomo non esercitate abitualmente per le quali sussiste l’obbligo di iscrizione alla Gestione Separata ENPAPI. /// public static string M2 { get { return ResourceManager.GetString("M2", resourceCulture); } } /// /// Looks up a localized string similar to indennità di trasferta, rimborso forfetario di spese, premi e compensi erogati: – nell’esercizio diretto di attività sportive dilettantistiche; – in relazione a rapporti di collaborazione coordinata e continuativa di carattere amministrativo-gestionale di natura non professionale resi a favore di società e associazioni sportive dilettantistiche e di cori, bande e filodrammatiche da parte del direttore e dei collaboratori tecnici. /// public static string N { get { return ResourceManager.GetString("N", resourceCulture); } } /// /// Looks up a localized string similar to prestazioni di lavoro autonomo non esercitate abitualmente, per le quali non sussiste l’obbligo di iscrizione alla gestione separata (Circ. INPS n. 104/2001). /// public static string O { get { return ResourceManager.GetString("O", resourceCulture); } } /// /// Looks up a localized string similar to redditi derivanti dall’assunzione di obblighi di fare, di non fare o permettere, per le quali non sussiste l’obbligo di iscrizione alla gestione separata (Circ. INPS n. 104/2001). /// public static string O1 { get { return ResourceManager.GetString("O1", resourceCulture); } } /// /// Looks up a localized string similar to compensi corrisposti a soggetti non residenti privi di stabile organizzazione per l’uso o la concessione in uso di attrezzature industriali, commerciali o scientifiche che si trovano nel territorio dello Stato ovvero a società svizzere o stabili organizzazioni di società svizzere che possiedono i requisiti di cui all’art. 15, comma 2 dell’Accordo tra la Comunità europea e la Confederazione svizzera del 26 ottobre 2004 (pubblicato in G.U.C.E. del 29 dicembre 2004 n. L385/30). /// public static string P { get { return ResourceManager.GetString("P", resourceCulture); } } /// /// Looks up a localized string similar to provvigioni corrisposte ad agente o rappresentante di commercio monomandatario. /// public static string Q { get { return ResourceManager.GetString("Q", resourceCulture); } } /// /// Looks up a localized string similar to provvigioni corrisposte ad agente o rappresentante di commercio plurimandatario. /// public static string R { get { return ResourceManager.GetString("R", resourceCulture); } } /// /// Looks up a localized string similar to provvigioni corrisposte a commissionario. /// public static string S { get { return ResourceManager.GetString("S", resourceCulture); } } /// /// Looks up a localized string similar to provvigioni corrisposte a mediatore. /// public static string T { get { return ResourceManager.GetString("T", resourceCulture); } } /// /// Looks up a localized string similar to provvigioni corrisposte a procacciatore di affari. /// public static string U { get { return ResourceManager.GetString("U", resourceCulture); } } /// /// Looks up a localized string similar to provvigioni corrisposte a incaricato per le vendite a domicilio; provvigioni corrisposte a incaricato per la vendita porta a porta e per la vendita ambulante di giornali quotidiani e periodici (L. 25 febbraio 1987, n. 67). /// public static string V { get { return ResourceManager.GetString("V", resourceCulture); } } /// /// Looks up a localized string similar to redditi derivanti da attività commerciali non esercitate abitualmente (ad esempio, provvigioni corrisposte per prestazioni occasionali ad agente o rappresentante di commercio, mediatore, procacciatore d’affari). /// public static string V1 { get { return ResourceManager.GetString("V1", resourceCulture); } } /// /// Looks up a localized string similar to redditi derivanti dalle prestazioni non esercitate abitualmente rese dagli incaricati alla vendita diretta a domicilio. /// public static string V2 { get { return ResourceManager.GetString("V2", resourceCulture); } } /// /// Looks up a localized string similar to corrispettivi erogati nel 2017 per prestazioni relative a contratti d’appalto cui si sono resi applicabili le disposizioni contenute nell’art. 25-ter del D.P.R. n. 600 del 29 settembre 1973. /// public static string W { get { return ResourceManager.GetString("W", resourceCulture); } } /// /// Looks up a localized string similar to canoni corrisposti nel 2004 da società o enti residenti ovvero da stabili organizzazioni di società estere di cui all’art. 26-quater, comma 1, lett. a) e b) del D.P.R. 600 del 29 settembre 1973, a società o stabili organizzazioni di società, situate in altro stato membro dell’Unione Europea in presenza dei requisiti di cui al citato art. 26-quater, del D.P.R. 600 del 29 settembre 1973, per i quali è stato effettuato, nell’anno 2006, il rimborso della ritenuta ai sensi dell’art. 4 del D.Lgs. 30 maggio 2005 n [rest of string was truncated]";. /// public static string X { get { return ResourceManager.GetString("X", resourceCulture); } } /// /// Looks up a localized string similar to canoni corrisposti dal 1° gennaio 2005 al 26 luglio 2005 da società o enti residenti ovvero da stabili organizzazioni di società estere di cui all’art. 26-quater, comma 1, lett. a) e b) del D.P.R. n. 600 del 29 settembre 1973, a società o stabili organizzazioni di società, situate in altro stato membro dell’Unione Europea in presenza dei requisiti di cui al citato art. 26-quater, del D.P.R. n. 600 del 29 settembre 1973, per i quali è stato effettuato, nell’anno 2006, il rimborso della ritenuta ai sensi dell [rest of string was truncated]";. /// public static string Y { get { return ResourceManager.GetString("Y", resourceCulture); } } /// /// Looks up a localized string similar to titolo diverso dai precedenti. /// public static string Z { get { return ResourceManager.GetString("Z", resourceCulture); } } /// /// Looks up a localized string similar to titolo diverso dai precedenti. /// public static string ZO { get { return ResourceManager.GetString("ZO", resourceCulture); } } } } ================================================ FILE: Resources/CausalePagamento.de.resx ================================================  text/microsoft-resx 1.3 System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Leistungen aus selbständiger Arbeit im Rahmen der Ausübung von Kunst oder Beruf wirtschaftliche Nutzung durch den Autor oder Erfinder von Werken der Literatur, von Patenten und von Prozessen, Formeln oder Informationen im Zusammenhang mit Erfahrungen in den Bereichen Industrie, Handel oder Wissenschaft Gewinne aus Beteiligungsverträgen und aus Beteiligungsverträgen, wenn der Beitrag ausschließlich aus Arbeitsleistungen besteht Gewinne, die den Gründungsmitgliedern und den Gründungsmitgliedern von Kapitalgesellschaften zustehen Erhebung von Wechselprotesten durch Gemeindesekretäre Entschädigungen, die an ehrenamtliche Friedensrichter und ehrenamtliche Staatsanwälte gezahlt werden Entschädigungen, die für die Beendigung der beruflichen sportlichen Tätigkeit gezahlt werden Entschädigungen, die für die Beendigung von Agenturverhältnissen von natürlichen Personen und Personengesellschaften gezahlt werden, mit Ausnahme der Beträge, die bis zum 31. Dezember 2003 fällig wurden und bereits als Betriebseinnahmen besteuert wurden Entschädigungen, die für die Beendigung notarieller Funktionen gezahlt werden Einkünfte aus der wirtschaftlichen Nutzung von Werken der Literatur, von Patenten und von Prozessen, Formeln und Informationen im Zusammenhang mit Erfahrungen in den Bereichen Industrie, Handel oder Wissenschaft, die von den Rechtsnachfolgern des Autors und Erfinders unentgeltlich erworben wurden (z.B. Erben und Vermächtnisnehmer) Leistungen aus selbständiger Arbeit, die nicht regelmäßig ausgeübt werden Reisekostenvergütungen, pauschale Spesenvergütungen, Prämien und Vergütungen, die gezahlt werden: – bei der direkten Ausübung von Amateursportaktivitäten; – im Zusammenhang mit kontinuierlichen und koordinierten Verwaltungs- und Managementtätigkeiten nicht professioneller Natur, die zugunsten von Sportvereinen und -verbänden sowie von Chören, Bands und Theatergruppen durch den Direktor und die technischen Mitarbeiter erbracht werden Leistungen aus selbständiger Arbeit, die nicht regelmäßig ausgeübt werden und für die keine Verpflichtung zur Eintragung in die separate Verwaltung besteht (INPS-Rundschreiben Nr. 104/2001) Vergütungen, die an nicht ansässige Personen ohne ständige Betriebsstätte für die Nutzung oder die Gewährung der Nutzung von industriellen, kommerziellen oder wissenschaftlichen Ausrüstungen gezahlt werden, die sich im Staatsgebiet befinden, oder an Schweizer Gesellschaften oder ständige Betriebsstätten von Schweizer Gesellschaften, die die Anforderungen des Art. 15, Absatz 2 des Abkommens zwischen der Europäischen Gemeinschaft und der Schweizerischen Eidgenossenschaft vom 26. Oktober 2004 (veröffentlicht im Amtsblatt der EU vom 29. Dezember 2004 Nr. L385/30) erfüllen Provisionen, die an einen Alleinvertreter oder Handelsvertreter gezahlt werden Provisionen, die an einen Mehrfachvertreter oder Handelsvertreter gezahlt werden Provisionen, die an einen Kommissionär gezahlt werden Provisionen, die an einen Makler gezahlt werden Provisionen, die an einen Geschäftsanbahner gezahlt werden Provisionen, die an einen Beauftragten für den Direktvertrieb an der Haustür gezahlt werden; Provisionen, die an einen Beauftragten für den Haustürverkauf und den ambulanten Verkauf von Tageszeitungen und Zeitschriften gezahlt werden (Gesetz vom 25. Februar 1987, Nr. 67) Vergütungen, die im Jahr 2017 für Leistungen im Zusammenhang mit Werkverträgen gezahlt wurden, auf die die Bestimmungen des Art. 25-ter des D.P.R. Nr. 600 vom 29. September 1973 anwendbar waren Lizenzgebühren, die im Jahr 2004 von ansässigen Gesellschaften oder Einrichtungen oder von ständigen Betriebsstätten ausländischer Gesellschaften gemäß Art. 26-quater, Absatz 1, Buchstaben a) und b) des D.P.R. Nr. 600 vom 29. September 1973 an Gesellschaften oder ständige Betriebsstätten von Gesellschaften gezahlt wurden, die sich in einem anderen Mitgliedstaat der Europäischen Union befinden und die Anforderungen des genannten Art. 26-quater des D.P.R. Nr. 600 vom 29. September 1973 erfüllen, für die im Jahr 2006 die Rückerstattung der Quellensteuer gemäß Art. 4 des Gesetzesdekrets Nr. 143 vom 30. Mai 2005 erfolgte Lizenzgebühren, die vom 1. Januar 2005 bis zum 26. Juli 2005 von ansässigen Gesellschaften oder Einrichtungen oder von ständigen Betriebsstätten ausländischer Gesellschaften gemäß Art. 26-quater, Absatz 1, Buchstaben a) und b) des D.P.R. Nr. 600 vom 29. September 1973 an Gesellschaften oder ständige Betriebsstätten von Gesellschaften gezahlt wurden, die sich in einem anderen Mitgliedstaat der Europäischen Union befinden und die Anforderungen des genannten Art. 26-quater des D.P.R. Nr. 600 vom 29. September 1973 erfüllen, für die im Jahr 2006 die Rückerstattung der Quellensteuer gemäß Art. 4 des Gesetzesdekrets Nr. 143 vom 30. Mai 2005 erfolgte Einkünfte aus der wirtschaftlichen Nutzung von Werken der Literatur, von Patenten und von Prozessen, Formeln und Informationen im Zusammenhang mit Erfahrungen in den Bereichen Industrie, Handel oder Wissenschaft, die von Personen erzielt werden, die die Rechte an deren Nutzung entgeltlich erworben haben Einkünfte aus der Übernahme von Verpflichtungen zu tun, zu unterlassen oder zu gestatten Leistungen aus selbständiger Arbeit, die nicht regelmäßig ausgeübt werden und für die eine Verpflichtung zur Eintragung in die separate Verwaltung ENPAPI besteht Einkünfte aus der Übernahme von Verpflichtungen zu tun, zu unterlassen oder zu gestatten, für die keine Verpflichtung zur Eintragung in die separate Verwaltung besteht (INPS-Rundschreiben Nr. 104/2001) Einkünfte aus nicht regelmäßig ausgeübten gewerblichen Tätigkeiten (z.B. Provisionen, die für gelegentliche Leistungen an einen Handelsvertreter, Makler oder Geschäftsanbahner gezahlt werden) anderer Titel als die vorhergehenden Vergütungen, die an gelegentliche Trüffelsammler gezahlt werden, die nicht für die Mehrwertsteuer registriert sind, im Zusammenhang mit dem Verkauf von Trüffeln Zivildienstvergütungen gemäß Art. 16 des Gesetzesdekrets Nr. 40 vom 6. März 2017 Einkünfte aus nicht regelmäßig ausgeübten Leistungen, die von Beauftragten für den Direktvertrieb an der Haustür erbracht werden anderer Titel als die vorhergehenden ================================================ FILE: Resources/CausalePagamento.en.resx ================================================ text/microsoft-resx 1.3 System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Self-employed work services within the exercise of art or habitual profession Economic use, by the author or inventor, of intellectual works, industrial patents and processes, formulas or information related to experiences acquired in industrial, commercial or scientific fields Profits derived from partnership and joint venture contracts, when the contribution consists exclusively of work performance Profits due to founding and promoting members of capital companies Issuing of bill protests by municipal secretaries Compensations paid to honorary justices of the peace and honorary deputy prosecutors Compensations paid for the termination of professional sports activity Compensations paid for the termination of agency relationships for individuals and partnerships, excluding amounts accrued by December 31, 2003, already allocated by competence and taxed as business income Compensations paid for the termination of notarial functions Income derived from economic use of intellectual works, industrial patents and processes, formulas and information related to experiences acquired in industrial, commercial or scientific fields, perceived by those who obtained them free of charge (e.g., heirs and legatees of the author and inventor) Self-employed work services not habitually performed Transfer allowances, flat expense reimbursement, premiums and compensations paid: – in the direct exercise of amateur sports activities; – in relation to coordinated and continuous administrative-management collaborations of non-professional nature provided to amateur sports societies and associations, choirs, bands and drama groups by the director and technical collaborators Self-employed work services not habitually performed, for which there is no obligation to register with the separate management (INPS Circular No. 104/2001) Compensations paid to non-resident subjects without a permanent establishment for the use or concession of use of industrial, commercial or scientific equipment located in the national territory, or to Swiss companies or permanent establishments of Swiss companies that possess the requirements of art. 15, paragraph 2 of the Agreement between the European Community and the Swiss Confederation of 26 October 2004 (published in the Official Journal of the European Communities on 29 December 2004 No. L385/30) Commissions paid to a single-mandate commercial agent or representative Commissions paid to a multi-mandate commercial agent or representative Commissions paid to a commission agent Commissions paid to a broker Commissions paid to a business introducer Commissions paid to a door-to-door sales representative; Commissions paid to a representative for door-to-door and mobile sales of daily newspapers and periodicals (Law of 25 February 1987, n. 67) Fees paid in 2017 for services related to contracts to which the provisions contained in art. 25-ter of Presidential Decree No. 600 of 29 September 1973 were applied Royalties paid in 2004 by resident companies or entities or permanent establishments of foreign companies pursuant to art. 26-quater, paragraph 1, letters a) and b) of Presidential Decree 600 of 29 September 1973, to companies or permanent establishments of companies located in another European Union member state in the presence of the requirements referred to in the aforementioned art. 26-quater of Presidential Decree 600, for which the withholding tax refund was made in 2006 pursuant to art. 4 of Legislative Decree 30 May 2005 n. 143 Royalties paid from January 1, 2005 to July 26, 2005 by resident companies or entities or permanent establishments of foreign companies pursuant to art. 26-quater, paragraph 1, letters a) and b) of Presidential Decree No. 600 of 29 September 1973, to companies or permanent establishments of companies located in another European Union member state in the presence of the requirements referred to in the aforementioned art. 26-quater of Presidential Decree No. 600, for which the withholding tax refund was made in 2006 pursuant to art. 4 of Legislative Decree 30 May 2005 n. 143 Income derived from economic use of intellectual works, industrial patents and processes, formulas and information related to experiences acquired in industrial, commercial or scientific fields, perceived by subjects who have acquired the rights to their use for a fee Income derived from undertaking obligations to do, not to do, or to allow Self-employed work services not habitually performed for which there is an obligation to register with the ENPAPI Separate Management Income derived from undertaking obligations to do, not to do, or to allow, for which there is no obligation to register with the separate management (INPS Circular No. 104/2001) Income derived from non-habitually performed commercial activities (for example, commissions paid for occasional services to a commercial agent, broker, business introducer) Title different from the previous ones Compensations paid to occasional truffle collectors not identified for VAT purposes, in relation to truffle sales Universal civil service allowances referred to in art. 16 of Legislative Decree No. 40 of 6 March 2017 Income derived from non-habitually performed services provided by door-to-door direct sales representatives Title different from the previous ones ================================================ FILE: Resources/CausalePagamento.resx ================================================  text/microsoft-resx 1.3 System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 prestazioni di lavoro autonomo rientranti nell’esercizio di arte o professione abituale utilizzazione economica, da parte dell’autore o dell’inventore, di opere dell’ingegno, di brevetti industriali e di processi, formule o informazioni relativi ad esperienze acquisite in campo industriale, commerciale o scientifico utili derivanti da contratti di associazione in partecipazione e da contratti di cointeressenza, quando l’apporto è costituito esclusivamente dalla prestazione di lavoro utili spettanti ai soci promotori ed ai soci fondatori delle società di capitali levata di protesti cambiari da parte dei segretari comunali indennità corrisposte ai giudici onorari di pace e ai vice procuratori onorari indennità corrisposte per la cessazione di attività sportiva professionale indennità corrisposte per la cessazione dei rapporti di agenzia delle persone fisiche e delle società di persone con esclusione delle somme maturate entro il 31 dicembre 2003, già imputate per competenza e tassate come reddito d’impresa indennità corrisposte per la cessazione da funzioni notarili redditi derivanti dall’utilizzazione economica di opere dell’ingegno, di brevetti industriali e di processi, formule e informazioni relativi a esperienze acquisite in campo industriale, commerciale o scientifico, che sono percepiti dagli aventi causa a titolo gratuito (ad es. eredi e legatari dell’autore e inventore) prestazioni di lavoro autonomo non esercitate abitualmente indennità di trasferta, rimborso forfetario di spese, premi e compensi erogati: – nell’esercizio diretto di attività sportive dilettantistiche; – in relazione a rapporti di collaborazione coordinata e continuativa di carattere amministrativo-gestionale di natura non professionale resi a favore di società e associazioni sportive dilettantistiche e di cori, bande e filodrammatiche da parte del direttore e dei collaboratori tecnici prestazioni di lavoro autonomo non esercitate abitualmente, per le quali non sussiste l’obbligo di iscrizione alla gestione separata (Circ. INPS n. 104/2001) compensi corrisposti a soggetti non residenti privi di stabile organizzazione per l’uso o la concessione in uso di attrezzature industriali, commerciali o scientifiche che si trovano nel territorio dello Stato ovvero a società svizzere o stabili organizzazioni di società svizzere che possiedono i requisiti di cui all’art. 15, comma 2 dell’Accordo tra la Comunità europea e la Confederazione svizzera del 26 ottobre 2004 (pubblicato in G.U.C.E. del 29 dicembre 2004 n. L385/30) provvigioni corrisposte ad agente o rappresentante di commercio monomandatario provvigioni corrisposte ad agente o rappresentante di commercio plurimandatario provvigioni corrisposte a commissionario provvigioni corrisposte a mediatore provvigioni corrisposte a procacciatore di affari provvigioni corrisposte a incaricato per le vendite a domicilio; provvigioni corrisposte a incaricato per la vendita porta a porta e per la vendita ambulante di giornali quotidiani e periodici (L. 25 febbraio 1987, n. 67) corrispettivi erogati nel 2017 per prestazioni relative a contratti d’appalto cui si sono resi applicabili le disposizioni contenute nell’art. 25-ter del D.P.R. n. 600 del 29 settembre 1973 canoni corrisposti nel 2004 da società o enti residenti ovvero da stabili organizzazioni di società estere di cui all’art. 26-quater, comma 1, lett. a) e b) del D.P.R. 600 del 29 settembre 1973, a società o stabili organizzazioni di società, situate in altro stato membro dell’Unione Europea in presenza dei requisiti di cui al citato art. 26-quater, del D.P.R. 600 del 29 settembre 1973, per i quali è stato effettuato, nell’anno 2006, il rimborso della ritenuta ai sensi dell’art. 4 del D.Lgs. 30 maggio 2005 n. 143 canoni corrisposti dal 1° gennaio 2005 al 26 luglio 2005 da società o enti residenti ovvero da stabili organizzazioni di società estere di cui all’art. 26-quater, comma 1, lett. a) e b) del D.P.R. n. 600 del 29 settembre 1973, a società o stabili organizzazioni di società, situate in altro stato membro dell’Unione Europea in presenza dei requisiti di cui al citato art. 26-quater, del D.P.R. n. 600 del 29 settembre 1973, per i quali è stato effettuato, nell’anno 2006, il rimborso della ritenuta ai sensi dell’art. 4 del D.Lgs. 30 maggio 2005 n. 143 redditi derivanti dall’utilizzazione economica di opere dell’ingegno, di brevetti industriali e di processi, formule e informazioni relativi a esperienze acquisite in campo industriale, commerciale o scientifico, che sono percepiti da soggetti che abbiano acquistato a titolo oneroso i diritti alla loro utilizzazione redditi derivanti dall’assunzione di obblighi di fare, di non fare o permettere prestazioni di lavoro autonomo non esercitate abitualmente per le quali sussiste l’obbligo di iscrizione alla Gestione Separata ENPAPI redditi derivanti dall’assunzione di obblighi di fare, di non fare o permettere, per le quali non sussiste l’obbligo di iscrizione alla gestione separata (Circ. INPS n. 104/2001) redditi derivanti da attività commerciali non esercitate abitualmente (ad esempio, provvigioni corrisposte per prestazioni occasionali ad agente o rappresentante di commercio, mediatore, procacciatore d’affari) titolo diverso dai precedenti compensi corrisposti ai raccoglitori occasionali di tartufi non identificati ai fini dell’imposta sul valore aggiunto, in relazione alla cessione di tartufi Valori accettati nel periodo transitorio tra specifiche v1.5 e v1.6 - verranno rimossi assegni di servizio civile universale di cui all’art.16 del D.lgs. n. 40 del 6 marzo 2017 Valori accettati nel periodo transitorio tra specifiche v1.5 e v1.6 - verranno rimossi redditi derivanti dalle prestazioni non esercitate abitualmente rese dagli incaricati alla vendita diretta a domicilio Valori accettati nel periodo transitorio tra specifiche v1.5 e v1.6 - verranno rimossi titolo diverso dai precedenti Valori accettati nel periodo transitorio tra specifiche v1.5 e v1.6 - verranno rimossi ================================================ FILE: Resources/CondizioniPagamento.Designer.cs ================================================ //------------------------------------------------------------------------------ // // This code was generated by a tool. // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ namespace FatturaElettronica.Resources { using System; /// /// A strongly-typed resource class, for looking up localized strings, etc. /// // This class was auto-generated by the StronglyTypedResourceBuilder // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] public class CondizioniPagamento { private static global::System.Resources.ResourceManager resourceMan; private static global::System.Globalization.CultureInfo resourceCulture; [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] internal CondizioniPagamento() { } /// /// Returns the cached ResourceManager instance used by this class. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] public static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("FatturaElettronica.Resources.CondizioniPagamento", typeof(CondizioniPagamento).Assembly); resourceMan = temp; } return resourceMan; } } /// /// Overrides the current thread's CurrentUICulture property for all /// resource lookups using this strongly typed resource class. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] public static global::System.Globalization.CultureInfo Culture { get { return resourceCulture; } set { resourceCulture = value; } } /// /// Looks up a localized string similar to pagamento a rate. /// public static string TP01 { get { return ResourceManager.GetString("TP01", resourceCulture); } } /// /// Looks up a localized string similar to pagamento completo. /// public static string TP02 { get { return ResourceManager.GetString("TP02", resourceCulture); } } /// /// Looks up a localized string similar to anticipo. /// public static string TP03 { get { return ResourceManager.GetString("TP03", resourceCulture); } } } } ================================================ FILE: Resources/CondizioniPagamento.de.resx ================================================  text/microsoft-resx 1.3 System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Ratenzahlung Vollständige Zahlung Vorauszahlung ================================================ FILE: Resources/CondizioniPagamento.en.resx ================================================ text/microsoft-resx 1.3 System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 installment payment full payment advance payment ================================================ FILE: Resources/CondizioniPagamento.resx ================================================  text/microsoft-resx 1.3 System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 pagamento a rate pagamento completo anticipo ================================================ FILE: Resources/Divisa.Designer.cs ================================================ //------------------------------------------------------------------------------ // // This code was generated by a tool. // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ namespace FatturaElettronica.Resources { using System; /// /// A strongly-typed resource class, for looking up localized strings, etc. /// // This class was auto-generated by the StronglyTypedResourceBuilder // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] public class Divisa { private static global::System.Resources.ResourceManager resourceMan; private static global::System.Globalization.CultureInfo resourceCulture; [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] internal Divisa() { } /// /// Returns the cached ResourceManager instance used by this class. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] public static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("FatturaElettronica.Resources.Divisa", typeof(Divisa).Assembly); resourceMan = temp; } return resourceMan; } } /// /// Overrides the current thread's CurrentUICulture property for all /// resource lookups using this strongly typed resource class. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] public static global::System.Globalization.CultureInfo Culture { get { return resourceCulture; } set { resourceCulture = value; } } /// /// Looks up a localized string similar to . /// public static string AED { get { return ResourceManager.GetString("AED", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string AFN { get { return ResourceManager.GetString("AFN", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string ALL { get { return ResourceManager.GetString("ALL", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string AMD { get { return ResourceManager.GetString("AMD", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string ANG { get { return ResourceManager.GetString("ANG", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string AOA { get { return ResourceManager.GetString("AOA", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string ARS { get { return ResourceManager.GetString("ARS", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string AUD { get { return ResourceManager.GetString("AUD", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string AWG { get { return ResourceManager.GetString("AWG", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string AZN { get { return ResourceManager.GetString("AZN", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string BAM { get { return ResourceManager.GetString("BAM", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string BBD { get { return ResourceManager.GetString("BBD", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string BDT { get { return ResourceManager.GetString("BDT", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string BGN { get { return ResourceManager.GetString("BGN", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string BHD { get { return ResourceManager.GetString("BHD", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string BIF { get { return ResourceManager.GetString("BIF", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string BMD { get { return ResourceManager.GetString("BMD", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string BND { get { return ResourceManager.GetString("BND", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string BOB { get { return ResourceManager.GetString("BOB", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string BOV { get { return ResourceManager.GetString("BOV", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string BRL { get { return ResourceManager.GetString("BRL", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string BSD { get { return ResourceManager.GetString("BSD", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string BTN { get { return ResourceManager.GetString("BTN", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string BWP { get { return ResourceManager.GetString("BWP", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string BYR { get { return ResourceManager.GetString("BYR", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string BZD { get { return ResourceManager.GetString("BZD", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string CAD { get { return ResourceManager.GetString("CAD", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string CDF { get { return ResourceManager.GetString("CDF", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string CHE { get { return ResourceManager.GetString("CHE", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string CHF { get { return ResourceManager.GetString("CHF", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string CHW { get { return ResourceManager.GetString("CHW", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string CLF { get { return ResourceManager.GetString("CLF", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string CLP { get { return ResourceManager.GetString("CLP", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string CNY { get { return ResourceManager.GetString("CNY", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string COP { get { return ResourceManager.GetString("COP", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string COU { get { return ResourceManager.GetString("COU", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string CRC { get { return ResourceManager.GetString("CRC", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string CUC { get { return ResourceManager.GetString("CUC", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string CUP { get { return ResourceManager.GetString("CUP", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string CVE { get { return ResourceManager.GetString("CVE", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string CZK { get { return ResourceManager.GetString("CZK", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string DJF { get { return ResourceManager.GetString("DJF", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string DKK { get { return ResourceManager.GetString("DKK", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string DOP { get { return ResourceManager.GetString("DOP", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string DZD { get { return ResourceManager.GetString("DZD", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string EGP { get { return ResourceManager.GetString("EGP", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string ERN { get { return ResourceManager.GetString("ERN", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string ETB { get { return ResourceManager.GetString("ETB", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string EUR { get { return ResourceManager.GetString("EUR", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string FJD { get { return ResourceManager.GetString("FJD", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string FKP { get { return ResourceManager.GetString("FKP", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string GBP { get { return ResourceManager.GetString("GBP", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string GEL { get { return ResourceManager.GetString("GEL", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string GHS { get { return ResourceManager.GetString("GHS", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string GIP { get { return ResourceManager.GetString("GIP", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string GMD { get { return ResourceManager.GetString("GMD", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string GNF { get { return ResourceManager.GetString("GNF", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string GTQ { get { return ResourceManager.GetString("GTQ", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string GYD { get { return ResourceManager.GetString("GYD", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string HKD { get { return ResourceManager.GetString("HKD", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string HNL { get { return ResourceManager.GetString("HNL", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string HRK { get { return ResourceManager.GetString("HRK", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string HTG { get { return ResourceManager.GetString("HTG", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string HUF { get { return ResourceManager.GetString("HUF", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string IDR { get { return ResourceManager.GetString("IDR", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string ILS { get { return ResourceManager.GetString("ILS", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string INR { get { return ResourceManager.GetString("INR", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string IQD { get { return ResourceManager.GetString("IQD", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string IRR { get { return ResourceManager.GetString("IRR", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string ISK { get { return ResourceManager.GetString("ISK", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string JMD { get { return ResourceManager.GetString("JMD", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string JOD { get { return ResourceManager.GetString("JOD", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string JPY { get { return ResourceManager.GetString("JPY", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string KES { get { return ResourceManager.GetString("KES", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string KGS { get { return ResourceManager.GetString("KGS", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string KHR { get { return ResourceManager.GetString("KHR", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string KMF { get { return ResourceManager.GetString("KMF", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string KPW { get { return ResourceManager.GetString("KPW", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string KRW { get { return ResourceManager.GetString("KRW", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string KWD { get { return ResourceManager.GetString("KWD", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string KYD { get { return ResourceManager.GetString("KYD", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string KZT { get { return ResourceManager.GetString("KZT", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string LAK { get { return ResourceManager.GetString("LAK", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string LBP { get { return ResourceManager.GetString("LBP", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string LKR { get { return ResourceManager.GetString("LKR", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string LRD { get { return ResourceManager.GetString("LRD", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string LSL { get { return ResourceManager.GetString("LSL", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string LTL { get { return ResourceManager.GetString("LTL", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string LYD { get { return ResourceManager.GetString("LYD", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string MAD { get { return ResourceManager.GetString("MAD", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string MDL { get { return ResourceManager.GetString("MDL", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string MGA { get { return ResourceManager.GetString("MGA", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string MKD { get { return ResourceManager.GetString("MKD", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string MMK { get { return ResourceManager.GetString("MMK", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string MNT { get { return ResourceManager.GetString("MNT", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string MOP { get { return ResourceManager.GetString("MOP", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string MRO { get { return ResourceManager.GetString("MRO", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string MUR { get { return ResourceManager.GetString("MUR", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string MVR { get { return ResourceManager.GetString("MVR", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string MWK { get { return ResourceManager.GetString("MWK", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string MXN { get { return ResourceManager.GetString("MXN", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string MXV { get { return ResourceManager.GetString("MXV", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string MYR { get { return ResourceManager.GetString("MYR", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string MZN { get { return ResourceManager.GetString("MZN", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string NAD { get { return ResourceManager.GetString("NAD", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string NGN { get { return ResourceManager.GetString("NGN", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string NIO { get { return ResourceManager.GetString("NIO", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string NOK { get { return ResourceManager.GetString("NOK", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string NPR { get { return ResourceManager.GetString("NPR", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string NZD { get { return ResourceManager.GetString("NZD", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string OMR { get { return ResourceManager.GetString("OMR", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string PAB { get { return ResourceManager.GetString("PAB", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string PEN { get { return ResourceManager.GetString("PEN", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string PGK { get { return ResourceManager.GetString("PGK", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string PHP { get { return ResourceManager.GetString("PHP", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string PKR { get { return ResourceManager.GetString("PKR", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string PLN { get { return ResourceManager.GetString("PLN", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string PYG { get { return ResourceManager.GetString("PYG", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string QAR { get { return ResourceManager.GetString("QAR", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string RON { get { return ResourceManager.GetString("RON", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string RSD { get { return ResourceManager.GetString("RSD", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string RUB { get { return ResourceManager.GetString("RUB", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string RWF { get { return ResourceManager.GetString("RWF", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string SAR { get { return ResourceManager.GetString("SAR", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string SBD { get { return ResourceManager.GetString("SBD", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string SCR { get { return ResourceManager.GetString("SCR", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string SDG { get { return ResourceManager.GetString("SDG", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string SEK { get { return ResourceManager.GetString("SEK", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string SGD { get { return ResourceManager.GetString("SGD", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string SHP { get { return ResourceManager.GetString("SHP", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string SLL { get { return ResourceManager.GetString("SLL", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string SOS { get { return ResourceManager.GetString("SOS", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string SRD { get { return ResourceManager.GetString("SRD", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string SSP { get { return ResourceManager.GetString("SSP", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string STD { get { return ResourceManager.GetString("STD", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string SVC { get { return ResourceManager.GetString("SVC", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string SYP { get { return ResourceManager.GetString("SYP", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string SZL { get { return ResourceManager.GetString("SZL", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string THB { get { return ResourceManager.GetString("THB", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string TJS { get { return ResourceManager.GetString("TJS", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string TMT { get { return ResourceManager.GetString("TMT", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string TND { get { return ResourceManager.GetString("TND", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string TOP { get { return ResourceManager.GetString("TOP", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string TRY { get { return ResourceManager.GetString("TRY", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string TTD { get { return ResourceManager.GetString("TTD", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string TWD { get { return ResourceManager.GetString("TWD", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string TZS { get { return ResourceManager.GetString("TZS", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string UAH { get { return ResourceManager.GetString("UAH", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string UGX { get { return ResourceManager.GetString("UGX", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string USD { get { return ResourceManager.GetString("USD", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string USN { get { return ResourceManager.GetString("USN", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string USS { get { return ResourceManager.GetString("USS", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string UYI { get { return ResourceManager.GetString("UYI", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string UYU { get { return ResourceManager.GetString("UYU", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string UZS { get { return ResourceManager.GetString("UZS", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string VEF { get { return ResourceManager.GetString("VEF", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string VND { get { return ResourceManager.GetString("VND", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string VUV { get { return ResourceManager.GetString("VUV", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string WST { get { return ResourceManager.GetString("WST", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string XAF { get { return ResourceManager.GetString("XAF", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string XAG { get { return ResourceManager.GetString("XAG", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string XAU { get { return ResourceManager.GetString("XAU", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string XBA { get { return ResourceManager.GetString("XBA", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string XBB { get { return ResourceManager.GetString("XBB", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string XBC { get { return ResourceManager.GetString("XBC", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string XBD { get { return ResourceManager.GetString("XBD", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string XCD { get { return ResourceManager.GetString("XCD", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string XDR { get { return ResourceManager.GetString("XDR", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string XOF { get { return ResourceManager.GetString("XOF", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string XPD { get { return ResourceManager.GetString("XPD", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string XPF { get { return ResourceManager.GetString("XPF", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string XPT { get { return ResourceManager.GetString("XPT", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string XSU { get { return ResourceManager.GetString("XSU", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string XTS { get { return ResourceManager.GetString("XTS", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string XUA { get { return ResourceManager.GetString("XUA", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string XXX { get { return ResourceManager.GetString("XXX", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string YER { get { return ResourceManager.GetString("YER", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string ZAR { get { return ResourceManager.GetString("ZAR", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string ZMW { get { return ResourceManager.GetString("ZMW", resourceCulture); } } /// /// Looks up a localized string similar to . /// public static string ZWL { get { return ResourceManager.GetString("ZWL", resourceCulture); } } } } ================================================ FILE: Resources/Divisa.resx ================================================  text/microsoft-resx 1.3 System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 ================================================ FILE: Resources/EsigibilitaIVA.Designer.cs ================================================ //------------------------------------------------------------------------------ // // This code was generated by a tool. // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ namespace FatturaElettronica.Resources { using System; /// /// A strongly-typed resource class, for looking up localized strings, etc. /// // This class was auto-generated by the StronglyTypedResourceBuilder // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] public class EsigibilitaIVA { private static global::System.Resources.ResourceManager resourceMan; private static global::System.Globalization.CultureInfo resourceCulture; [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] internal EsigibilitaIVA() { } /// /// Returns the cached ResourceManager instance used by this class. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] public static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("FatturaElettronica.Resources.EsigibilitaIVA", typeof(EsigibilitaIVA).Assembly); resourceMan = temp; } return resourceMan; } } /// /// Overrides the current thread's CurrentUICulture property for all /// resource lookups using this strongly typed resource class. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] public static global::System.Globalization.CultureInfo Culture { get { return resourceCulture; } set { resourceCulture = value; } } /// /// Looks up a localized string similar to IVA ad esigibilità differita. /// public static string D { get { return ResourceManager.GetString("D", resourceCulture); } } /// /// Looks up a localized string similar to IVA ad esigibilità immediata. /// public static string I { get { return ResourceManager.GetString("I", resourceCulture); } } /// /// Looks up a localized string similar to scissione dei pagamenti. /// public static string S { get { return ResourceManager.GetString("S", resourceCulture); } } } } ================================================ FILE: Resources/EsigibilitaIVA.de.resx ================================================  text/microsoft-resx 1.3 System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 MwSt. mit aufgeschobener Steuerschuld MwSt. sofort zahlbar Zahlungsaufteilung ================================================ FILE: Resources/EsigibilitaIVA.en.resx ================================================ text/microsoft-resx 1.3 System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Immediate VAT payment Deferred VAT payment Split payment ================================================ FILE: Resources/EsigibilitaIVA.resx ================================================  text/microsoft-resx 1.3 System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 IVA ad esigibilità immediata IVA ad esigibilità differita scissione dei pagamenti ================================================ FILE: Resources/FormatoTrasmissione.Designer.cs ================================================ //------------------------------------------------------------------------------ // // This code was generated by a tool. // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ namespace FatturaElettronica.Resources { using System; /// /// A strongly-typed resource class, for looking up localized strings, etc. /// // This class was auto-generated by the StronglyTypedResourceBuilder // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] public class FormatoTrasmissione { private static global::System.Resources.ResourceManager resourceMan; private static global::System.Globalization.CultureInfo resourceCulture; [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] internal FormatoTrasmissione() { } /// /// Returns the cached ResourceManager instance used by this class. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] public static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("FatturaElettronica.Resources.FormatoTrasmissione", typeof(FormatoTrasmissione).Assembly); resourceMan = temp; } return resourceMan; } } /// /// Overrides the current thread's CurrentUICulture property for all /// resource lookups using this strongly typed resource class. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] public static global::System.Globalization.CultureInfo Culture { get { return resourceCulture; } set { resourceCulture = value; } } /// /// Looks up a localized string similar to FatturaOrdinaria verso privati. /// public static string Privati { get { return ResourceManager.GetString("Privati", resourceCulture); } } /// /// Looks up a localized string similar to FatturaOrdinaria verso la PA. /// public static string PubblicaAmministrazione { get { return ResourceManager.GetString("PubblicaAmministrazione", resourceCulture); } } /// /// Looks up a localized string similar to FatturaOrdinaria verso privati in forma semplificata. /// public static string Semplificata { get { return ResourceManager.GetString("Semplificata", resourceCulture); } } } } ================================================ FILE: Resources/FormatoTrasmissione.de.resx ================================================  text/microsoft-resx 1.3 System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Vereinfachte Rechnung an Privatpersonen Rechnung an die öffentliche Verwaltung Rechnung an Privatpersonen ================================================ FILE: Resources/FormatoTrasmissione.en.resx ================================================ text/microsoft-resx 1.3 System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Standard Invoice to Public Administration Standard Invoice to Private Entities Simplified Invoice to Private Entities ================================================ FILE: Resources/FormatoTrasmissione.resx ================================================  text/microsoft-resx 1.3 System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 FatturaOrdinaria verso la PA FatturaOrdinaria verso privati FatturaOrdinaria verso privati in forma semplificata ================================================ FILE: Resources/IdPaese.Designer.cs ================================================ //------------------------------------------------------------------------------ // // This code was generated by a tool. // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ namespace FatturaElettronica.Resources { using System; /// /// A strongly-typed resource class, for looking up localized strings, etc. /// // This class was auto-generated by the StronglyTypedResourceBuilder // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] public class IdPaese { private static global::System.Resources.ResourceManager resourceMan; private static global::System.Globalization.CultureInfo resourceCulture; [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] internal IdPaese() { } /// /// Returns the cached ResourceManager instance used by this class. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] public static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("FatturaElettronica.Resources.IdPaese", typeof(IdPaese).Assembly); resourceMan = temp; } return resourceMan; } } /// /// Overrides the current thread's CurrentUICulture property for all /// resource lookups using this strongly typed resource class. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] public static global::System.Globalization.CultureInfo Culture { get { return resourceCulture; } set { resourceCulture = value; } } /// /// Looks up a localized string similar to Andorra. /// public static string AD { get { return ResourceManager.GetString("AD", resourceCulture); } } /// /// Looks up a localized string similar to Emirati Arabi Uniti. /// public static string AE { get { return ResourceManager.GetString("AE", resourceCulture); } } /// /// Looks up a localized string similar to Afghanistan. /// public static string AF { get { return ResourceManager.GetString("AF", resourceCulture); } } /// /// Looks up a localized string similar to Antigua e Barbuda. /// public static string AG { get { return ResourceManager.GetString("AG", resourceCulture); } } /// /// Looks up a localized string similar to Anguilla. /// public static string AI { get { return ResourceManager.GetString("AI", resourceCulture); } } /// /// Looks up a localized string similar to Albania. /// public static string AL { get { return ResourceManager.GetString("AL", resourceCulture); } } /// /// Looks up a localized string similar to Armenia. /// public static string AM { get { return ResourceManager.GetString("AM", resourceCulture); } } /// /// Looks up a localized string similar to Angola. /// public static string AO { get { return ResourceManager.GetString("AO", resourceCulture); } } /// /// Looks up a localized string similar to Antartide. /// public static string AQ { get { return ResourceManager.GetString("AQ", resourceCulture); } } /// /// Looks up a localized string similar to Argentina. /// public static string AR { get { return ResourceManager.GetString("AR", resourceCulture); } } /// /// Looks up a localized string similar to Samoa Americane. /// public static string AS { get { return ResourceManager.GetString("AS", resourceCulture); } } /// /// Looks up a localized string similar to Austria. /// public static string AT { get { return ResourceManager.GetString("AT", resourceCulture); } } /// /// Looks up a localized string similar to Australia. /// public static string AU { get { return ResourceManager.GetString("AU", resourceCulture); } } /// /// Looks up a localized string similar to Aruba. /// public static string AW { get { return ResourceManager.GetString("AW", resourceCulture); } } /// /// Looks up a localized string similar to Isole Åland. /// public static string AX { get { return ResourceManager.GetString("AX", resourceCulture); } } /// /// Looks up a localized string similar to Azerbaigian. /// public static string AZ { get { return ResourceManager.GetString("AZ", resourceCulture); } } /// /// Looks up a localized string similar to Bosnia ed Erzegovina. /// public static string BA { get { return ResourceManager.GetString("BA", resourceCulture); } } /// /// Looks up a localized string similar to Barbados. /// public static string BB { get { return ResourceManager.GetString("BB", resourceCulture); } } /// /// Looks up a localized string similar to Bangladesh. /// public static string BD { get { return ResourceManager.GetString("BD", resourceCulture); } } /// /// Looks up a localized string similar to Belgio. /// public static string BE { get { return ResourceManager.GetString("BE", resourceCulture); } } /// /// Looks up a localized string similar to Burkina Faso. /// public static string BF { get { return ResourceManager.GetString("BF", resourceCulture); } } /// /// Looks up a localized string similar to Bulgaria. /// public static string BG { get { return ResourceManager.GetString("BG", resourceCulture); } } /// /// Looks up a localized string similar to Bahrein. /// public static string BH { get { return ResourceManager.GetString("BH", resourceCulture); } } /// /// Looks up a localized string similar to Burundi. /// public static string BI { get { return ResourceManager.GetString("BI", resourceCulture); } } /// /// Looks up a localized string similar to Benin. /// public static string BJ { get { return ResourceManager.GetString("BJ", resourceCulture); } } /// /// Looks up a localized string similar to Saint-Barthélemy. /// public static string BL { get { return ResourceManager.GetString("BL", resourceCulture); } } /// /// Looks up a localized string similar to Bermuda. /// public static string BM { get { return ResourceManager.GetString("BM", resourceCulture); } } /// /// Looks up a localized string similar to Brunei. /// public static string BN { get { return ResourceManager.GetString("BN", resourceCulture); } } /// /// Looks up a localized string similar to Bolivia. /// public static string BO { get { return ResourceManager.GetString("BO", resourceCulture); } } /// /// Looks up a localized string similar to Isole BES. /// public static string BQ { get { return ResourceManager.GetString("BQ", resourceCulture); } } /// /// Looks up a localized string similar to Brasile. /// public static string BR { get { return ResourceManager.GetString("BR", resourceCulture); } } /// /// Looks up a localized string similar to Bahamas. /// public static string BS { get { return ResourceManager.GetString("BS", resourceCulture); } } /// /// Looks up a localized string similar to Bhutan. /// public static string BT { get { return ResourceManager.GetString("BT", resourceCulture); } } /// /// Looks up a localized string similar to Isola Bouvet. /// public static string BV { get { return ResourceManager.GetString("BV", resourceCulture); } } /// /// Looks up a localized string similar to Botswana. /// public static string BW { get { return ResourceManager.GetString("BW", resourceCulture); } } /// /// Looks up a localized string similar to Bielorussia. /// public static string BY { get { return ResourceManager.GetString("BY", resourceCulture); } } /// /// Looks up a localized string similar to Belize. /// public static string BZ { get { return ResourceManager.GetString("BZ", resourceCulture); } } /// /// Looks up a localized string similar to Canada. /// public static string CA { get { return ResourceManager.GetString("CA", resourceCulture); } } /// /// Looks up a localized string similar to Isole Cocos e Keeling. /// public static string CC { get { return ResourceManager.GetString("CC", resourceCulture); } } /// /// Looks up a localized string similar to Repubblica Democratica del Congo. /// public static string CD { get { return ResourceManager.GetString("CD", resourceCulture); } } /// /// Looks up a localized string similar to Repubblica Centrafricana. /// public static string CF { get { return ResourceManager.GetString("CF", resourceCulture); } } /// /// Looks up a localized string similar to Congo. /// public static string CG { get { return ResourceManager.GetString("CG", resourceCulture); } } /// /// Looks up a localized string similar to Svizzera. /// public static string CH { get { return ResourceManager.GetString("CH", resourceCulture); } } /// /// Looks up a localized string similar to Costa d'Avorio. /// public static string CI { get { return ResourceManager.GetString("CI", resourceCulture); } } /// /// Looks up a localized string similar to Isole Cook. /// public static string CK { get { return ResourceManager.GetString("CK", resourceCulture); } } /// /// Looks up a localized string similar to Cile. /// public static string CL { get { return ResourceManager.GetString("CL", resourceCulture); } } /// /// Looks up a localized string similar to Camerun. /// public static string CM { get { return ResourceManager.GetString("CM", resourceCulture); } } /// /// Looks up a localized string similar to Cina. /// public static string CN { get { return ResourceManager.GetString("CN", resourceCulture); } } /// /// Looks up a localized string similar to Colombia. /// public static string CO { get { return ResourceManager.GetString("CO", resourceCulture); } } /// /// Looks up a localized string similar to Costa Rica. /// public static string CR { get { return ResourceManager.GetString("CR", resourceCulture); } } /// /// Looks up a localized string similar to Cuba. /// public static string CU { get { return ResourceManager.GetString("CU", resourceCulture); } } /// /// Looks up a localized string similar to Capo Verde. /// public static string CV { get { return ResourceManager.GetString("CV", resourceCulture); } } /// /// Looks up a localized string similar to Curaçao. /// public static string CW { get { return ResourceManager.GetString("CW", resourceCulture); } } /// /// Looks up a localized string similar to Isola del Natale. /// public static string CX { get { return ResourceManager.GetString("CX", resourceCulture); } } /// /// Looks up a localized string similar to Cipro. /// public static string CY { get { return ResourceManager.GetString("CY", resourceCulture); } } /// /// Looks up a localized string similar to Cechia. /// public static string CZ { get { return ResourceManager.GetString("CZ", resourceCulture); } } /// /// Looks up a localized string similar to Germania. /// public static string DE { get { return ResourceManager.GetString("DE", resourceCulture); } } /// /// Looks up a localized string similar to Gibuti. /// public static string DJ { get { return ResourceManager.GetString("DJ", resourceCulture); } } /// /// Looks up a localized string similar to Danimarka. /// public static string DK { get { return ResourceManager.GetString("DK", resourceCulture); } } /// /// Looks up a localized string similar to Dominica. /// public static string DM { get { return ResourceManager.GetString("DM", resourceCulture); } } /// /// Looks up a localized string similar to Repubblica Dominicana. /// public static string DO { get { return ResourceManager.GetString("DO", resourceCulture); } } /// /// Looks up a localized string similar to Algeria. /// public static string DZ { get { return ResourceManager.GetString("DZ", resourceCulture); } } /// /// Looks up a localized string similar to Ecuador. /// public static string EC { get { return ResourceManager.GetString("EC", resourceCulture); } } /// /// Looks up a localized string similar to Estonia. /// public static string EE { get { return ResourceManager.GetString("EE", resourceCulture); } } /// /// Looks up a localized string similar to Egitto. /// public static string EG { get { return ResourceManager.GetString("EG", resourceCulture); } } /// /// Looks up a localized string similar to Sahara Occidentale. /// public static string EH { get { return ResourceManager.GetString("EH", resourceCulture); } } /// /// Looks up a localized string similar to Grecia EL. /// public static string EL { get { return ResourceManager.GetString("EL", resourceCulture); } } /// /// Looks up a localized string similar to Eritrea. /// public static string ER { get { return ResourceManager.GetString("ER", resourceCulture); } } /// /// Looks up a localized string similar to Spagna. /// public static string ES { get { return ResourceManager.GetString("ES", resourceCulture); } } /// /// Looks up a localized string similar to Etiopia. /// public static string ET { get { return ResourceManager.GetString("ET", resourceCulture); } } /// /// Looks up a localized string similar to Finlandia. /// public static string FI { get { return ResourceManager.GetString("FI", resourceCulture); } } /// /// Looks up a localized string similar to Figi. /// public static string FJ { get { return ResourceManager.GetString("FJ", resourceCulture); } } /// /// Looks up a localized string similar to Isole Falkland. /// public static string FK { get { return ResourceManager.GetString("FK", resourceCulture); } } /// /// Looks up a localized string similar to Micronesia. /// public static string FM { get { return ResourceManager.GetString("FM", resourceCulture); } } /// /// Looks up a localized string similar to Isole Fær Øer. /// public static string FO { get { return ResourceManager.GetString("FO", resourceCulture); } } /// /// Looks up a localized string similar to Francia. /// public static string FR { get { return ResourceManager.GetString("FR", resourceCulture); } } /// /// Looks up a localized string similar to Gabon. /// public static string GA { get { return ResourceManager.GetString("GA", resourceCulture); } } /// /// Looks up a localized string similar to Regno Unito. /// public static string GB { get { return ResourceManager.GetString("GB", resourceCulture); } } /// /// Looks up a localized string similar to Grenada. /// public static string GD { get { return ResourceManager.GetString("GD", resourceCulture); } } /// /// Looks up a localized string similar to Georgia. /// public static string GE { get { return ResourceManager.GetString("GE", resourceCulture); } } /// /// Looks up a localized string similar to Guyana Francese. /// public static string GF { get { return ResourceManager.GetString("GF", resourceCulture); } } /// /// Looks up a localized string similar to Guernsey. /// public static string GG { get { return ResourceManager.GetString("GG", resourceCulture); } } /// /// Looks up a localized string similar to Ghana. /// public static string GH { get { return ResourceManager.GetString("GH", resourceCulture); } } /// /// Looks up a localized string similar to Gibilterra. /// public static string GI { get { return ResourceManager.GetString("GI", resourceCulture); } } /// /// Looks up a localized string similar to Groenlandia. /// public static string GL { get { return ResourceManager.GetString("GL", resourceCulture); } } /// /// Looks up a localized string similar to Gambia. /// public static string GM { get { return ResourceManager.GetString("GM", resourceCulture); } } /// /// Looks up a localized string similar to Guinea. /// public static string GN { get { return ResourceManager.GetString("GN", resourceCulture); } } /// /// Looks up a localized string similar to Guadalupa. /// public static string GP { get { return ResourceManager.GetString("GP", resourceCulture); } } /// /// Looks up a localized string similar to Guinea Equatoriale. /// public static string GQ { get { return ResourceManager.GetString("GQ", resourceCulture); } } /// /// Looks up a localized string similar to Grecia GR. /// public static string GR { get { return ResourceManager.GetString("GR", resourceCulture); } } /// /// Looks up a localized string similar to Georgia del Sud e Isole Sandwich meridionali. /// public static string GS { get { return ResourceManager.GetString("GS", resourceCulture); } } /// /// Looks up a localized string similar to Guatemala. /// public static string GT { get { return ResourceManager.GetString("GT", resourceCulture); } } /// /// Looks up a localized string similar to Guam. /// public static string GU { get { return ResourceManager.GetString("GU", resourceCulture); } } /// /// Looks up a localized string similar to Guinea-Bissau. /// public static string GW { get { return ResourceManager.GetString("GW", resourceCulture); } } /// /// Looks up a localized string similar to Guyana. /// public static string GY { get { return ResourceManager.GetString("GY", resourceCulture); } } /// /// Looks up a localized string similar to Hong Kong. /// public static string HK { get { return ResourceManager.GetString("HK", resourceCulture); } } /// /// Looks up a localized string similar to Isole Heard e McDonald. /// public static string HM { get { return ResourceManager.GetString("HM", resourceCulture); } } /// /// Looks up a localized string similar to Honduras. /// public static string HN { get { return ResourceManager.GetString("HN", resourceCulture); } } /// /// Looks up a localized string similar to Croazia. /// public static string HR { get { return ResourceManager.GetString("HR", resourceCulture); } } /// /// Looks up a localized string similar to Haiti. /// public static string HT { get { return ResourceManager.GetString("HT", resourceCulture); } } /// /// Looks up a localized string similar to Ungheria. /// public static string HU { get { return ResourceManager.GetString("HU", resourceCulture); } } /// /// Looks up a localized string similar to Indonesia. /// public static string ID { get { return ResourceManager.GetString("ID", resourceCulture); } } /// /// Looks up a localized string similar to Irlanda. /// public static string IE { get { return ResourceManager.GetString("IE", resourceCulture); } } /// /// Looks up a localized string similar to Israele. /// public static string IL { get { return ResourceManager.GetString("IL", resourceCulture); } } /// /// Looks up a localized string similar to Isola di Man. /// public static string IM { get { return ResourceManager.GetString("IM", resourceCulture); } } /// /// Looks up a localized string similar to India. /// public static string IN { get { return ResourceManager.GetString("IN", resourceCulture); } } /// /// Looks up a localized string similar to Territori Britannici dell'Oceano Indiano. /// public static string IO { get { return ResourceManager.GetString("IO", resourceCulture); } } /// /// Looks up a localized string similar to Iraq. /// public static string IQ { get { return ResourceManager.GetString("IQ", resourceCulture); } } /// /// Looks up a localized string similar to Iran. /// public static string IR { get { return ResourceManager.GetString("IR", resourceCulture); } } /// /// Looks up a localized string similar to Islanda. /// public static string IS { get { return ResourceManager.GetString("IS", resourceCulture); } } /// /// Looks up a localized string similar to Italia. /// public static string IT { get { return ResourceManager.GetString("IT", resourceCulture); } } /// /// Looks up a localized string similar to Jersey. /// public static string JE { get { return ResourceManager.GetString("JE", resourceCulture); } } /// /// Looks up a localized string similar to Giamaica. /// public static string JM { get { return ResourceManager.GetString("JM", resourceCulture); } } /// /// Looks up a localized string similar to Giordania. /// public static string JO { get { return ResourceManager.GetString("JO", resourceCulture); } } /// /// Looks up a localized string similar to Giappone. /// public static string JP { get { return ResourceManager.GetString("JP", resourceCulture); } } /// /// Looks up a localized string similar to Kenya. /// public static string KE { get { return ResourceManager.GetString("KE", resourceCulture); } } /// /// Looks up a localized string similar to Kirghizistan. /// public static string KG { get { return ResourceManager.GetString("KG", resourceCulture); } } /// /// Looks up a localized string similar to Cambogia. /// public static string KH { get { return ResourceManager.GetString("KH", resourceCulture); } } /// /// Looks up a localized string similar to Kiribati. /// public static string KI { get { return ResourceManager.GetString("KI", resourceCulture); } } /// /// Looks up a localized string similar to Comore. /// public static string KM { get { return ResourceManager.GetString("KM", resourceCulture); } } /// /// Looks up a localized string similar to Saint Kitts e Nevis. /// public static string KN { get { return ResourceManager.GetString("KN", resourceCulture); } } /// /// Looks up a localized string similar to Corea del Nord. /// public static string KP { get { return ResourceManager.GetString("KP", resourceCulture); } } /// /// Looks up a localized string similar to Corea del Sud. /// public static string KR { get { return ResourceManager.GetString("KR", resourceCulture); } } /// /// Looks up a localized string similar to Kuwait. /// public static string KW { get { return ResourceManager.GetString("KW", resourceCulture); } } /// /// Looks up a localized string similar to Isole Cayman. /// public static string KY { get { return ResourceManager.GetString("KY", resourceCulture); } } /// /// Looks up a localized string similar to Kazakistan. /// public static string KZ { get { return ResourceManager.GetString("KZ", resourceCulture); } } /// /// Looks up a localized string similar to Laos. /// public static string LA { get { return ResourceManager.GetString("LA", resourceCulture); } } /// /// Looks up a localized string similar to Libano. /// public static string LB { get { return ResourceManager.GetString("LB", resourceCulture); } } /// /// Looks up a localized string similar to Santa Lucia. /// public static string LC { get { return ResourceManager.GetString("LC", resourceCulture); } } /// /// Looks up a localized string similar to Liechtenstein. /// public static string LI { get { return ResourceManager.GetString("LI", resourceCulture); } } /// /// Looks up a localized string similar to Sri Lanka. /// public static string LK { get { return ResourceManager.GetString("LK", resourceCulture); } } /// /// Looks up a localized string similar to Liberia. /// public static string LR { get { return ResourceManager.GetString("LR", resourceCulture); } } /// /// Looks up a localized string similar to Lesotho. /// public static string LS { get { return ResourceManager.GetString("LS", resourceCulture); } } /// /// Looks up a localized string similar to Lituania. /// public static string LT { get { return ResourceManager.GetString("LT", resourceCulture); } } /// /// Looks up a localized string similar to Lussemburgo. /// public static string LU { get { return ResourceManager.GetString("LU", resourceCulture); } } /// /// Looks up a localized string similar to Lettonia. /// public static string LV { get { return ResourceManager.GetString("LV", resourceCulture); } } /// /// Looks up a localized string similar to Libia. /// public static string LY { get { return ResourceManager.GetString("LY", resourceCulture); } } /// /// Looks up a localized string similar to Marocco. /// public static string MA { get { return ResourceManager.GetString("MA", resourceCulture); } } /// /// Looks up a localized string similar to Monaco. /// public static string MC { get { return ResourceManager.GetString("MC", resourceCulture); } } /// /// Looks up a localized string similar to Moldavia. /// public static string MD { get { return ResourceManager.GetString("MD", resourceCulture); } } /// /// Looks up a localized string similar to Montenegro. /// public static string ME { get { return ResourceManager.GetString("ME", resourceCulture); } } /// /// Looks up a localized string similar to Saint-Martin. /// public static string MF { get { return ResourceManager.GetString("MF", resourceCulture); } } /// /// Looks up a localized string similar to Madagascar. /// public static string MG { get { return ResourceManager.GetString("MG", resourceCulture); } } /// /// Looks up a localized string similar to Isole Marshall. /// public static string MH { get { return ResourceManager.GetString("MH", resourceCulture); } } /// /// Looks up a localized string similar to Macedonia. /// public static string MK { get { return ResourceManager.GetString("MK", resourceCulture); } } /// /// Looks up a localized string similar to Mali. /// public static string ML { get { return ResourceManager.GetString("ML", resourceCulture); } } /// /// Looks up a localized string similar to Birmania. /// public static string MM { get { return ResourceManager.GetString("MM", resourceCulture); } } /// /// Looks up a localized string similar to Mongolia. /// public static string MN { get { return ResourceManager.GetString("MN", resourceCulture); } } /// /// Looks up a localized string similar to Macao. /// public static string MO { get { return ResourceManager.GetString("MO", resourceCulture); } } /// /// Looks up a localized string similar to Isole Marianne Settentrionali. /// public static string MP { get { return ResourceManager.GetString("MP", resourceCulture); } } /// /// Looks up a localized string similar to Martinica. /// public static string MQ { get { return ResourceManager.GetString("MQ", resourceCulture); } } /// /// Looks up a localized string similar to Mauritania. /// public static string MR { get { return ResourceManager.GetString("MR", resourceCulture); } } /// /// Looks up a localized string similar to Montserrat. /// public static string MS { get { return ResourceManager.GetString("MS", resourceCulture); } } /// /// Looks up a localized string similar to Malta. /// public static string MT { get { return ResourceManager.GetString("MT", resourceCulture); } } /// /// Looks up a localized string similar to Mauritius. /// public static string MU { get { return ResourceManager.GetString("MU", resourceCulture); } } /// /// Looks up a localized string similar to Maldive. /// public static string MV { get { return ResourceManager.GetString("MV", resourceCulture); } } /// /// Looks up a localized string similar to Malawi. /// public static string MW { get { return ResourceManager.GetString("MW", resourceCulture); } } /// /// Looks up a localized string similar to Messico. /// public static string MX { get { return ResourceManager.GetString("MX", resourceCulture); } } /// /// Looks up a localized string similar to Malesia. /// public static string MY { get { return ResourceManager.GetString("MY", resourceCulture); } } /// /// Looks up a localized string similar to Mozambico. /// public static string MZ { get { return ResourceManager.GetString("MZ", resourceCulture); } } /// /// Looks up a localized string similar to Namibia. /// public static string NA { get { return ResourceManager.GetString("NA", resourceCulture); } } /// /// Looks up a localized string similar to Nuova Caledonia. /// public static string NC { get { return ResourceManager.GetString("NC", resourceCulture); } } /// /// Looks up a localized string similar to Niger. /// public static string NE { get { return ResourceManager.GetString("NE", resourceCulture); } } /// /// Looks up a localized string similar to Isole Norfolk. /// public static string NF { get { return ResourceManager.GetString("NF", resourceCulture); } } /// /// Looks up a localized string similar to Nigeria. /// public static string NG { get { return ResourceManager.GetString("NG", resourceCulture); } } /// /// Looks up a localized string similar to Nicaragua. /// public static string NI { get { return ResourceManager.GetString("NI", resourceCulture); } } /// /// Looks up a localized string similar to Paesi Bassi. /// public static string NL { get { return ResourceManager.GetString("NL", resourceCulture); } } /// /// Looks up a localized string similar to Norvegia. /// public static string NO { get { return ResourceManager.GetString("NO", resourceCulture); } } /// /// Looks up a localized string similar to Nepal. /// public static string NP { get { return ResourceManager.GetString("NP", resourceCulture); } } /// /// Looks up a localized string similar to Nauru. /// public static string NR { get { return ResourceManager.GetString("NR", resourceCulture); } } /// /// Looks up a localized string similar to Niue. /// public static string NU { get { return ResourceManager.GetString("NU", resourceCulture); } } /// /// Looks up a localized string similar to Nuova Zelanda. /// public static string NZ { get { return ResourceManager.GetString("NZ", resourceCulture); } } /// /// Looks up a localized string similar to Oman. /// public static string OM { get { return ResourceManager.GetString("OM", resourceCulture); } } /// /// Looks up a localized string similar to Campione d'Italia e Livigno. /// public static string OO { get { return ResourceManager.GetString("OO", resourceCulture); } } /// /// Looks up a localized string similar to Panama. /// public static string PA { get { return ResourceManager.GetString("PA", resourceCulture); } } /// /// Looks up a localized string similar to Perù. /// public static string PE { get { return ResourceManager.GetString("PE", resourceCulture); } } /// /// Looks up a localized string similar to Polinesia Francese. /// public static string PF { get { return ResourceManager.GetString("PF", resourceCulture); } } /// /// Looks up a localized string similar to Papua Nuova Guinea. /// public static string PG { get { return ResourceManager.GetString("PG", resourceCulture); } } /// /// Looks up a localized string similar to Filippine. /// public static string PH { get { return ResourceManager.GetString("PH", resourceCulture); } } /// /// Looks up a localized string similar to Pakistan. /// public static string PK { get { return ResourceManager.GetString("PK", resourceCulture); } } /// /// Looks up a localized string similar to Polonia. /// public static string PL { get { return ResourceManager.GetString("PL", resourceCulture); } } /// /// Looks up a localized string similar to Saint-Pierre e Miquelon. /// public static string PM { get { return ResourceManager.GetString("PM", resourceCulture); } } /// /// Looks up a localized string similar to Isole Pitcairn. /// public static string PN { get { return ResourceManager.GetString("PN", resourceCulture); } } /// /// Looks up a localized string similar to Porto Rico. /// public static string PR { get { return ResourceManager.GetString("PR", resourceCulture); } } /// /// Looks up a localized string similar to Stato di Palestina. /// public static string PS { get { return ResourceManager.GetString("PS", resourceCulture); } } /// /// Looks up a localized string similar to Portogallo. /// public static string PT { get { return ResourceManager.GetString("PT", resourceCulture); } } /// /// Looks up a localized string similar to Palau. /// public static string PW { get { return ResourceManager.GetString("PW", resourceCulture); } } /// /// Looks up a localized string similar to Paraguay. /// public static string PY { get { return ResourceManager.GetString("PY", resourceCulture); } } /// /// Looks up a localized string similar to Qatar. /// public static string QA { get { return ResourceManager.GetString("QA", resourceCulture); } } /// /// Looks up a localized string similar to Réunion. /// public static string RE { get { return ResourceManager.GetString("RE", resourceCulture); } } /// /// Looks up a localized string similar to Romania. /// public static string RO { get { return ResourceManager.GetString("RO", resourceCulture); } } /// /// Looks up a localized string similar to Serbia. /// public static string RS { get { return ResourceManager.GetString("RS", resourceCulture); } } /// /// Looks up a localized string similar to Russia. /// public static string RU { get { return ResourceManager.GetString("RU", resourceCulture); } } /// /// Looks up a localized string similar to Ruanda. /// public static string RW { get { return ResourceManager.GetString("RW", resourceCulture); } } /// /// Looks up a localized string similar to Arabia Saudita. /// public static string SA { get { return ResourceManager.GetString("SA", resourceCulture); } } /// /// Looks up a localized string similar to Isole Solomon. /// public static string SB { get { return ResourceManager.GetString("SB", resourceCulture); } } /// /// Looks up a localized string similar to Seychelles. /// public static string SC { get { return ResourceManager.GetString("SC", resourceCulture); } } /// /// Looks up a localized string similar to Sudan. /// public static string SD { get { return ResourceManager.GetString("SD", resourceCulture); } } /// /// Looks up a localized string similar to Svezia. /// public static string SE { get { return ResourceManager.GetString("SE", resourceCulture); } } /// /// Looks up a localized string similar to Singapore. /// public static string SG { get { return ResourceManager.GetString("SG", resourceCulture); } } /// /// Looks up a localized string similar to Sant'Elena, Isola di Acensione e Tristan da Cunha. /// public static string SH { get { return ResourceManager.GetString("SH", resourceCulture); } } /// /// Looks up a localized string similar to Slovenia. /// public static string SI { get { return ResourceManager.GetString("SI", resourceCulture); } } /// /// Looks up a localized string similar to Svalbard e Jan Mayen. /// public static string SJ { get { return ResourceManager.GetString("SJ", resourceCulture); } } /// /// Looks up a localized string similar to Slovacchia. /// public static string SK { get { return ResourceManager.GetString("SK", resourceCulture); } } /// /// Looks up a localized string similar to Sierra Leone. /// public static string SL { get { return ResourceManager.GetString("SL", resourceCulture); } } /// /// Looks up a localized string similar to San Marino. /// public static string SM { get { return ResourceManager.GetString("SM", resourceCulture); } } /// /// Looks up a localized string similar to Senegal. /// public static string SN { get { return ResourceManager.GetString("SN", resourceCulture); } } /// /// Looks up a localized string similar to Somalia. /// public static string SO { get { return ResourceManager.GetString("SO", resourceCulture); } } /// /// Looks up a localized string similar to Suriname. /// public static string SR { get { return ResourceManager.GetString("SR", resourceCulture); } } /// /// Looks up a localized string similar to Sudan del Sud. /// public static string SS { get { return ResourceManager.GetString("SS", resourceCulture); } } /// /// Looks up a localized string similar to Sao Tome e Principe. /// public static string ST { get { return ResourceManager.GetString("ST", resourceCulture); } } /// /// Looks up a localized string similar to El Salvador. /// public static string SV { get { return ResourceManager.GetString("SV", resourceCulture); } } /// /// Looks up a localized string similar to Sint Maarten. /// public static string SX { get { return ResourceManager.GetString("SX", resourceCulture); } } /// /// Looks up a localized string similar to Siria. /// public static string SY { get { return ResourceManager.GetString("SY", resourceCulture); } } /// /// Looks up a localized string similar to Swaziland. /// public static string SZ { get { return ResourceManager.GetString("SZ", resourceCulture); } } /// /// Looks up a localized string similar to Isole Turks e Caicos. /// public static string TC { get { return ResourceManager.GetString("TC", resourceCulture); } } /// /// Looks up a localized string similar to Ciad. /// public static string TD { get { return ResourceManager.GetString("TD", resourceCulture); } } /// /// Looks up a localized string similar to Territori Francesi del Sud. /// public static string TF { get { return ResourceManager.GetString("TF", resourceCulture); } } /// /// Looks up a localized string similar to Togo. /// public static string TG { get { return ResourceManager.GetString("TG", resourceCulture); } } /// /// Looks up a localized string similar to Tailandia. /// public static string TH { get { return ResourceManager.GetString("TH", resourceCulture); } } /// /// Looks up a localized string similar to Tagikistan. /// public static string TJ { get { return ResourceManager.GetString("TJ", resourceCulture); } } /// /// Looks up a localized string similar to Tokelau. /// public static string TK { get { return ResourceManager.GetString("TK", resourceCulture); } } /// /// Looks up a localized string similar to Timor Est. /// public static string TL { get { return ResourceManager.GetString("TL", resourceCulture); } } /// /// Looks up a localized string similar to Turkmenistan. /// public static string TM { get { return ResourceManager.GetString("TM", resourceCulture); } } /// /// Looks up a localized string similar to Tunisia. /// public static string TN { get { return ResourceManager.GetString("TN", resourceCulture); } } /// /// Looks up a localized string similar to Tonga. /// public static string TO { get { return ResourceManager.GetString("TO", resourceCulture); } } /// /// Looks up a localized string similar to Turchia. /// public static string TR { get { return ResourceManager.GetString("TR", resourceCulture); } } /// /// Looks up a localized string similar to Trinidad e Tobago. /// public static string TT { get { return ResourceManager.GetString("TT", resourceCulture); } } /// /// Looks up a localized string similar to Tuvalu. /// public static string TV { get { return ResourceManager.GetString("TV", resourceCulture); } } /// /// Looks up a localized string similar to Taiwan (Repubblica di Cina). /// public static string TW { get { return ResourceManager.GetString("TW", resourceCulture); } } /// /// Looks up a localized string similar to Tanzania. /// public static string TZ { get { return ResourceManager.GetString("TZ", resourceCulture); } } /// /// Looks up a localized string similar to Ucraina. /// public static string UA { get { return ResourceManager.GetString("UA", resourceCulture); } } /// /// Looks up a localized string similar to Uganda. /// public static string UG { get { return ResourceManager.GetString("UG", resourceCulture); } } /// /// Looks up a localized string similar to Isole Minor Esterne degli Stati Uniti. /// public static string UM { get { return ResourceManager.GetString("UM", resourceCulture); } } /// /// Looks up a localized string similar to Stati Uniti. /// public static string US { get { return ResourceManager.GetString("US", resourceCulture); } } /// /// Looks up a localized string similar to Uruguay. /// public static string UY { get { return ResourceManager.GetString("UY", resourceCulture); } } /// /// Looks up a localized string similar to Uzbekistan. /// public static string UZ { get { return ResourceManager.GetString("UZ", resourceCulture); } } /// /// Looks up a localized string similar to Città del Vaticano. /// public static string VA { get { return ResourceManager.GetString("VA", resourceCulture); } } /// /// Looks up a localized string similar to Saint Vincent e Grenadine. /// public static string VC { get { return ResourceManager.GetString("VC", resourceCulture); } } /// /// Looks up a localized string similar to Venezuela. /// public static string VE { get { return ResourceManager.GetString("VE", resourceCulture); } } /// /// Looks up a localized string similar to Isole Vergini britanniche. /// public static string VG { get { return ResourceManager.GetString("VG", resourceCulture); } } /// /// Looks up a localized string similar to Isole Vergini americane. /// public static string VI { get { return ResourceManager.GetString("VI", resourceCulture); } } /// /// Looks up a localized string similar to Vietnam. /// public static string VN { get { return ResourceManager.GetString("VN", resourceCulture); } } /// /// Looks up a localized string similar to Vanuatu. /// public static string VU { get { return ResourceManager.GetString("VU", resourceCulture); } } /// /// Looks up a localized string similar to Wallis e Futuna. /// public static string WF { get { return ResourceManager.GetString("WF", resourceCulture); } } /// /// Looks up a localized string similar to Samoa. /// public static string WS { get { return ResourceManager.GetString("WS", resourceCulture); } } /// /// Looks up a localized string similar to Irlanda del Nord. /// public static string XI { get { return ResourceManager.GetString("XI", resourceCulture); } } /// /// Looks up a localized string similar to Kosovo. /// public static string XK { get { return ResourceManager.GetString("XK", resourceCulture); } } /// /// Looks up a localized string similar to Yemen. /// public static string YE { get { return ResourceManager.GetString("YE", resourceCulture); } } /// /// Looks up a localized string similar to Mayotte. /// public static string YT { get { return ResourceManager.GetString("YT", resourceCulture); } } /// /// Looks up a localized string similar to Sud Africa. /// public static string ZA { get { return ResourceManager.GetString("ZA", resourceCulture); } } /// /// Looks up a localized string similar to Zambia. /// public static string ZM { get { return ResourceManager.GetString("ZM", resourceCulture); } } /// /// Looks up a localized string similar to Zimbabwe. /// public static string ZW { get { return ResourceManager.GetString("ZW", resourceCulture); } } } } ================================================ FILE: Resources/IdPaese.de.resx ================================================  text/microsoft-resx 1.3 System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Afghanistan Åland-Inseln Albanien Algerien Amerikanisch-Samoa Andorra Angola Anguilla Antarktis Antigua und Barbuda Argentinien Armenien Aruba Australien Österreich Aserbaidschan Bahamas Bahrain Bangladesch Barbados Weißrussland Belgien Belize Benin Bermuda Bhutan Bolivien BES-Inseln Bosnien und Herzegowina Botswana Bouvetinsel Brasilien Britisches Territorium im Indischen Ozean Brunei Bulgarien Burkina Faso Burundi Kambodscha Kamerun Kanada Kap Verde Kaimaninseln Zentralafrikanische Republik Tschad Chile China Weihnachtsinsel Kokosinseln Kolumbien Komoren Kongo Demokratische Republik Kongo Cookinseln Costa Rica Elfenbeinküste Kroatien Kuba Curaçao Zypern Tschechien Dänemark Dschibuti Dominica Dominikanische Republik Ecuador Ägypten El Salvador Äquatorialguinea Eritrea Estland Äthiopien Falklandinseln Färöer Fidschi Finnland Frankreich Französisch-Guayana Französisch-Polynesien Französische Süd- und Antarktisgebiete Gabun Gambia Georgien Deutschland Ghana Gibraltar Griechenland Grönland Grenada Guadeloupe Guam Guatemala Guernsey Guinea Guinea-Bissau Guyana Haiti Heard und McDonaldinseln Vatikanstadt Honduras Hongkong Ungarn Island Indien Indonesien Iran Irak Irland Isle of Man Israel Italien Jamaika Japan Jersey Jordanien Kasachstan Kenia Kiribati Nordkorea Südkorea Kuwait Kirgisistan Laos Lettland Libanon Lesotho Liberia Libyen Liechtenstein Litauen Luxemburg Macau Nordmazedonien Madagaskar Malawi Malaysia Malediven Mali Malta Marshallinseln Martinique Mauretanien Mauritius Mayotte Mexiko Mikronesien Moldawien Monaco Mongolei Montenegro Montserrat Marokko Mosambik Myanmar Namibia Nauru Nepal Niederlande Neukaledonien Neuseeland Nicaragua Niger Nigeria Niue Norfolkinsel Nördliche Marianen Norwegen Oman Pakistan Palau Palästina Panama Papua-Neuguinea Paraguay Peru Philippinen Pitcairninseln Polen Portugal Puerto Rico Katar Réunion Rumänien Russland Ruanda Saint-Barthélemy St. Helena, Ascension und Tristan da Cunha St. Kitts und Nevis St. Lucia Saint-Martin Saint-Pierre und Miquelon St. Vincent und die Grenadinen Samoa San Marino São Tomé und Príncipe Saudi-Arabien Senegal Serbien Seychellen Sierra Leone Singapur Sint Maarten Slowakei Slowenien Salomonen Somalia Südafrika Südgeorgien und die Südlichen Sandwichinseln Südsudan Spanien Sri Lanka Sudan Suriname Svalbard und Jan Mayen Eswatini Schweden Schweiz Syrien Taiwan Tadschikistan Tansania Thailand Timor-Leste Togo Tokelau Tonga Trinidad und Tobago Tunesien Türkei Turkmenistan Turks- und Caicosinseln Tuvalu Uganda Ukraine Vereinigte Arabische Emirate Vereinigtes Königreich Vereinigte Staaten Amerikanisch-Ozeanien Uruguay Usbekistan Vanuatu Venezuela Vietnam Britische Jungferninseln Amerikanische Jungferninseln Wallis und Futuna Westsahara Jemen Sambia Simbabwe Kosovo Nordirland Campione d'Italia und Livigno Griechenland EL ================================================ FILE: Resources/IdPaese.en.resx ================================================ text/microsoft-resx 1.3 System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Afghanistan Åland Islands Albania Algeria American Samoa Andorra Angola Anguilla Antarctica Antigua and Barbuda Argentina Armenia Aruba Australia Austria Azerbaijan Bahamas Bahrain Bangladesh Barbados Belarus Belgium Belize Benin Bermuda Bhutan Bolivia BES Islands Bosnia and Herzegovina Botswana Bouvet Island Brazil British Indian Ocean Territory Brunei Bulgaria Burkina Faso Burundi Cambodia Cameroon Canada Cape Verde Cayman Islands Central African Republic Chad Chile China Christmas Island Cocos (Keeling) Islands Colombia Comoros Congo Democratic Republic of the Congo Cook Islands Costa Rica Ivory Coast Croatia Cuba Curaçao Cyprus Czech Republic Denmark Djibouti Dominica Dominican Republic Ecuador Egypt El Salvador Equatorial Guinea Eritrea Estonia Ethiopia Falkland Islands Faroe Islands Fiji Finland France French Guiana French Polynesia French Southern Territories Gabon Gambia Georgia Germany Ghana Gibraltar Greece Greenland Grenada Guadeloupe Guam Guatemala Guernsey Guinea Guinea-Bissau Guyana Haiti Heard Island and McDonald Islands Vatican City Honduras Hong Kong Hungary Iceland India Indonesia Iran Iraq Ireland Isle of Man Israel Italy Jamaica Japan Jersey Jordan Kazakhstan Kenya Kiribati North Korea South Korea Kuwait Kyrgyzstan Laos Latvia Lebanon Switzerland Saint-Barthélemy United Arab Emirates West Sahara Greece EL Spain Micronesia United Kingdom South Georgia and the South Sandwich Islands Saint Lucia Liechtenstein Sri Lanka Liberia Lesotho Lithuania Luxemburg Libya Morocco Monaco Moldova Montenegro Saint-Martin Madagascar Marshall Isles Macedonia Mali Myanmar Mongolia Macau Northern Mariana Islands Malawi Malaysia Maldives Malta Martinique Mauritania Mauritius Mayotte Mexico Montserrat Mozambique Namibia Nauru Nepal Netherlands New Caledonia New Zealand Nicaragua Niger Nigeria Niue Norfolk Island Norway Oman Pakistan Palau State of Palestine Panama Papua New Guinea Paraguay Peru Philippines Pitcairn Islands Poland Portugal Puerto Rico Qatar Réunion Romania Russia Rwanda Saint Helena, Ascension and Tristan da Cunha Saint Kitts and Nevis Saint Pierre and Miquelon Saint Vincent and the Grenadines Samoa San Marino Sao Tome and Principe Saudi Arabia Senegal Serbia Seychelles Sierra Leone Singapore Sint Maarten Slovakia Slovenia Solomon Islands Somalia South Africa South Sudan Sudan Suriname Svalbard and Jan Mayen Eswatini Sweden Syria Taiwan Tajikistan Tanzania Thailand East Timor Togo Tokelau Tonga Trinidad and Tobago Tunisia Turkey Turkmenistan Turks and Caicos Islands Tuvalu Uganda Ukraine United States United States Minor Outlying Islands Uruguay Uzbekistan Vanuatu Venezuela Vietnam British Virgin Islands U.S. Virgin Islands Wallis and Futuna Yemen Zambia Zimbabwe Kosovo Northern Ireland Campione d'Italia and Livigno ================================================ FILE: Resources/IdPaese.resx ================================================  text/microsoft-resx 1.3 System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Afghanistan Isole Åland Albania Algeria Samoa Americane Andorra Angola Anguilla Antartide Antigua e Barbuda Argentina Armenia Aruba Australia Austria Azerbaigian Bahamas Bahrein Bangladesh Barbados Bielorussia Belgio Belize Benin Bermuda Bhutan Bolivia Isole BES Bosnia ed Erzegovina Botswana Isola Bouvet Brasile Territori Britannici dell'Oceano Indiano Brunei Bulgaria Burkina Faso Burundi Cambogia Camerun Canada Capo Verde Isole Cayman Repubblica Centrafricana Ciad Cile Cina Isola del Natale Isole Cocos e Keeling Colombia Comore Congo Repubblica Democratica del Congo Isole Cook Costa Rica Costa d'Avorio Croazia Cuba Curaçao Cipro Cechia Danimarka Gibuti Dominica Repubblica Dominicana Ecuador Egitto El Salvador Guinea Equatoriale Eritrea Estonia Etiopia Isole Falkland Isole Fær Øer Figi Finlandia Francia Guyana Francese Polinesia Francese Territori Francesi del Sud Gabon Gambia Georgia Germania Ghana Gibilterra Grecia GR Groenlandia Grenada Guadalupa Guam Guatemala Guernsey Guinea Guinea-Bissau Guyana Haiti Isole Heard e McDonald Città del Vaticano Honduras Hong Kong Ungheria Islanda India Indonesia Iran Iraq Irlanda Isola di Man Israele Italia Giamaica Giappone Jersey Giordania Kazakistan Kenya Kiribati Corea del Nord Corea del Sud Kuwait Kirghizistan Laos Lettonia Libano Lesotho Liberia Libia Liechtenstein Lituania Lussemburgo Macao Macedonia Madagascar Malawi Malesia Maldive Mali Malta Isole Marshall Martinica Mauritania Mauritius Mayotte Messico Micronesia Moldavia Monaco Mongolia Montenegro Montserrat Marocco Mozambico Birmania Namibia Nauru Nepal Paesi Bassi Nuova Caledonia Nuova Zelanda Nicaragua Niger Nigeria Niue Isole Norfolk Isole Marianne Settentrionali Norvegia Oman Pakistan Palau Stato di Palestina Panama Papua Nuova Guinea Paraguay Perù Filippine Isole Pitcairn Polonia Portogallo Porto Rico Qatar Réunion Romania Russia Ruanda Saint-Barthélemy Sant'Elena, Isola di Acensione e Tristan da Cunha Saint Kitts e Nevis Santa Lucia Saint-Martin Saint-Pierre e Miquelon Saint Vincent e Grenadine Samoa San Marino Sao Tome e Principe Arabia Saudita Senegal Serbia Seychelles Sierra Leone Singapore Sint Maarten Slovacchia Slovenia Isole Solomon Somalia Sud Africa Georgia del Sud e Isole Sandwich meridionali Sudan del Sud Spagna Sri Lanka Sudan Suriname Svalbard e Jan Mayen Swaziland Svezia Svizzera Siria Taiwan (Repubblica di Cina) Tagikistan Tanzania Tailandia Timor Est Togo Tokelau Tonga Trinidad e Tobago Tunisia Turchia Turkmenistan Isole Turks e Caicos Tuvalu Uganda Ucraina Emirati Arabi Uniti Regno Unito Stati Uniti Isole Minor Esterne degli Stati Uniti Uruguay Uzbekistan Vanuatu Venezuela Vietnam Isole Vergini britanniche Isole Vergini americane Wallis e Futuna Sahara Occidentale Yemen Zambia Zimbabwe Kosovo Irlanda del Nord https://github.com/FatturaElettronica/FatturaElettronica.NET/issues/314 Campione d'Italia e Livigno https://github.com/FatturaElettronica/FatturaElettronica.NET/issues/370 Grecia EL https://github.com/FatturaElettronica/FatturaElettronica.NET/issues/374 ================================================ FILE: Resources/ModalitaPagamento.Designer.cs ================================================ //------------------------------------------------------------------------------ // // This code was generated by a tool. // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ namespace FatturaElettronica.Resources { using System; /// /// A strongly-typed resource class, for looking up localized strings, etc. /// // This class was auto-generated by the StronglyTypedResourceBuilder // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] public class ModalitaPagamento { private static global::System.Resources.ResourceManager resourceMan; private static global::System.Globalization.CultureInfo resourceCulture; [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] internal ModalitaPagamento() { } /// /// Returns the cached ResourceManager instance used by this class. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] public static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("FatturaElettronica.Resources.ModalitaPagamento", typeof(ModalitaPagamento).Assembly); resourceMan = temp; } return resourceMan; } } /// /// Overrides the current thread's CurrentUICulture property for all /// resource lookups using this strongly typed resource class. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] public static global::System.Globalization.CultureInfo Culture { get { return resourceCulture; } set { resourceCulture = value; } } /// /// Looks up a localized string similar to contanti. /// public static string MP01 { get { return ResourceManager.GetString("MP01", resourceCulture); } } /// /// Looks up a localized string similar to assegno. /// public static string MP02 { get { return ResourceManager.GetString("MP02", resourceCulture); } } /// /// Looks up a localized string similar to assegno circolare. /// public static string MP03 { get { return ResourceManager.GetString("MP03", resourceCulture); } } /// /// Looks up a localized string similar to contanti presso Tesoreria. /// public static string MP04 { get { return ResourceManager.GetString("MP04", resourceCulture); } } /// /// Looks up a localized string similar to bonifico. /// public static string MP05 { get { return ResourceManager.GetString("MP05", resourceCulture); } } /// /// Looks up a localized string similar to vaglia cambiario. /// public static string MP06 { get { return ResourceManager.GetString("MP06", resourceCulture); } } /// /// Looks up a localized string similar to bollettino bancario. /// public static string MP07 { get { return ResourceManager.GetString("MP07", resourceCulture); } } /// /// Looks up a localized string similar to carta di pagamento. /// public static string MP08 { get { return ResourceManager.GetString("MP08", resourceCulture); } } /// /// Looks up a localized string similar to RID. /// public static string MP09 { get { return ResourceManager.GetString("MP09", resourceCulture); } } /// /// Looks up a localized string similar to RID utenze. /// public static string MP10 { get { return ResourceManager.GetString("MP10", resourceCulture); } } /// /// Looks up a localized string similar to RID veloce. /// public static string MP11 { get { return ResourceManager.GetString("MP11", resourceCulture); } } /// /// Looks up a localized string similar to RIBA. /// public static string MP12 { get { return ResourceManager.GetString("MP12", resourceCulture); } } /// /// Looks up a localized string similar to MAV. /// public static string MP13 { get { return ResourceManager.GetString("MP13", resourceCulture); } } /// /// Looks up a localized string similar to quietanza erario. /// public static string MP14 { get { return ResourceManager.GetString("MP14", resourceCulture); } } /// /// Looks up a localized string similar to giroconto su conti di contabilità speciale. /// public static string MP15 { get { return ResourceManager.GetString("MP15", resourceCulture); } } /// /// Looks up a localized string similar to domiciliazione bancaria. /// public static string MP16 { get { return ResourceManager.GetString("MP16", resourceCulture); } } /// /// Looks up a localized string similar to domiciliazione postale. /// public static string MP17 { get { return ResourceManager.GetString("MP17", resourceCulture); } } /// /// Looks up a localized string similar to bollettino di c/c postale. /// public static string MP18 { get { return ResourceManager.GetString("MP18", resourceCulture); } } /// /// Looks up a localized string similar to SEPA Direct Debit. /// public static string MP19 { get { return ResourceManager.GetString("MP19", resourceCulture); } } /// /// Looks up a localized string similar to SEPA Direct Debit CORE. /// public static string MP20 { get { return ResourceManager.GetString("MP20", resourceCulture); } } /// /// Looks up a localized string similar to SEPA Direct Debit B2B. /// public static string MP21 { get { return ResourceManager.GetString("MP21", resourceCulture); } } /// /// Looks up a localized string similar to Trattenuta su somme già riscosse. /// public static string MP22 { get { return ResourceManager.GetString("MP22", resourceCulture); } } /// /// Looks up a localized string similar to PagoPA. /// public static string MP23 { get { return ResourceManager.GetString("MP23", resourceCulture); } } } } ================================================ FILE: Resources/ModalitaPagamento.de.resx ================================================  text/microsoft-resx 1.3 System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Bargeld Scheck Zirkularscheck Bargeld bei der Staatskasse Überweisung Schuldschein Bankeinzug Zahlungskarte RID RID utenze RID veloce RIBA MAV Kassenbeleg Umbuchung auf Sonderkonten Bankdomizilierung Postdomizilierung Postüberweisung SEPA-Lastschrift SEPA-Lastschrift CORE SEPA-Lastschrift B2B Abzug von bereits eingezogenen Beträgen PagoPA ================================================ FILE: Resources/ModalitaPagamento.en.resx ================================================ text/microsoft-resx 1.3 System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 cash cheque banker's draft cash at Treasury bank transfer money order pre-compiled bank payment slip payment card direct debit utilities direct debit fast direct debit collection order payment by notice tax office quittance transfer on special accounting accounts order for direct payment from bank account order for direct payment from post office account bulletin postal account SEPA Direct Debit SEPA Direct Debit CORE SEPA Direct Debit B2B Deduction on sums already collected PagoPA ================================================ FILE: Resources/ModalitaPagamento.resx ================================================  text/microsoft-resx 1.3 System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 contanti assegno assegno circolare contanti presso Tesoreria bonifico vaglia cambiario bollettino bancario carta di pagamento RID RID utenze RID veloce RIBA MAV quietanza erario giroconto su conti di contabilità speciale domiciliazione bancaria domiciliazione postale bollettino di c/c postale SEPA Direct Debit SEPA Direct Debit CORE SEPA Direct Debit B2B Trattenuta su somme già riscosse PagoPA ================================================ FILE: Resources/Natura.Designer.cs ================================================ //------------------------------------------------------------------------------ // // This code was generated by a tool. // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ namespace FatturaElettronica.Resources { using System; /// /// A strongly-typed resource class, for looking up localized strings, etc. /// // This class was auto-generated by the StronglyTypedResourceBuilder // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] public class Natura { private static global::System.Resources.ResourceManager resourceMan; private static global::System.Globalization.CultureInfo resourceCulture; [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] internal Natura() { } /// /// Returns the cached ResourceManager instance used by this class. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] public static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("FatturaElettronica.Resources.Natura", typeof(Natura).Assembly); resourceMan = temp; } return resourceMan; } } /// /// Overrides the current thread's CurrentUICulture property for all /// resource lookups using this strongly typed resource class. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] public static global::System.Globalization.CultureInfo Culture { get { return resourceCulture; } set { resourceCulture = value; } } /// /// Looks up a localized string similar to escluse ex art. 15. /// public static string N1 { get { return ResourceManager.GetString("N1", resourceCulture); } } /// /// Looks up a localized string similar to non soggette ad IVA ai sensi degli artt. da 7 a 7-septies del DPR 633/72. /// public static string N2_1 { get { return ResourceManager.GetString("N2.1", resourceCulture); } } /// /// Looks up a localized string similar to non soggette - altri casi. /// public static string N2_2 { get { return ResourceManager.GetString("N2.2", resourceCulture); } } /// /// Looks up a localized string similar to non imponibili - esportazioni. /// public static string N3_1 { get { return ResourceManager.GetString("N3.1", resourceCulture); } } /// /// Looks up a localized string similar to non imponibili - cessioni intracomunitarie. /// public static string N3_2 { get { return ResourceManager.GetString("N3.2", resourceCulture); } } /// /// Looks up a localized string similar to non imponibili - cessioni verso San Marino. /// public static string N3_3 { get { return ResourceManager.GetString("N3.3", resourceCulture); } } /// /// Looks up a localized string similar to non imponibili - operazioni assimilate alle cessioni all'esportazione. /// public static string N3_4 { get { return ResourceManager.GetString("N3.4", resourceCulture); } } /// /// Looks up a localized string similar to non imponibili - a seguito di dichiarazioni d'intento. /// public static string N3_5 { get { return ResourceManager.GetString("N3.5", resourceCulture); } } /// /// Looks up a localized string similar to non imponibili - altre operazioni che non concorrono alla formazione del plafond. /// public static string N3_6 { get { return ResourceManager.GetString("N3.6", resourceCulture); } } /// /// Looks up a localized string similar to esenti. /// public static string N4 { get { return ResourceManager.GetString("N4", resourceCulture); } } /// /// Looks up a localized string similar to regime del margine / IVA non esposta in fattura. /// public static string N5 { get { return ResourceManager.GetString("N5", resourceCulture); } } /// /// Looks up a localized string similar to inversione contabile - cessione di rottami e altri materiali di recupero. /// public static string N6_1 { get { return ResourceManager.GetString("N6.1", resourceCulture); } } /// /// Looks up a localized string similar to inversione contabile - inversione contabile – cessione di oro e argento ai sensi della legge 7/2000 nonché di oreficeria usata ad OPO. /// public static string N6_2 { get { return ResourceManager.GetString("N6.2", resourceCulture); } } /// /// Looks up a localized string similar to inversione contabile - subappalto nel settore edile. /// public static string N6_3 { get { return ResourceManager.GetString("N6.3", resourceCulture); } } /// /// Looks up a localized string similar to inversione contabile - cessione di fabbricati. /// public static string N6_4 { get { return ResourceManager.GetString("N6.4", resourceCulture); } } /// /// Looks up a localized string similar to inversione contabile - cessione di telefoni cellulari. /// public static string N6_5 { get { return ResourceManager.GetString("N6.5", resourceCulture); } } /// /// Looks up a localized string similar to inversione contabile - cessione di prodotti elettronici. /// public static string N6_6 { get { return ResourceManager.GetString("N6.6", resourceCulture); } } /// /// Looks up a localized string similar to inversione contabile - prestazioni comparto edile e settori connessi. /// public static string N6_7 { get { return ResourceManager.GetString("N6.7", resourceCulture); } } /// /// Looks up a localized string similar to inversione contabile - operazioni settore energetico. /// public static string N6_8 { get { return ResourceManager.GetString("N6.8", resourceCulture); } } /// /// Looks up a localized string similar to inversione contabile - altri casi. /// public static string N6_9 { get { return ResourceManager.GetString("N6.9", resourceCulture); } } /// /// Looks up a localized string similar to IVA assolta in altro stato UE (prestazione di servizi di telecomunicazioni, tele-radiodiffusione ed elettronici ex art. 7-octies, comma 1 lett. a, b, art. 74-sexies DPR 633/72). /// public static string N7 { get { return ResourceManager.GetString("N7", resourceCulture); } } } } ================================================ FILE: Resources/Natura.de.resx ================================================  text/microsoft-resx 1.3 System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 ausgeschlossen gemäß Art. 15 nicht der Mehrwertsteuer unterworfen gemäß den Artikeln 7 bis 7-septies des D.P.R. Nr. 633/72 nicht unterworfen - andere Fälle nicht steuerpflichtig - Exporte nicht steuerpflichtig - innergemeinschaftliche Lieferungen nicht steuerpflichtig - Verkauf nach San Marino nicht steuerpflichtig - den Ausfuhrlieferungen gleichgestellte Vorgänge nicht steuerpflichtig - aufgrund von Absichtserklärungen nicht steuerpflichtig - andere Vorgänge, die nicht zur Bildung des Plafonds beitragen steuerfrei Margenregelung / Mehrwertsteuer nicht in der Rechnung ausgewiesen Reverse-Charge - Lieferung von Schrott und anderen wiederverwertbaren Materialien Reverse-Charge - Lieferung von Gold und Silber gemäß Gesetz 7/2000 sowie von gebrauchten Schmuckwaren an OPO Reverse-Charge - Subunternehmer im Baugewerbe Reverse-Charge - Verkauf von Gebäuden Reverse-Charge - Verkauf von Mobiltelefonen Reverse-Charge - Verkauf von Elektronikprodukten Reverse-Charge - Dienstleistungen im Baugewerbe und verwandten Sektoren Reverse-Charge - Operationen im Energiesektor Reverse-Charge - andere Fälle Mehrwertsteuer in einem anderen EU-Land entrichtet (Erbringung von Telekommunikations-, Rundfunk- und elektronischen Dienstleistungen gemäß Art. 7-octies, Absatz 1 Buchstabe a, b, Art. 74-sexies DPR 633/72) ================================================ FILE: Resources/Natura.en.resx ================================================ text/microsoft-resx 1.3 System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 excluded pursuant to Art. 15 not subject to VAT under the articles from 7 to 7-septies of DPR 633/72 not subject – other cases not taxable - exportations not taxable - intra Community transfers not taxable - transfers to San Marino not taxable - transactions treated as export supplies not taxable - for declaration of intent not taxable – other transactions that don’t contribute to the determination of ceiling exempt margin regime / VAT not exposed on invoice reverse charge - transfer of scrap and of other recyclable materials reverse charge - transfer of gold and silver in accordance with law 7/2000 as well as used jewelry to OPO reverse charge - subcontracting in the construction sector reverse charge - transfer of buildings reverse charge - transfer of mobile phones reverse charge - transfer of electronic products reverse charge - provisions in the construction and related sectors reverse charge - transactions in the energy sector reverse charge - other cases VAT paid in another EU country (distance sales pursuant to article 40 paragraphs 3 and 4 and article 41 paragraph 1 letter b, DL 331/93; provision of telecommunications, radio and television broadcasting and electronic services pursuant to article 7-octies, paragraph 1 letter a, b and article 74-sexies, DPR 633/72) ================================================ FILE: Resources/Natura.resx ================================================  text/microsoft-resx 1.3 System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 escluse ex art. 15 non soggette ad IVA ai sensi degli artt. da 7 a 7-septies del DPR 633/72 non soggette - altri casi non imponibili - esportazioni non imponibili - cessioni intracomunitarie non imponibili - cessioni verso San Marino non imponibili - operazioni assimilate alle cessioni all'esportazione non imponibili - a seguito di dichiarazioni d'intento non imponibili - altre operazioni che non concorrono alla formazione del plafond esenti regime del margine / IVA non esposta in fattura inversione contabile - cessione di rottami e altri materiali di recupero inversione contabile - inversione contabile – cessione di oro e argento ai sensi della legge 7/2000 nonché di oreficeria usata ad OPO inversione contabile - subappalto nel settore edile inversione contabile - cessione di fabbricati inversione contabile - cessione di telefoni cellulari inversione contabile - cessione di prodotti elettronici inversione contabile - prestazioni comparto edile e settori connessi inversione contabile - operazioni settore energetico inversione contabile - altri casi IVA assolta in altro stato UE (prestazione di servizi di telecomunicazioni, tele-radiodiffusione ed elettronici ex art. 7-octies, comma 1 lett. a, b, art. 74-sexies DPR 633/72) ================================================ FILE: Resources/NaturaSemplificata.Designer.cs ================================================ //------------------------------------------------------------------------------ // // This code was generated by a tool. // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ namespace FatturaElettronica.Resources { using System; /// /// A strongly-typed resource class, for looking up localized strings, etc. /// // This class was auto-generated by the StronglyTypedResourceBuilder // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] public class NaturaSemplificata { private static global::System.Resources.ResourceManager resourceMan; private static global::System.Globalization.CultureInfo resourceCulture; [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] internal NaturaSemplificata() { } /// /// Returns the cached ResourceManager instance used by this class. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] public static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("FatturaElettronica.Resources.NaturaSemplificata", typeof(NaturaSemplificata).Assembly); resourceMan = temp; } return resourceMan; } } /// /// Overrides the current thread's CurrentUICulture property for all /// resource lookups using this strongly typed resource class. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] public static global::System.Globalization.CultureInfo Culture { get { return resourceCulture; } set { resourceCulture = value; } } /// /// Looks up a localized string similar to escluse ex art. 15. /// public static string N1 { get { return ResourceManager.GetString("N1", resourceCulture); } } /// /// Looks up a localized string similar to non soggette. /// public static string N2 { get { return ResourceManager.GetString("N2", resourceCulture); } } /// /// Looks up a localized string similar to non soggette ad IVA ai sensi degli artt. da 7 a 7-septies del D.P.R. n. 633/72. /// public static string N2_1 { get { return ResourceManager.GetString("N2.1", resourceCulture); } } /// /// Looks up a localized string similar to non soggette - altri casi. /// public static string N2_2 { get { return ResourceManager.GetString("N2.2", resourceCulture); } } /// /// Looks up a localized string similar to non imponibili. /// public static string N3 { get { return ResourceManager.GetString("N3", resourceCulture); } } /// /// Looks up a localized string similar to non imponibili - esportazioni. /// public static string N3_1 { get { return ResourceManager.GetString("N3.1", resourceCulture); } } /// /// Looks up a localized string similar to non imponibili - cessioni intracomunitarie. /// public static string N3_2 { get { return ResourceManager.GetString("N3.2", resourceCulture); } } /// /// Looks up a localized string similar to non imponibili - cessioni verso San Marino. /// public static string N3_3 { get { return ResourceManager.GetString("N3.3", resourceCulture); } } /// /// Looks up a localized string similar to non imponibili - operazioni assimilate alle cessioni all'esportazione. /// public static string N3_4 { get { return ResourceManager.GetString("N3.4", resourceCulture); } } /// /// Looks up a localized string similar to non imponibili - a seguito di dichiarazioni d'intento. /// public static string N3_5 { get { return ResourceManager.GetString("N3.5", resourceCulture); } } /// /// Looks up a localized string similar to non imponibili - altre operazioni che non concorrono alla formazione del plafond. /// public static string N3_6 { get { return ResourceManager.GetString("N3.6", resourceCulture); } } /// /// Looks up a localized string similar to esenti. /// public static string N4 { get { return ResourceManager.GetString("N4", resourceCulture); } } /// /// Looks up a localized string similar to regime del margine / IVA non esposta in fattura. /// public static string N5 { get { return ResourceManager.GetString("N5", resourceCulture); } } } } ================================================ FILE: Resources/NaturaSemplificata.de.resx ================================================  text/microsoft-resx 1.3 System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 ausgeschlossen gemäß Art. 15 nicht unterworfen nicht der Mehrwertsteuer unterworfen gemäß den Artikeln 7 bis 7-septies des D.P.R. Nr. 633/72 nicht unterworfen - andere Fälle nicht steuerpflichtig nicht steuerpflichtig - Exporte nicht steuerpflichtig - innergemeinschaftliche Lieferungen nicht steuerpflichtig - Verkauf nach San Marino nicht steuerpflichtig - den Ausfuhrlieferungen gleichgestellte Vorgänge nicht steuerpflichtig - aufgrund von Absichtserklärungen nicht steuerpflichtig - andere Vorgänge, die nicht zur Bildung des Plafonds beitragen steuerfrei Margenregelung / Mehrwertsteuer nicht in der Rechnung ausgewiesen ================================================ FILE: Resources/NaturaSemplificata.en.resx ================================================ text/microsoft-resx 1.3 System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 excluded under art. 15 not subject not subject to VAT pursuant to articles 7 to 7-septies of Presidential Decree no. 633/72 not subject - other cases non-taxable non-taxable - exports non-taxable - intra-Community supplies non-taxable - supplies to San Marino non-taxable - operations similar to export sales non-taxable - following intent declarations non-taxable - other operations not contributing to the plafond exempt margin scheme / VAT not shown on invoice ================================================ FILE: Resources/NaturaSemplificata.resx ================================================  text/microsoft-resx 1.3 System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 escluse ex art. 15 non soggette non soggette ad IVA ai sensi degli artt. da 7 a 7-septies del D.P.R. n. 633/72 non soggette - altri casi non imponibili non imponibili - esportazioni non imponibili - cessioni intracomunitarie non imponibili - cessioni verso San Marino non imponibili - operazioni assimilate alle cessioni all'esportazione non imponibili - a seguito di dichiarazioni d'intento non imponibili - altre operazioni che non concorrono alla formazione del plafond esenti regime del margine / IVA non esposta in fattura ================================================ FILE: Resources/Provincia.Designer.cs ================================================ //------------------------------------------------------------------------------ // // This code was generated by a tool. // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ namespace FatturaElettronica.Resources { using System; /// /// A strongly-typed resource class, for looking up localized strings, etc. /// // This class was auto-generated by the StronglyTypedResourceBuilder // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] public class Provincia { private static global::System.Resources.ResourceManager resourceMan; private static global::System.Globalization.CultureInfo resourceCulture; [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] internal Provincia() { } /// /// Returns the cached ResourceManager instance used by this class. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] public static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("FatturaElettronica.Resources.Provincia", typeof(Provincia).Assembly); resourceMan = temp; } return resourceMan; } } /// /// Overrides the current thread's CurrentUICulture property for all /// resource lookups using this strongly typed resource class. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] public static global::System.Globalization.CultureInfo Culture { get { return resourceCulture; } set { resourceCulture = value; } } /// /// Looks up a localized string similar to Agrigento. /// public static string AG { get { return ResourceManager.GetString("AG", resourceCulture); } } /// /// Looks up a localized string similar to Alessandria. /// public static string AL { get { return ResourceManager.GetString("AL", resourceCulture); } } /// /// Looks up a localized string similar to Ancona. /// public static string AN { get { return ResourceManager.GetString("AN", resourceCulture); } } /// /// Looks up a localized string similar to Aosta. /// public static string AO { get { return ResourceManager.GetString("AO", resourceCulture); } } /// /// Looks up a localized string similar to Ascoli-Piceno. /// public static string AP { get { return ResourceManager.GetString("AP", resourceCulture); } } /// /// Looks up a localized string similar to L'Aquila. /// public static string AQ { get { return ResourceManager.GetString("AQ", resourceCulture); } } /// /// Looks up a localized string similar to Arezzo. /// public static string AR { get { return ResourceManager.GetString("AR", resourceCulture); } } /// /// Looks up a localized string similar to Asti. /// public static string AT { get { return ResourceManager.GetString("AT", resourceCulture); } } /// /// Looks up a localized string similar to Avellino. /// public static string AV { get { return ResourceManager.GetString("AV", resourceCulture); } } /// /// Looks up a localized string similar to Bari. /// public static string BA { get { return ResourceManager.GetString("BA", resourceCulture); } } /// /// Looks up a localized string similar to Bergamo. /// public static string BG { get { return ResourceManager.GetString("BG", resourceCulture); } } /// /// Looks up a localized string similar to Biella. /// public static string BI { get { return ResourceManager.GetString("BI", resourceCulture); } } /// /// Looks up a localized string similar to Belluno. /// public static string BL { get { return ResourceManager.GetString("BL", resourceCulture); } } /// /// Looks up a localized string similar to Benevento. /// public static string BN { get { return ResourceManager.GetString("BN", resourceCulture); } } /// /// Looks up a localized string similar to Bologna. /// public static string BO { get { return ResourceManager.GetString("BO", resourceCulture); } } /// /// Looks up a localized string similar to Brindisi. /// public static string BR { get { return ResourceManager.GetString("BR", resourceCulture); } } /// /// Looks up a localized string similar to Brescia. /// public static string BS { get { return ResourceManager.GetString("BS", resourceCulture); } } /// /// Looks up a localized string similar to Barletta-Andria-Trani. /// public static string BT { get { return ResourceManager.GetString("BT", resourceCulture); } } /// /// Looks up a localized string similar to Bolzano. /// public static string BZ { get { return ResourceManager.GetString("BZ", resourceCulture); } } /// /// Looks up a localized string similar to Cagliari. /// public static string CA { get { return ResourceManager.GetString("CA", resourceCulture); } } /// /// Looks up a localized string similar to Campobasso. /// public static string CB { get { return ResourceManager.GetString("CB", resourceCulture); } } /// /// Looks up a localized string similar to Caserta. /// public static string CE { get { return ResourceManager.GetString("CE", resourceCulture); } } /// /// Looks up a localized string similar to Chieti. /// public static string CH { get { return ResourceManager.GetString("CH", resourceCulture); } } /// /// Looks up a localized string similar to Carbonia Iglesias. /// public static string CI { get { return ResourceManager.GetString("CI", resourceCulture); } } /// /// Looks up a localized string similar to Caltanissetta. /// public static string CL { get { return ResourceManager.GetString("CL", resourceCulture); } } /// /// Looks up a localized string similar to Cuneo. /// public static string CN { get { return ResourceManager.GetString("CN", resourceCulture); } } /// /// Looks up a localized string similar to Como. /// public static string CO { get { return ResourceManager.GetString("CO", resourceCulture); } } /// /// Looks up a localized string similar to Cremona. /// public static string CR { get { return ResourceManager.GetString("CR", resourceCulture); } } /// /// Looks up a localized string similar to Cosenza. /// public static string CS { get { return ResourceManager.GetString("CS", resourceCulture); } } /// /// Looks up a localized string similar to Catania. /// public static string CT { get { return ResourceManager.GetString("CT", resourceCulture); } } /// /// Looks up a localized string similar to Catanzaro. /// public static string CZ { get { return ResourceManager.GetString("CZ", resourceCulture); } } /// /// Looks up a localized string similar to Enna. /// public static string EN { get { return ResourceManager.GetString("EN", resourceCulture); } } /// /// Looks up a localized string similar to Forli-Cesena. /// public static string FC { get { return ResourceManager.GetString("FC", resourceCulture); } } /// /// Looks up a localized string similar to Ferrara. /// public static string FE { get { return ResourceManager.GetString("FE", resourceCulture); } } /// /// Looks up a localized string similar to Foggia. /// public static string FG { get { return ResourceManager.GetString("FG", resourceCulture); } } /// /// Looks up a localized string similar to Firenze. /// public static string FI { get { return ResourceManager.GetString("FI", resourceCulture); } } /// /// Looks up a localized string similar to Fermo. /// public static string FM { get { return ResourceManager.GetString("FM", resourceCulture); } } /// /// Looks up a localized string similar to Frosinone. /// public static string FR { get { return ResourceManager.GetString("FR", resourceCulture); } } /// /// Looks up a localized string similar to Genova. /// public static string GE { get { return ResourceManager.GetString("GE", resourceCulture); } } /// /// Looks up a localized string similar to Gorizia. /// public static string GO { get { return ResourceManager.GetString("GO", resourceCulture); } } /// /// Looks up a localized string similar to Grosseto. /// public static string GR { get { return ResourceManager.GetString("GR", resourceCulture); } } /// /// Looks up a localized string similar to Imperia. /// public static string IM { get { return ResourceManager.GetString("IM", resourceCulture); } } /// /// Looks up a localized string similar to Isernia. /// public static string IS { get { return ResourceManager.GetString("IS", resourceCulture); } } /// /// Looks up a localized string similar to Crotone. /// public static string KR { get { return ResourceManager.GetString("KR", resourceCulture); } } /// /// Looks up a localized string similar to Lecco. /// public static string LC { get { return ResourceManager.GetString("LC", resourceCulture); } } /// /// Looks up a localized string similar to Lecce. /// public static string LE { get { return ResourceManager.GetString("LE", resourceCulture); } } /// /// Looks up a localized string similar to Livorno. /// public static string LI { get { return ResourceManager.GetString("LI", resourceCulture); } } /// /// Looks up a localized string similar to Lodi. /// public static string LO { get { return ResourceManager.GetString("LO", resourceCulture); } } /// /// Looks up a localized string similar to Latina. /// public static string LT { get { return ResourceManager.GetString("LT", resourceCulture); } } /// /// Looks up a localized string similar to Lucca. /// public static string LU { get { return ResourceManager.GetString("LU", resourceCulture); } } /// /// Looks up a localized string similar to Monza-Brianza. /// public static string MB { get { return ResourceManager.GetString("MB", resourceCulture); } } /// /// Looks up a localized string similar to Macerata. /// public static string MC { get { return ResourceManager.GetString("MC", resourceCulture); } } /// /// Looks up a localized string similar to Messina. /// public static string ME { get { return ResourceManager.GetString("ME", resourceCulture); } } /// /// Looks up a localized string similar to Milano. /// public static string MI { get { return ResourceManager.GetString("MI", resourceCulture); } } /// /// Looks up a localized string similar to Mantova. /// public static string MN { get { return ResourceManager.GetString("MN", resourceCulture); } } /// /// Looks up a localized string similar to Modena. /// public static string MO { get { return ResourceManager.GetString("MO", resourceCulture); } } /// /// Looks up a localized string similar to Massa-Carrara. /// public static string MS { get { return ResourceManager.GetString("MS", resourceCulture); } } /// /// Looks up a localized string similar to Matera. /// public static string MT { get { return ResourceManager.GetString("MT", resourceCulture); } } /// /// Looks up a localized string similar to Napoli. /// public static string NA { get { return ResourceManager.GetString("NA", resourceCulture); } } /// /// Looks up a localized string similar to Novara. /// public static string NO { get { return ResourceManager.GetString("NO", resourceCulture); } } /// /// Looks up a localized string similar to Nuoro. /// public static string NU { get { return ResourceManager.GetString("NU", resourceCulture); } } /// /// Looks up a localized string similar to Ogliastra. /// public static string OG { get { return ResourceManager.GetString("OG", resourceCulture); } } /// /// Looks up a localized string similar to Oristano. /// public static string OR { get { return ResourceManager.GetString("OR", resourceCulture); } } /// /// Looks up a localized string similar to Olbia Tempio. /// public static string OT { get { return ResourceManager.GetString("OT", resourceCulture); } } /// /// Looks up a localized string similar to Palermo. /// public static string PA { get { return ResourceManager.GetString("PA", resourceCulture); } } /// /// Looks up a localized string similar to Piacenza. /// public static string PC { get { return ResourceManager.GetString("PC", resourceCulture); } } /// /// Looks up a localized string similar to Padova. /// public static string PD { get { return ResourceManager.GetString("PD", resourceCulture); } } /// /// Looks up a localized string similar to Pescara. /// public static string PE { get { return ResourceManager.GetString("PE", resourceCulture); } } /// /// Looks up a localized string similar to Perugia. /// public static string PG { get { return ResourceManager.GetString("PG", resourceCulture); } } /// /// Looks up a localized string similar to Pisa. /// public static string PI { get { return ResourceManager.GetString("PI", resourceCulture); } } /// /// Looks up a localized string similar to Pordenone. /// public static string PN { get { return ResourceManager.GetString("PN", resourceCulture); } } /// /// Looks up a localized string similar to Prato. /// public static string PO { get { return ResourceManager.GetString("PO", resourceCulture); } } /// /// Looks up a localized string similar to Parma. /// public static string PR { get { return ResourceManager.GetString("PR", resourceCulture); } } /// /// Looks up a localized string similar to Pistoia. /// public static string PT { get { return ResourceManager.GetString("PT", resourceCulture); } } /// /// Looks up a localized string similar to Pesaro-Urbino. /// public static string PU { get { return ResourceManager.GetString("PU", resourceCulture); } } /// /// Looks up a localized string similar to Pavia. /// public static string PV { get { return ResourceManager.GetString("PV", resourceCulture); } } /// /// Looks up a localized string similar to Potenza. /// public static string PZ { get { return ResourceManager.GetString("PZ", resourceCulture); } } /// /// Looks up a localized string similar to Ravenna. /// public static string RA { get { return ResourceManager.GetString("RA", resourceCulture); } } /// /// Looks up a localized string similar to Reggio-Calabria. /// public static string RC { get { return ResourceManager.GetString("RC", resourceCulture); } } /// /// Looks up a localized string similar to Reggio-Emilia. /// public static string RE { get { return ResourceManager.GetString("RE", resourceCulture); } } /// /// Looks up a localized string similar to Ragusa. /// public static string RG { get { return ResourceManager.GetString("RG", resourceCulture); } } /// /// Looks up a localized string similar to Rieti. /// public static string RI { get { return ResourceManager.GetString("RI", resourceCulture); } } /// /// Looks up a localized string similar to Roma. /// public static string RM { get { return ResourceManager.GetString("RM", resourceCulture); } } /// /// Looks up a localized string similar to Rimini. /// public static string RN { get { return ResourceManager.GetString("RN", resourceCulture); } } /// /// Looks up a localized string similar to Rovigo. /// public static string RO { get { return ResourceManager.GetString("RO", resourceCulture); } } /// /// Looks up a localized string similar to Salerno. /// public static string SA { get { return ResourceManager.GetString("SA", resourceCulture); } } /// /// Looks up a localized string similar to Siena. /// public static string SI { get { return ResourceManager.GetString("SI", resourceCulture); } } /// /// Looks up a localized string similar to Sondrio. /// public static string SO { get { return ResourceManager.GetString("SO", resourceCulture); } } /// /// Looks up a localized string similar to La-Spezia. /// public static string SP { get { return ResourceManager.GetString("SP", resourceCulture); } } /// /// Looks up a localized string similar to Siracusa. /// public static string SR { get { return ResourceManager.GetString("SR", resourceCulture); } } /// /// Looks up a localized string similar to Sassari. /// public static string SS { get { return ResourceManager.GetString("SS", resourceCulture); } } /// /// Looks up a localized string similar to Sud Sardegna. /// public static string SU { get { return ResourceManager.GetString("SU", resourceCulture); } } /// /// Looks up a localized string similar to Savona. /// public static string SV { get { return ResourceManager.GetString("SV", resourceCulture); } } /// /// Looks up a localized string similar to Taranto. /// public static string TA { get { return ResourceManager.GetString("TA", resourceCulture); } } /// /// Looks up a localized string similar to Teramo. /// public static string TE { get { return ResourceManager.GetString("TE", resourceCulture); } } /// /// Looks up a localized string similar to Trento. /// public static string TN { get { return ResourceManager.GetString("TN", resourceCulture); } } /// /// Looks up a localized string similar to Torino. /// public static string TO { get { return ResourceManager.GetString("TO", resourceCulture); } } /// /// Looks up a localized string similar to Trapani. /// public static string TP { get { return ResourceManager.GetString("TP", resourceCulture); } } /// /// Looks up a localized string similar to Terni. /// public static string TR { get { return ResourceManager.GetString("TR", resourceCulture); } } /// /// Looks up a localized string similar to Trieste. /// public static string TS { get { return ResourceManager.GetString("TS", resourceCulture); } } /// /// Looks up a localized string similar to Treviso. /// public static string TV { get { return ResourceManager.GetString("TV", resourceCulture); } } /// /// Looks up a localized string similar to Udine. /// public static string UD { get { return ResourceManager.GetString("UD", resourceCulture); } } /// /// Looks up a localized string similar to Varese. /// public static string VA { get { return ResourceManager.GetString("VA", resourceCulture); } } /// /// Looks up a localized string similar to Verbania. /// public static string VB { get { return ResourceManager.GetString("VB", resourceCulture); } } /// /// Looks up a localized string similar to Vercelli. /// public static string VC { get { return ResourceManager.GetString("VC", resourceCulture); } } /// /// Looks up a localized string similar to Venezia. /// public static string VE { get { return ResourceManager.GetString("VE", resourceCulture); } } /// /// Looks up a localized string similar to Vicenza. /// public static string VI { get { return ResourceManager.GetString("VI", resourceCulture); } } /// /// Looks up a localized string similar to Verona. /// public static string VR { get { return ResourceManager.GetString("VR", resourceCulture); } } /// /// Looks up a localized string similar to Medio Campidano. /// public static string VS { get { return ResourceManager.GetString("VS", resourceCulture); } } /// /// Looks up a localized string similar to Viterbo. /// public static string VT { get { return ResourceManager.GetString("VT", resourceCulture); } } /// /// Looks up a localized string similar to Vibo-Valentia. /// public static string VV { get { return ResourceManager.GetString("VV", resourceCulture); } } } } ================================================ FILE: Resources/Provincia.de.resx ================================================  text/microsoft-resx 1.3 System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Agrigent Alessandria Ancona Aosta L'Aquila Arezzo Ascoli-Piceno Asti Avellino Bari Barletta-Andria-Trani Belluno Benevento Bergamo Biella Bologna Bozen Brescia Brindisi Cagliari Caltanissetta Campobasso Carbonia Iglesias Caserta Catania Catanzaro Chieti Como Cosenza Cremona Crotone Cuneo Enna Fermo Ferrara Florenz Foggia Forli-Cesena Frosinone Genua Gorizia Grosseto Imperia Isernia La-Spezia Latina Lecce Lecco Livorno Lodi Lucca Macerata Mantua Massa-Carrara Matera Medio Campidano Messina Mailand Modena Monza-Brianza Neapel Novara Nuoro Ogliastra Olbia Tempio Oristano Padua Palermo Parma Pavia Perugia Pesaro-Urbino Pescara Piacenza Pisa Pistoia Pordenone Potenza Prato Ragusa Ravenna Reggio-Calabria Reggio-Emilia Rieti Rimini Rom Rovigo Salerno Sassari Savona Siena Syrakus Sondrio Süd Sardinien Tarent Teramo Terni Turin Trapani Trient Treviso Triest Udine Varese Venedig Verbania Vercelli Verona Vibo Valentia Vicenza Viterbo ================================================ FILE: Resources/Provincia.en.resx ================================================ text/microsoft-resx 1.3 System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Agrigento Alessandria Ancona Aosta L'Aquila Arezzo Ascoli-Piceno Asti Avellino Bari Barletta-Andria-Trani Belluno Benevento Bergamo Biella Bologna Bolzano Brescia Brindisi Cagliari Caltanissetta Campobasso Carbonia Iglesias Caserta Catania Catanzaro Chieti Como Cosenza Cremona Crotone Cuneo Enna Fermo Ferrara Florence Foggia Forlì-Cesena Frosinone Genoa Gorizia Grosseto Imperia Isernia La Spezia Latina Lecce Lecco Livorno Lodi Lucca Macerata Mantua Massa-Carrara Matera Medio Campidano Messina Milan Modena Monza and Brianza Naples Novara Nuoro Ogliastra Olbia-Tempio Oristano Padua Palermo Parma Pavia Perugia Pesaro and Urbino Pescara Piacenza Pisa Pistoia Pordenone Potenza Prato Ragusa Ravenna Reggio Calabria Reggio Emilia Rieti Rimini Rome Rovigo Salerno Sassari Savona Siena Syracuse Sondrio South Sardinia Taranto Teramo Terni Turin Trapani Trento Treviso Trieste Udine Varese Venice Verbania Vercelli Verona Vibo Valentia Vicenza Viterbo ================================================ FILE: Resources/Provincia.resx ================================================  text/microsoft-resx 1.3 System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Agrigento Alessandria Ancona Aosta L'Aquila Arezzo Ascoli-Piceno Asti Avellino Bari Barletta-Andria-Trani Belluno Benevento Bergamo Biella Bologna Bolzano Brescia Brindisi Cagliari Caltanissetta Campobasso Carbonia Iglesias Caserta Catania Catanzaro Chieti Como Cosenza Cremona Crotone Cuneo Enna Fermo Ferrara Firenze Foggia Forli-Cesena Frosinone Genova Gorizia Grosseto Imperia Isernia La-Spezia Latina Lecce Lecco Livorno Lodi Lucca Macerata Mantova Massa-Carrara Matera Medio Campidano Messina Milano Modena Monza-Brianza Napoli Novara Nuoro Ogliastra Olbia Tempio Oristano Padova Palermo Parma Pavia Perugia Pesaro-Urbino Pescara Piacenza Pisa Pistoia Pordenone Potenza Prato Ragusa Ravenna Reggio-Calabria Reggio-Emilia Rieti Rimini Roma Rovigo Salerno Sassari Savona Siena Siracusa Sondrio Sud Sardegna Taranto Teramo Terni Torino Trapani Trento Treviso Trieste Udine Varese Venezia Verbania Vercelli Verona Vibo-Valentia Vicenza Viterbo ================================================ FILE: Resources/RegimeFiscale.Designer.cs ================================================ //------------------------------------------------------------------------------ // // This code was generated by a tool. // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ namespace FatturaElettronica.Resources { using System; [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] public class RegimeFiscale { private static System.Resources.ResourceManager resourceMan; private static System.Globalization.CultureInfo resourceCulture; [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] internal RegimeFiscale() { } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] public static System.Resources.ResourceManager ResourceManager { get { if (object.Equals(null, resourceMan)) { System.Resources.ResourceManager temp = new System.Resources.ResourceManager("FatturaElettronica.Resources.RegimeFiscale", typeof(RegimeFiscale).Assembly); resourceMan = temp; } return resourceMan; } } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] public static System.Globalization.CultureInfo Culture { get { return resourceCulture; } set { resourceCulture = value; } } public static string RF01 { get { return ResourceManager.GetString("RF01", resourceCulture); } } public static string RF02 { get { return ResourceManager.GetString("RF02", resourceCulture); } } public static string RF04 { get { return ResourceManager.GetString("RF04", resourceCulture); } } public static string RF05 { get { return ResourceManager.GetString("RF05", resourceCulture); } } public static string RF06 { get { return ResourceManager.GetString("RF06", resourceCulture); } } public static string RF07 { get { return ResourceManager.GetString("RF07", resourceCulture); } } public static string RF08 { get { return ResourceManager.GetString("RF08", resourceCulture); } } public static string RF09 { get { return ResourceManager.GetString("RF09", resourceCulture); } } public static string RF10 { get { return ResourceManager.GetString("RF10", resourceCulture); } } public static string RF11 { get { return ResourceManager.GetString("RF11", resourceCulture); } } public static string RF12 { get { return ResourceManager.GetString("RF12", resourceCulture); } } public static string RF13 { get { return ResourceManager.GetString("RF13", resourceCulture); } } public static string RF14 { get { return ResourceManager.GetString("RF14", resourceCulture); } } public static string RF15 { get { return ResourceManager.GetString("RF15", resourceCulture); } } public static string RF16 { get { return ResourceManager.GetString("RF16", resourceCulture); } } public static string RF17 { get { return ResourceManager.GetString("RF17", resourceCulture); } } public static string RF18 { get { return ResourceManager.GetString("RF18", resourceCulture); } } public static string RF19 { get { return ResourceManager.GetString("RF19", resourceCulture); } } public static string RF20 { get { return ResourceManager.GetString("RF20", resourceCulture); } } } } ================================================ FILE: Resources/RegimeFiscale.de.resx ================================================  text/microsoft-resx 1.3 System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Ordentlich Minimale Steuerzahler (Art.1, Abs.96-117, L. 244/07) Landwirtschaft und verwandte Tätigkeiten und Fischerei (Art.34 und 34-bis, DPR 633/72) Verkauf von Salz und Tabak (Art.74, Abs.1, DPR 633/72) Streichholzhandel (Art.74, Abs.1, DPR 633/72) Verlagswesen (Art.74, Abs.1, DPR 633/72) Verwaltung öffentlicher Telefondienste (Art.74, Abs.1, DPR 633/72) Wiederverkauf von öffentlichen Verkehrs- und Parkdokumenten (Art.74, Abs.1, DPR 633/72) Unterhaltung, Spiele und andere Aktivitäten gemäß der an den DPR 640/72 angehängten Tarifliste (Art.74, Abs.6, DPR 633/72) Reise- und Tourismusagenturen (Art.74-ter, DPR 633/72) Agrotourismus (Art.5, Abs.2 L. 413/91) Haustürverkauf (Art.25-bis, Abs.6, DPR 600/73) Wiederverkauf von Gebrauchtwaren, Kunstgegenständen, Antiquitäten oder Sammlerstücken (Art.36, DL 41/95) Auktionshäuser für Kunstgegenstände, Antiquitäten oder Sammlerstücke (Art.40-bis, DL 41/95) Mehrwertsteuer auf Kassenbasis für öffentliche Verwaltungen (Art.6, Abs.5, DPR 633/72) Mehrwertsteuer auf Kassenbasis (Art.32-bis, DL 83/2012) Andere Pauschalbesteuerung (Art.1, Abs.54-89, L. 190/2014) Grenzüberschreitende Mehrwertsteuerbefreiung (EU-Richtlinie 2020/285) ================================================ FILE: Resources/RegimeFiscale.en.resx ================================================ text/microsoft-resx 1.3 System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Ordinary Minimum taxpayers (Art. 1, section 96-117, Italian Law 244/07) Agriculture and connected activities and fishing (Arts. 34 and 34-bis, Italian Presidential Decree 633/72) Sale of salts and tobaccos (Art. 74, section 1, Italian Presidential Decree 633/72) Match sales (Art. 74, section 1, Italian Presidential Decree 633/72) Publishing (Art. 74, section 1, Italian Presidential Decree 633/72) Management of public telephone services (Art. 74, section 1, Italian Presidential Decree 633/72) Resale of public transport and parking documents (Art. 74, section 1, Italian Presidential Decree 633/72) Entertainment, gaming and other activities referred to by the tariff attached to Italian Presidential Decree 640/72 (Art. 74, section 6, Italian Presidential Decree 633/72) Travel and tourism agencies (Art. 74-ter, Italian Presidential Decree 633/72) Farmhouse accommodation/restaurants (Art. 5, section 2, Italian law 413/91) Door-to-door sales (Art. 25-bis, section 6, Italian Presidential Decree 600/73) Resale of used goods, artworks, antiques or collector's items (Art. 36, Italian Decree Law 41/95) Artwork, antiques or collector's items auction agencies (Art. 40-bis, Italian Decree Law 41/95) VAT paid in cash by P.A. (Art. 6, section 5, Italian Presidential Decree 633/72) VAT paid in cash by subjects with business turnover below Euro 200,000 (Art. 7, Italian Decree Law 185/2008) Other Flat-rate tax regime (article1, c. 54-89, L. 190/2014) Cross-border VAT exemption regime (EU Directive 2020/285) ================================================ FILE: Resources/RegimeFiscale.resx ================================================  text/microsoft-resx 1.3 System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Ordinario Contribuenti minimi (art.1, c.96-117, L. 244/07 ) Agricoltura e attività connesse e pesca (artt.34 e 34-bis, DPR 633/72 ) Vendita sali e tabacchi (art.74, c.1, DPR 633/72 ) Commercio fiammiferi (art.74, c.1, DPR 633/72 ) Editoria (art.74, c.1, DPR 633/72 ) Gestione servizi telefonia pubblica (art.74, c.1, DPR 633/72 ) Rivendita documenti di trasporto pubblico e di sosta (art.74, c.1, DPR 633/72 ) Intrattenimenti, giochi e altre attività di cui all atariffa allegata al DPR 640/72 (art.74, c.6, DPR 633/72 ) Agenzie viaggi e turismo (art.74-ter, DPR 633/72 ) Agriturismo (art.5, c.2 L. 413/91 ) Vendite a domicilio (art.25-bis, c.6, DPR 600/73 ) Rivendita beni usati, oggetti d'arte, d'antiquariato o da collezione (art.36, DL 41/95 ) Agenzie di vendite all'asta di oggetti d'arte, antiquariato o da collezione (art.40-bis, DL 41/95 ) IVA per cassa P.A. (art.6, c.5, DPR 633/72 ) IVA per cassa (art. 32-bis, DL 83/2012) Altro Regime forfettario (art.1, c.54-89, L. 190/2014 ) Regime transfrontaliero di Franchigia IVA (Direttiva UE 2020/285) ================================================ FILE: Resources/ScontoMaggiorazione.Designer.cs ================================================ //------------------------------------------------------------------------------ // // This code was generated by a tool. // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ namespace FatturaElettronica.Resources { using System; /// /// A strongly-typed resource class, for looking up localized strings, etc. /// // This class was auto-generated by the StronglyTypedResourceBuilder // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] public class ScontoMaggiorazione { private static global::System.Resources.ResourceManager resourceMan; private static global::System.Globalization.CultureInfo resourceCulture; [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] internal ScontoMaggiorazione() { } /// /// Returns the cached ResourceManager instance used by this class. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] public static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("FatturaElettronica.Resources.ScontoMaggiorazione", typeof(ScontoMaggiorazione).Assembly); resourceMan = temp; } return resourceMan; } } /// /// Overrides the current thread's CurrentUICulture property for all /// resource lookups using this strongly typed resource class. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] public static global::System.Globalization.CultureInfo Culture { get { return resourceCulture; } set { resourceCulture = value; } } /// /// Looks up a localized string similar to maggiorazione. /// public static string MG { get { return ResourceManager.GetString("MG", resourceCulture); } } /// /// Looks up a localized string similar to sconto. /// public static string SC { get { return ResourceManager.GetString("SC", resourceCulture); } } } } ================================================ FILE: Resources/ScontoMaggiorazione.de.resx ================================================  text/microsoft-resx 1.3 System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Rabatt Erhöhung ================================================ FILE: Resources/ScontoMaggiorazione.en.resx ================================================ text/microsoft-resx 1.3 System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 discount markup ================================================ FILE: Resources/ScontoMaggiorazione.resx ================================================  text/microsoft-resx 1.3 System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 sconto maggiorazione ================================================ FILE: Resources/SocioUnico.Designer.cs ================================================ //------------------------------------------------------------------------------ // // This code was generated by a tool. // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ namespace FatturaElettronica.Resources { using System; /// /// A strongly-typed resource class, for looking up localized strings, etc. /// // This class was auto-generated by the StronglyTypedResourceBuilder // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] public class SocioUnico { private static global::System.Resources.ResourceManager resourceMan; private static global::System.Globalization.CultureInfo resourceCulture; [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] internal SocioUnico() { } /// /// Returns the cached ResourceManager instance used by this class. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] public static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("FatturaElettronica.Resources.SocioUnico", typeof(SocioUnico).Assembly); resourceMan = temp; } return resourceMan; } } /// /// Overrides the current thread's CurrentUICulture property for all /// resource lookups using this strongly typed resource class. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] public static global::System.Globalization.CultureInfo Culture { get { return resourceCulture; } set { resourceCulture = value; } } /// /// Looks up a localized string similar to Più soci. /// public static string SM { get { return ResourceManager.GetString("SM", resourceCulture); } } /// /// Looks up a localized string similar to Socio unico. /// public static string SU { get { return ResourceManager.GetString("SU", resourceCulture); } } } } ================================================ FILE: Resources/SocioUnico.de.resx ================================================  text/microsoft-resx 1.3 System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Einzelgesellschafter Mehrere Gesellschafter ================================================ FILE: Resources/SocioUnico.en.resx ================================================ text/microsoft-resx 1.3 System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Sole shareholder Multiple shareholders ================================================ FILE: Resources/SocioUnico.resx ================================================  text/microsoft-resx 1.3 System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Socio unico Più soci ================================================ FILE: Resources/SoggettoEmittente.Designer.cs ================================================ //------------------------------------------------------------------------------ // // This code was generated by a tool. // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ namespace FatturaElettronica.Resources { using System; /// /// A strongly-typed resource class, for looking up localized strings, etc. /// // This class was auto-generated by the StronglyTypedResourceBuilder // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] public class SoggettoEmittente { private static global::System.Resources.ResourceManager resourceMan; private static global::System.Globalization.CultureInfo resourceCulture; [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] internal SoggettoEmittente() { } /// /// Returns the cached ResourceManager instance used by this class. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] public static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("FatturaElettronica.Resources.SoggettoEmittente", typeof(SoggettoEmittente).Assembly); resourceMan = temp; } return resourceMan; } } /// /// Overrides the current thread's CurrentUICulture property for all /// resource lookups using this strongly typed resource class. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] public static global::System.Globalization.CultureInfo Culture { get { return resourceCulture; } set { resourceCulture = value; } } /// /// Looks up a localized string similar to cessionario/committente. /// public static string CC { get { return ResourceManager.GetString("CC", resourceCulture); } } /// /// Looks up a localized string similar to terzo. /// public static string TZ { get { return ResourceManager.GetString("TZ", resourceCulture); } } } } ================================================ FILE: Resources/SoggettoEmittente.de.resx ================================================  text/microsoft-resx 1.3 System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Zessionar/Auftraggeber Dritter ================================================ FILE: Resources/SoggettoEmittente.en.resx ================================================ text/microsoft-resx 1.3 System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 transferee/client third party ================================================ FILE: Resources/SoggettoEmittente.resx ================================================  text/microsoft-resx 1.3 System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 cessionario/committente terzo ================================================ FILE: Resources/StatoLiquidazione.Designer.cs ================================================ //------------------------------------------------------------------------------ // // This code was generated by a tool. // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ namespace FatturaElettronica.Resources { using System; /// /// A strongly-typed resource class, for looking up localized strings, etc. /// // This class was auto-generated by the StronglyTypedResourceBuilder // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] public class StatoLiquidazione { private static global::System.Resources.ResourceManager resourceMan; private static global::System.Globalization.CultureInfo resourceCulture; [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] internal StatoLiquidazione() { } /// /// Returns the cached ResourceManager instance used by this class. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] public static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("FatturaElettronica.Resources.StatoLiquidazione", typeof(StatoLiquidazione).Assembly); resourceMan = temp; } return resourceMan; } } /// /// Overrides the current thread's CurrentUICulture property for all /// resource lookups using this strongly typed resource class. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] public static global::System.Globalization.CultureInfo Culture { get { return resourceCulture; } set { resourceCulture = value; } } /// /// Looks up a localized string similar to Non in liquidazione. /// public static string LN { get { return ResourceManager.GetString("LN", resourceCulture); } } /// /// Looks up a localized string similar to In liquidazione. /// public static string LS { get { return ResourceManager.GetString("LS", resourceCulture); } } } } ================================================ FILE: Resources/StatoLiquidazione.de.resx ================================================  text/microsoft-resx 1.3 System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 In Liquidation Nicht in Liquidation ================================================ FILE: Resources/StatoLiquidazione.en.resx ================================================ text/microsoft-resx 1.3 System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 In liquidation Not in liquidation ================================================ FILE: Resources/StatoLiquidazione.resx ================================================  text/microsoft-resx 1.3 System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 In liquidazione Non in liquidazione ================================================ FILE: Resources/TipoCassa.Designer.cs ================================================ //------------------------------------------------------------------------------ // // This code was generated by a tool. // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ namespace FatturaElettronica.Resources { using System; /// /// A strongly-typed resource class, for looking up localized strings, etc. /// // This class was auto-generated by the StronglyTypedResourceBuilder // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] public class TipoCassa { private static global::System.Resources.ResourceManager resourceMan; private static global::System.Globalization.CultureInfo resourceCulture; [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] internal TipoCassa() { } /// /// Returns the cached ResourceManager instance used by this class. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] public static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("FatturaElettronica.Resources.TipoCassa", typeof(TipoCassa).Assembly); resourceMan = temp; } return resourceMan; } } /// /// Overrides the current thread's CurrentUICulture property for all /// resource lookups using this strongly typed resource class. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] public static global::System.Globalization.CultureInfo Culture { get { return resourceCulture; } set { resourceCulture = value; } } /// /// Looks up a localized string similar to Cassa nazionale previdenza e assistenza avvocati e procuratori legali. /// public static string TC01 { get { return ResourceManager.GetString("TC01", resourceCulture); } } /// /// Looks up a localized string similar to Cassa previdenza dottori commercialisti. /// public static string TC02 { get { return ResourceManager.GetString("TC02", resourceCulture); } } /// /// Looks up a localized string similar to Cassa previdenza e assistenza geometri. /// public static string TC03 { get { return ResourceManager.GetString("TC03", resourceCulture); } } /// /// Looks up a localized string similar to Cassa nazionale previdenza e assistenza ingegneri e architetti liberi professionisti. /// public static string TC04 { get { return ResourceManager.GetString("TC04", resourceCulture); } } /// /// Looks up a localized string similar to Cassa nazionale del notariato. /// public static string TC05 { get { return ResourceManager.GetString("TC05", resourceCulture); } } /// /// Looks up a localized string similar to Cassa nazionale previdenza e assistenza ragionieri e periti commerciali. /// public static string TC06 { get { return ResourceManager.GetString("TC06", resourceCulture); } } /// /// Looks up a localized string similar to Ente nazionale assistenza agenti e rappresentanti di commercio (ENASARCO). /// public static string TC07 { get { return ResourceManager.GetString("TC07", resourceCulture); } } /// /// Looks up a localized string similar to Ente nazionale previdenza e assistenza consulenti del lavoro (ENPACL). /// public static string TC08 { get { return ResourceManager.GetString("TC08", resourceCulture); } } /// /// Looks up a localized string similar to Ente nazionale previdenza e assistenza medici (ENPAM). /// public static string TC09 { get { return ResourceManager.GetString("TC09", resourceCulture); } } /// /// Looks up a localized string similar to Ente nazionale previdenza e assistenza farmacisti (ENPAF). /// public static string TC10 { get { return ResourceManager.GetString("TC10", resourceCulture); } } /// /// Looks up a localized string similar to Ente nazionale previdenza e assistenza veterinari (ENPAV). /// public static string TC11 { get { return ResourceManager.GetString("TC11", resourceCulture); } } /// /// Looks up a localized string similar to Ente nazionale previdenza e assistenza impiegati dell'agricoltura (ENPAIA). /// public static string TC12 { get { return ResourceManager.GetString("TC12", resourceCulture); } } /// /// Looks up a localized string similar to Fondo previdenza impiegati imprese di spedizione e agenzie marittime. /// public static string TC13 { get { return ResourceManager.GetString("TC13", resourceCulture); } } /// /// Looks up a localized string similar to Istituto nazionale previdenza giornalisti italiani (INPGI). /// public static string TC14 { get { return ResourceManager.GetString("TC14", resourceCulture); } } /// /// Looks up a localized string similar to Opera nazionale assistenza orfani sanitari italiani (ONAOSI). /// public static string TC15 { get { return ResourceManager.GetString("TC15", resourceCulture); } } /// /// Looks up a localized string similar to Cassa autonoma assistenza integrativa giornalisti italiani (CASAGIT). /// public static string TC16 { get { return ResourceManager.GetString("TC16", resourceCulture); } } /// /// Looks up a localized string similar to Ente previdenza periti industriali e periti industriali laureati (EPPI). /// public static string TC17 { get { return ResourceManager.GetString("TC17", resourceCulture); } } /// /// Looks up a localized string similar to Ente previdenza e assistenza pluricategoriale (EPAP). /// public static string TC18 { get { return ResourceManager.GetString("TC18", resourceCulture); } } /// /// Looks up a localized string similar to Ente nazionale previdenza e assistenza biologi (ENPAB). /// public static string TC19 { get { return ResourceManager.GetString("TC19", resourceCulture); } } /// /// Looks up a localized string similar to Ente nazionale previdenza e assistenza professione infermieristica (ENPAPI). /// public static string TC20 { get { return ResourceManager.GetString("TC20", resourceCulture); } } /// /// Looks up a localized string similar to Ente nazionale previdenza e assistenza psicologi (ENPAP). /// public static string TC21 { get { return ResourceManager.GetString("TC21", resourceCulture); } } /// /// Looks up a localized string similar to INPS. /// public static string TC22 { get { return ResourceManager.GetString("TC22", resourceCulture); } } } } ================================================ FILE: Resources/TipoCassa.de.resx ================================================  text/microsoft-resx 1.3 System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Nationale Rentenkasse und Unterstützung für Anwälte und Rechtsanwälte Rentenversicherung der Wirtschaftsprüfer Renten- und Unterstützungskasse der Geometer Nationale Rentenkasse und Unterstützung für freiberufliche Ingenieure und Architekten Nationale Notarkasse Nationale Rentenkasse und Unterstützung für Buchhalter und Handelsprüfer Nationale Unterstützungseinrichtung für Handelsvertreter (ENASARCO) Nationale Renten- und Unterstützungseinrichtung für Arbeitsberater (ENPACL) Nationale Renten- und Unterstützungseinrichtung für Ärzte (ENPAM) Nationale Renten- und Unterstützungseinrichtung für Apotheker (ENPAF) Nationale Renten- und Unterstützungseinrichtung für Tierärzte (ENPAV) Nationale Renten- und Unterstützungseinrichtung für landwirtschaftliche Angestellte (ENPAIA) Rentenfonds für Angestellte von Speditionsunternehmen und Schifffahrtsagenturen Nationale Rentenversicherung für italienische Journalisten (INPGI) Nationale Unterstützungseinrichtung für Waisen italienischer Gesundheitsberufe (ONAOSI) Autonome Unterstützungskasse für italienische Journalisten (CASAGIT) Renten- und Unterstützungseinrichtung für Industrieprüfer und graduierte Industrieprüfer (EPPI) Renten- und Unterstützungseinrichtung für mehrere Kategorien (EPAP) Nationale Renten- und Unterstützungseinrichtung für Biologen (ENPAB) Nationale Renten- und Unterstützungseinrichtung für Pflegeberufe (ENPAPI) Nationale Renten- und Unterstützungseinrichtung für Psychologen (ENPAP) INPS ================================================ FILE: Resources/TipoCassa.en.resx ================================================ text/microsoft-resx 1.3 System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 National Pension and Welfare Fund for Lawyers and Solicitors Pension fund for accountants Pension and welfare fund for surveyors National pension and welfare fund for self-employed engineers and architects National fund for solicitors National pension and welfare fund for bookkeepers and commercial experts National welfare board for sales agents and representatives (ENASARCO - Ente Nazionale Assistenza Agenti e Rappresentanti di Commercio) National pension and welfare board for employment consultants (ENPACL - Ente Nazionale Previdenza e Assistenza Consulenti del Lavoro) National pension and welfare board for doctors (ENPAM - Ente Nazionale Previdenza e Assistenza Medici) National pension and welfare board for pharmacists (ENPAF - Ente Nazionale Previdenza e Assistenza Farmacisti ) National pension and welfare board for veterinary physicians (ENPAV - Ente Nazionale Previdenza e Assistenza Veterinari) National pension and welfare board for agricultural employees (ENPAIA - Ente Nazionale Previdenza e Assistenza Impiegati dell'Agricoltura) Pension fund for employees of shipping companies and maritime agencies) National pension institute for Italian journalists (INPGI - Istituto Nazionale Previdenza Giornalisti Italiani) National welfare board for orphans of Italian doctors (ONAOSI - Opera Nazionale Assistenza Orfani Sanitari Italiani) Autonomous supplementary welfare fund for Italian journalists (CASAGIT - Cassa Autonoma Assistenza Integrativa Giornalisti Italiani) Pension board for industrial experts and graduate industrial experts (EPPI - Ente Previdenza Periti Industriali e Periti Industriali Laureati) National multi-category pension and welfare board (EPAP - Ente Previdenza e Assistenza Pluricategoriale) National pension and welfare board for biologists (ENPAB - Ente Nazionale Previdenza e Assistenza Biologi) National pension and welfare board for the nursing profession (ENPAPI - Ente Nazionale Previdenza e Assistenza Professione Infermieristica) National pension and welfare board for psychologists (ENPAP - Ente Nazionale Previdenza e Assistenza Psicologi) National Social Security Institute (INPS - Istituto Nazionale della Previdenza Sociale) ================================================ FILE: Resources/TipoCassa.resx ================================================  text/microsoft-resx 1.3 System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Cassa nazionale previdenza e assistenza avvocati e procuratori legali Cassa previdenza dottori commercialisti Cassa previdenza e assistenza geometri Cassa nazionale previdenza e assistenza ingegneri e architetti liberi professionisti Cassa nazionale del notariato Cassa nazionale previdenza e assistenza ragionieri e periti commerciali Ente nazionale assistenza agenti e rappresentanti di commercio (ENASARCO) Ente nazionale previdenza e assistenza consulenti del lavoro (ENPACL) Ente nazionale previdenza e assistenza medici (ENPAM) Ente nazionale previdenza e assistenza farmacisti (ENPAF) Ente nazionale previdenza e assistenza veterinari (ENPAV) Ente nazionale previdenza e assistenza impiegati dell'agricoltura (ENPAIA) Fondo previdenza impiegati imprese di spedizione e agenzie marittime Istituto nazionale previdenza giornalisti italiani (INPGI) Opera nazionale assistenza orfani sanitari italiani (ONAOSI) Cassa autonoma assistenza integrativa giornalisti italiani (CASAGIT) Ente previdenza periti industriali e periti industriali laureati (EPPI) Ente previdenza e assistenza pluricategoriale (EPAP) Ente nazionale previdenza e assistenza biologi (ENPAB) Ente nazionale previdenza e assistenza professione infermieristica (ENPAPI) Ente nazionale previdenza e assistenza psicologi (ENPAP) INPS ================================================ FILE: Resources/TipoCessionePrestazione.Designer.cs ================================================ //------------------------------------------------------------------------------ // // This code was generated by a tool. // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ namespace FatturaElettronica.Resources { using System; /// /// A strongly-typed resource class, for looking up localized strings, etc. /// // This class was auto-generated by the StronglyTypedResourceBuilder // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] public class TipoCessionePrestazione { private static global::System.Resources.ResourceManager resourceMan; private static global::System.Globalization.CultureInfo resourceCulture; [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] internal TipoCessionePrestazione() { } /// /// Returns the cached ResourceManager instance used by this class. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] public static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("FatturaElettronica.Resources.TipoCessionePrestazione", typeof(TipoCessionePrestazione).Assembly); resourceMan = temp; } return resourceMan; } } /// /// Overrides the current thread's CurrentUICulture property for all /// resource lookups using this strongly typed resource class. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] public static global::System.Globalization.CultureInfo Culture { get { return resourceCulture; } set { resourceCulture = value; } } /// /// Looks up a localized string similar to abbuono. /// public static string AB { get { return ResourceManager.GetString("AB", resourceCulture); } } /// /// Looks up a localized string similar to spesa accessoria. /// public static string AC { get { return ResourceManager.GetString("AC", resourceCulture); } } /// /// Looks up a localized string similar to premio. /// public static string PR { get { return ResourceManager.GetString("PR", resourceCulture); } } /// /// Looks up a localized string similar to sconto. /// public static string SC { get { return ResourceManager.GetString("SC", resourceCulture); } } } } ================================================ FILE: Resources/TipoCessionePrestazione.de.resx ================================================  text/microsoft-resx 1.3 System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Rabatt Prämie Abzug Zusatzkosten ================================================ FILE: Resources/TipoCessionePrestazione.en.resx ================================================ text/microsoft-resx 1.3 System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 discount bonus rebate ancillary expense ================================================ FILE: Resources/TipoCessionePrestazione.resx ================================================  text/microsoft-resx 1.3 System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 sconto premio abbuono spesa accessoria ================================================ FILE: Resources/TipoDocumento.Designer.cs ================================================ //------------------------------------------------------------------------------ // // This code was generated by a tool. // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ namespace FatturaElettronica.Resources { using System; /// /// A strongly-typed resource class, for looking up localized strings, etc. /// // This class was auto-generated by the StronglyTypedResourceBuilder // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] public class TipoDocumento { private static global::System.Resources.ResourceManager resourceMan; private static global::System.Globalization.CultureInfo resourceCulture; [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] internal TipoDocumento() { } /// /// Returns the cached ResourceManager instance used by this class. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] public static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("FatturaElettronica.Resources.TipoDocumento", typeof(TipoDocumento).Assembly); resourceMan = temp; } return resourceMan; } } /// /// Overrides the current thread's CurrentUICulture property for all /// resource lookups using this strongly typed resource class. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] public static global::System.Globalization.CultureInfo Culture { get { return resourceCulture; } set { resourceCulture = value; } } /// /// Looks up a localized string similar to fattura. /// public static string TD01 { get { return ResourceManager.GetString("TD01", resourceCulture); } } /// /// Looks up a localized string similar to acconto/anticipo su fattura. /// public static string TD02 { get { return ResourceManager.GetString("TD02", resourceCulture); } } /// /// Looks up a localized string similar to acconto/anticipo su parcella. /// public static string TD03 { get { return ResourceManager.GetString("TD03", resourceCulture); } } /// /// Looks up a localized string similar to nota di credito. /// public static string TD04 { get { return ResourceManager.GetString("TD04", resourceCulture); } } /// /// Looks up a localized string similar to nota di debito. /// public static string TD05 { get { return ResourceManager.GetString("TD05", resourceCulture); } } /// /// Looks up a localized string similar to parcella. /// public static string TD06 { get { return ResourceManager.GetString("TD06", resourceCulture); } } /// /// Looks up a localized string similar to integrazione fattura reverse charge interno. /// public static string TD16 { get { return ResourceManager.GetString("TD16", resourceCulture); } } /// /// Looks up a localized string similar to integrazione/autofattura per acquisto servizi dall'estero. /// public static string TD17 { get { return ResourceManager.GetString("TD17", resourceCulture); } } /// /// Looks up a localized string similar to integrazione per acquisto di beni intracomunitari. /// public static string TD18 { get { return ResourceManager.GetString("TD18", resourceCulture); } } /// /// Looks up a localized string similar to integrazione/autofattura per acquisto di beni ex art. 17 c.2 DPR 633/72. /// public static string TD19 { get { return ResourceManager.GetString("TD19", resourceCulture); } } /// /// Looks up a localized string similar to autofattura per regolarizzazione e integrazione delle fatture (ex art. 6 c.9-bis d.lgs. 471/97 o art. 46 c.5 d.l. 331/93). /// public static string TD20 { get { return ResourceManager.GetString("TD20", resourceCulture); } } /// /// Looks up a localized string similar to autofattura per splafonamento. /// public static string TD21 { get { return ResourceManager.GetString("TD21", resourceCulture); } } /// /// Looks up a localized string similar to estrazione beni da Deposito IVA. /// public static string TD22 { get { return ResourceManager.GetString("TD22", resourceCulture); } } /// /// Looks up a localized string similar to estrazione beni da Deposito IVA con versamento dell'IVA. /// public static string TD23 { get { return ResourceManager.GetString("TD23", resourceCulture); } } /// /// Looks up a localized string similar to Fattura differita di cui all’art.21, comma 4, terzo periodo lett. a) DPR 633/72. /// public static string TD24 { get { return ResourceManager.GetString("TD24", resourceCulture); } } /// /// Looks up a localized string similar to Fattura differita di cui all’art.21, comma 4, terzo periodo lett. b) DPR 633/72. /// public static string TD25 { get { return ResourceManager.GetString("TD25", resourceCulture); } } /// /// Looks up a localized string similar to cessione di beni ammortizzabili e per passaggi interni (ex art.36 DPR 633/72). /// public static string TD26 { get { return ResourceManager.GetString("TD26", resourceCulture); } } /// /// Looks up a localized string similar to fattura per autoconsumo o per cessioni gratuite senza rivalsa. /// public static string TD27 { get { return ResourceManager.GetString("TD27", resourceCulture); } } /// /// Looks up a localized string similar to acquisti da San Marino con IVA (fattura cartacea). /// public static string TD28 { get { return ResourceManager.GetString("TD28", resourceCulture); } } /// /// Looks up a localized string similar to comunicazione per omessa o irregolare fatturazione (art. 6, comma 8, d.lgs. 471/97). /// public static string TD29 { get { return ResourceManager.GetString("TD29", resourceCulture); } } } } ================================================ FILE: Resources/TipoDocumento.de.resx ================================================  text/microsoft-resx 1.3 System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Rechnung Anzahlung/Vorauszahlung auf Rechnung Anzahlung/Vorauszahlung auf Honorar Gutschrift Lastschrift Honorar Rechnungsintegration Reverse Charge intern Integration/Selbstfakturierung für Dienstleistungen aus dem Ausland Integration für innergemeinschaftlichen Erwerb von Waren Integration/Selbstfakturierung für den Erwerb von Waren gemäß Art. 17 Abs. 2 DPR 633/72 Selbstfakturierung zur Regularisierung und Integration von Rechnungen (gemäß Art. 6 Abs. 9-bis d.lgs 471/97 oder Art. 46 Abs. 5 d.l. 331/93) Selbstfakturierung für Überschreitung des Höchstbetrags Entnahme von Waren aus dem Mehrwertsteuerlager Entnahme von Waren aus dem Mehrwertsteuerlager mit Mehrwertsteuerzahlung Verzögerte Rechnung gemäß Art. 21, Absatz 4, dritter Satz Buchstabe a) DPR 633/72 Verzögerte Rechnung gemäß Art. 21, Absatz 4, dritter Satz Buchstabe b) DPR 633/72 Verkauf von abnutzbaren Gütern und für interne Übertragungen (gemäß Art. 36 DPR 633/72) Rechnung für Eigenverbrauch oder kostenlose Übertragungen ohne Rückgriff Einkäufe aus San Marino mit Mehrwertsteuer (Papierrechnung) Mitteilung wegen unterlassener oder unregelmäßiger Rechnungsstellung (Art. 6, Absatz 8, d.lgs 471/97) ================================================ FILE: Resources/TipoDocumento.en.resx ================================================ text/microsoft-resx 1.3 System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 invoice advance/down payment on invoice advance/down payment on fee credit note debit note fee reverse charge internal invoice integration integration/self invoicing for purchase services from abroad integration for purchase of intra UE goods integration/self invoicing for purchase of goods ex art.17 c.2 DPR 633/72 self invoice invoicing for regularization and integration of invoices (ex article 6 c.9-bis d.lgs. 471/97 or article 46 c.5 d.l. 331/93) self invoicing for splaphoning extractions of goods from VAT Warehouse extractions of goods from VAT Warehouse with payment of VAT deferred invoice ex art.21, c.4, third period lett. a) DPR 633/72 deferred invoice ex art.21, c.4, third period lett. b) DPR 633/72 sale of depreciable assets and for internal transfers (ex art.36 DPR 633/72) self invoicing for self consumption or for free transfer without recourse purchases from san marino with VAT (paper invoice) communication for omitted or irregular invoicing (article 6, paragraph 8, Legislative Decree 471/97) ================================================ FILE: Resources/TipoDocumento.resx ================================================  text/microsoft-resx 1.3 System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 fattura acconto/anticipo su fattura acconto/anticipo su parcella nota di credito nota di debito parcella integrazione fattura reverse charge interno integrazione/autofattura per acquisto servizi dall'estero integrazione per acquisto di beni intracomunitari integrazione/autofattura per acquisto di beni ex art. 17 c.2 DPR 633/72 autofattura per regolarizzazione e integrazione delle fatture (ex art. 6 c.9-bis d.lgs. 471/97 o art. 46 c.5 d.l. 331/93) autofattura per splafonamento estrazione beni da Deposito IVA estrazione beni da Deposito IVA con versamento dell'IVA Fattura differita di cui all’art.21, comma 4, terzo periodo lett. a) DPR 633/72 Fattura differita di cui all’art.21, comma 4, terzo periodo lett. b) DPR 633/72 cessione di beni ammortizzabili e per passaggi interni (ex art.36 DPR 633/72) fattura per autoconsumo o per cessioni gratuite senza rivalsa acquisti da San Marino con IVA (fattura cartacea) comunicazione per omessa o irregolare fatturazione (art. 6, comma 8, d.lgs. 471/97) ================================================ FILE: Resources/TipoDocumentoSemplificata.Designer.cs ================================================ //------------------------------------------------------------------------------ // // This code was generated by a tool. // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ namespace FatturaElettronica.Resources { using System; /// /// A strongly-typed resource class, for looking up localized strings, etc. /// // This class was auto-generated by the StronglyTypedResourceBuilder // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] public class TipoDocumentoSemplificata { private static global::System.Resources.ResourceManager resourceMan; private static global::System.Globalization.CultureInfo resourceCulture; [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] internal TipoDocumentoSemplificata() { } /// /// Returns the cached ResourceManager instance used by this class. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] public static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("FatturaElettronica.Resources.TipoDocumentoSemplificata", typeof(TipoDocumentoSemplificata).Assembly); resourceMan = temp; } return resourceMan; } } /// /// Overrides the current thread's CurrentUICulture property for all /// resource lookups using this strongly typed resource class. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] public static global::System.Globalization.CultureInfo Culture { get { return resourceCulture; } set { resourceCulture = value; } } /// /// Looks up a localized string similar to fattura semplificata. /// public static string TD07 { get { return ResourceManager.GetString("TD07", resourceCulture); } } /// /// Looks up a localized string similar to nota di credito semplificata. /// public static string TD08 { get { return ResourceManager.GetString("TD08", resourceCulture); } } /// /// Looks up a localized string similar to nota di debito semplificata. /// public static string TD09 { get { return ResourceManager.GetString("TD09", resourceCulture); } } } } ================================================ FILE: Resources/TipoDocumentoSemplificata.de.resx ================================================  text/microsoft-resx 1.3 System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 vereinfachte Rechnung vereinfachte Gutschrift vereinfachte Lastschrift ================================================ FILE: Resources/TipoDocumentoSemplificata.en.resx ================================================ text/microsoft-resx 1.3 System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 simplified invoice simplified credit note simplified debit note ================================================ FILE: Resources/TipoDocumentoSemplificata.resx ================================================  text/microsoft-resx 1.3 System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 fattura semplificata nota di credito semplificata nota di debito semplificata ================================================ FILE: Resources/TipoResa.Designer.cs ================================================ //------------------------------------------------------------------------------ // // This code was generated by a tool. // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ namespace FatturaElettronica.Resources { using System; /// /// A strongly-typed resource class, for looking up localized strings, etc. /// // This class was auto-generated by the StronglyTypedResourceBuilder // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] public class TipoResa { private static global::System.Resources.ResourceManager resourceMan; private static global::System.Globalization.CultureInfo resourceCulture; [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] internal TipoResa() { } /// /// Returns the cached ResourceManager instance used by this class. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] public static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("FatturaElettronica.Resources.TipoResa", typeof(TipoResa).Assembly); resourceMan = temp; } return resourceMan; } } /// /// Overrides the current thread's CurrentUICulture property for all /// resource lookups using this strongly typed resource class. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] public static global::System.Globalization.CultureInfo Culture { get { return resourceCulture; } set { resourceCulture = value; } } /// /// Looks up a localized string similar to Costo e Nolo. /// public static string CFR { get { return ResourceManager.GetString("CFR", resourceCulture); } } /// /// Looks up a localized string similar to Costo, assicurazione e nolo. /// public static string CIF { get { return ResourceManager.GetString("CIF", resourceCulture); } } /// /// Looks up a localized string similar to Trasporto e assicurazione pagati fino a. /// public static string CIP { get { return ResourceManager.GetString("CIP", resourceCulture); } } /// /// Looks up a localized string similar to Trasporto pagato fino a. /// public static string CPT { get { return ResourceManager.GetString("CPT", resourceCulture); } } /// /// Looks up a localized string similar to Reso a luogo di destinazione. /// public static string DAP { get { return ResourceManager.GetString("DAP", resourceCulture); } } /// /// Looks up a localized string similar to Reso sdoganato. /// public static string DDP { get { return ResourceManager.GetString("DDP", resourceCulture); } } /// /// Looks up a localized string similar to Reso al luogo di destinazione scaricato. /// public static string DPU { get { return ResourceManager.GetString("DPU", resourceCulture); } } /// /// Looks up a localized string similar to Franco Fabbrica. /// public static string EXW { get { return ResourceManager.GetString("EXW", resourceCulture); } } /// /// Looks up a localized string similar to Franco lungo bordo. /// public static string FAS { get { return ResourceManager.GetString("FAS", resourceCulture); } } /// /// Looks up a localized string similar to Franco Vettore. /// public static string FCA { get { return ResourceManager.GetString("FCA", resourceCulture); } } /// /// Looks up a localized string similar to Franco a bordo. /// public static string FOB { get { return ResourceManager.GetString("FOB", resourceCulture); } } } } ================================================ FILE: Resources/TipoResa.de.resx ================================================  text/microsoft-resx 1.3 System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Ab Werk Frei Frachtführer Frei Längsseite Schiff Frei an Bord Kosten und Fracht Kosten, Versicherung und Fracht Fracht bezahlt bis zu Versand und Versicherung bis max. bezahlt Zum Entladeziel zurückgekehrt Rückkehr zum Bestimmungsort Rücksendung verzollt ================================================ FILE: Resources/TipoResa.en.resx ================================================ text/microsoft-resx 1.3 System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Ex Works Free Carrier Free Alongside Ship Free On Board Cost and Freight Cost, Insurance and Freight Carriage Paid To Carriage and Insurance Paid To Delivered at Place Unloaded Delivered at Place Delivered Duty Paid ================================================ FILE: Resources/TipoResa.resx ================================================  text/microsoft-resx 1.3 System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Franco Fabbrica Franco Vettore Franco lungo bordo Franco a bordo Costo e Nolo Costo, assicurazione e nolo Trasporto pagato fino a Trasporto e assicurazione pagati fino a Reso al luogo di destinazione scaricato Reso a luogo di destinazione Reso sdoganato ================================================ FILE: Resources/TipoRitenuta.Designer.cs ================================================ //------------------------------------------------------------------------------ // // This code was generated by a tool. // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ namespace FatturaElettronica.Resources { using System; /// /// A strongly-typed resource class, for looking up localized strings, etc. /// // This class was auto-generated by the StronglyTypedResourceBuilder // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] public class TipoRitenuta { private static global::System.Resources.ResourceManager resourceMan; private static global::System.Globalization.CultureInfo resourceCulture; [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] internal TipoRitenuta() { } /// /// Returns the cached ResourceManager instance used by this class. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] public static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("FatturaElettronica.Resources.TipoRitenuta", typeof(TipoRitenuta).Assembly); resourceMan = temp; } return resourceMan; } } /// /// Overrides the current thread's CurrentUICulture property for all /// resource lookups using this strongly typed resource class. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] public static global::System.Globalization.CultureInfo Culture { get { return resourceCulture; } set { resourceCulture = value; } } /// /// Looks up a localized string similar to ritenuta persone fisiche. /// public static string RT01 { get { return ResourceManager.GetString("RT01", resourceCulture); } } /// /// Looks up a localized string similar to ritenuta persone giuridiche. /// public static string RT02 { get { return ResourceManager.GetString("RT02", resourceCulture); } } /// /// Looks up a localized string similar to contributo INPS. /// public static string RT03 { get { return ResourceManager.GetString("RT03", resourceCulture); } } /// /// Looks up a localized string similar to contributo ENASARCO. /// public static string RT04 { get { return ResourceManager.GetString("RT04", resourceCulture); } } /// /// Looks up a localized string similar to contributo ENPAM. /// public static string RT05 { get { return ResourceManager.GetString("RT05", resourceCulture); } } /// /// Looks up a localized string similar to altro contributo previdenziale. /// public static string RT06 { get { return ResourceManager.GetString("RT06", resourceCulture); } } } } ================================================ FILE: Resources/TipoRitenuta.de.resx ================================================  text/microsoft-resx 1.3 System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Abzug für natürliche Personen Abzug für juristische Personen INPS-Beitrag ENASARCO-Beitrag ENPAM-Beitrag anderer Sozialversicherungsbeitrag ================================================ FILE: Resources/TipoRitenuta.en.resx ================================================ text/microsoft-resx 1.3 System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 witholding tax natural persons witholding corporate entities INPS contribution ENASARCO contribution ENPAM contribution other social security contribution ================================================ FILE: Resources/TipoRitenuta.resx ================================================  text/microsoft-resx 1.3 System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 ritenuta persone fisiche ritenuta persone giuridiche contributo INPS contributo ENASARCO contributo ENPAM altro contributo previdenziale ================================================ FILE: Resources/ValidatorMessages.Designer.cs ================================================ //------------------------------------------------------------------------------ // // This code was generated by a tool. // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ namespace FatturaElettronica.Resources { using System; [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] public class ValidatorMessages { private static System.Resources.ResourceManager resourceMan; private static System.Globalization.CultureInfo resourceCulture; [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] internal ValidatorMessages() { } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] public static System.Resources.ResourceManager ResourceManager { get { if (object.Equals(null, resourceMan)) { System.Resources.ResourceManager temp = new System.Resources.ResourceManager("FatturaElettronica.Resources.ValidatorMessages", typeof(ValidatorMessages).Assembly); resourceMan = temp; } return resourceMan; } } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] public static System.Globalization.CultureInfo Culture { get { return resourceCulture; } set { resourceCulture = value; } } public static string E00417 { get { return ResourceManager.GetString("E00417", resourceCulture); } } public static string E00425 { get { return ResourceManager.GetString("E00425", resourceCulture); } } public static string E00415 { get { return ResourceManager.GetString("E00415", resourceCulture); } } public static string E00418 { get { return ResourceManager.GetString("E00418", resourceCulture); } } public static string E00429 { get { return ResourceManager.GetString("E00429", resourceCulture); } } public static string E00419 { get { return ResourceManager.GetString("E00419", resourceCulture); } } public static string E00420 { get { return ResourceManager.GetString("E00420", resourceCulture); } } public static string E00423 { get { return ResourceManager.GetString("E00423", resourceCulture); } } public static string E00400 { get { return ResourceManager.GetString("E00400", resourceCulture); } } public static string E00411 { get { return ResourceManager.GetString("E00411", resourceCulture); } } public static string E00422 { get { return ResourceManager.GetString("E00422", resourceCulture); } } public static string E00474 { get { return ResourceManager.GetString("E00474", resourceCulture); } } public static string E00476 { get { return ResourceManager.GetString("E00476", resourceCulture); } } public static string E00475 { get { return ResourceManager.GetString("E00475", resourceCulture); } } public static string E00471 { get { return ResourceManager.GetString("E00471", resourceCulture); } } public static string E00472 { get { return ResourceManager.GetString("E00472", resourceCulture); } } public static string E00473 { get { return ResourceManager.GetString("E00473", resourceCulture); } } public static string E00443 { get { return ResourceManager.GetString("E00443", resourceCulture); } } public static string E00444 { get { return ResourceManager.GetString("E00444", resourceCulture); } } public static string E00401 { get { return ResourceManager.GetString("E00401", resourceCulture); } } public static string E00430 { get { return ResourceManager.GetString("E00430", resourceCulture); } } public static string E00437 { get { return ResourceManager.GetString("E00437", resourceCulture); } } public static string ValidNumberRange_X_Y { get { return ResourceManager.GetString("ValidNumberRange_X_Y", resourceCulture); } } public static string DatiBeniServiziEObbligatorio { get { return ResourceManager.GetString("DatiBeniServiziEObbligatorio", resourceCulture); } } public static string IdentificativiFiscaliEObbligatorio { get { return ResourceManager.GetString("IdentificativiFiscaliEObbligatorio", resourceCulture); } } public static string E00418_S { get { return ResourceManager.GetString("E00418_S", resourceCulture); } } public static string E00401_S { get { return ResourceManager.GetString("E00401_S", resourceCulture); } } public static string E00400_S { get { return ResourceManager.GetString("E00400_S", resourceCulture); } } public static string E00460 { get { return ResourceManager.GetString("E00460", resourceCulture); } } public static string E00471_S { get { return ResourceManager.GetString("E00471_S", resourceCulture); } } public static string E00417_S { get { return ResourceManager.GetString("E00417_S", resourceCulture); } } public static string PropertyName_valoriAccettati_AcceptedValues { get { return ResourceManager.GetString("PropertyName_valoriAccettati_AcceptedValues", resourceCulture); } } public static string TestoContententeCaratteriNonValidi { get { return ResourceManager.GetString("TestoContententeCaratteriNonValidi", resourceCulture); } } } } ================================================ FILE: Resources/ValidatorMessages.de.resx ================================================ text/microsoft-resx 1.3 System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 IdFiscaleIVA und CodiceFiscale nicht ausgefüllt (mindestens eines der beiden muss ausgefüllt sein) Nummer enthält keine numerischen Zeichen DatiRitenuta nicht vorhanden, obwohl DatiCassaPrevidenziale.Ritenuta ausgefüllt ist Datum liegt vor einem oder mehreren Daten in DatiFattureCollegate Natura nicht vorhanden, obwohl Aliquota IVA gleich 0 ist Natura mit Wert vom Typ 'N6' (Reverse-Charge) bei EsigiblitaIVA gleich 'S' (Split-Payment) PrezzoTotale nicht gemäß den technischen Spezifikationen berechnet Natura nicht vorhanden, obwohl Aliquota IVA gleich 0 ist DatiRitenuta nicht vorhanden, obwohl mindestens ein DettaglioLinee-Block mit Ritenuta gleich SI vorhanden ist ImponibileImporto nicht gemäß den technischen Spezifikationen berechnet Im Dokumententyp 'TD21 Selbstfakturierung für Überschreitung des Höchstbetrags' müssen alle Detailzeilen einen Mehrwertsteuersatz ungleich 0 haben Die Elemente IdPaese und IdPaese können nicht beide mit einem anderen Code als IT ausgefüllt sein Für den im Element 2.1.1.1 TipoDocumento angegebenen Wert muss das Element 1.4.1.1 IdFiscaleIVA des Übernehmers/Kunden vorhanden sein Für den im Element 2.1.1.1 TipoDocumento angegebenen Wert kann der Übertragende/Anbieter nicht mit dem Übernehmenden/Auftraggeber identisch sein Die Werte TD21 und TD27 des Dokumententyps erlauben nicht die Angabe eines anderen Lieferanten als des Empfängers Für den angegebenen Wert im Element TipoDocumento ist der Wert im Element IdPaese nicht zulässig Alle Mehrwertsteuersätze in den Detailzeilen einer Rechnung oder in den Daten der Sozialversicherungskasse müssen auch in den Zusammenfassungsdaten vorhanden sein Alle Werte der Natur der Operation in den Detailzeilen einer Rechnung oder in den Daten der Sozialversicherungskasse müssen auch in den Zusammenfassungsdaten vorhanden sein Natura vorhanden, obwohl Aliquota IVA ungleich 0 ist (die Angabe eines Mehrwertsteuersatzes ungleich 0 qualifiziert die Operation als steuerpflichtig und daher ist die Angabe des Elements Natura nicht zulässig, außer im Fall, dass das Element TipoDocumento den Wert TD16 annimmt) Natura vorhanden, obwohl Aliquota IVA ungleich 0 ist (die Angabe eines Mehrwertsteuersatzes ungleich 0 qualifiziert die Operation als steuerpflichtig und daher ist die Angabe des Elements Natura nicht zulässig, außer im Fall, dass das Element TipoDocumento den Wert TD16 annimmt) Prozentsatz und Betrag nicht vorhanden, obwohl Typ ausgefüllt ist Zulässige Werte {0}-{1} DatiBeniServizi ist obligatorisch IdentificativiFiscali ist obligatorisch Datum liegt vor dem Datum der korrigierten Rechnung Natura vorhanden, obwohl Aliquota IVA ungleich 0 ist Die Angabe eines Mehrwertsteuersatzes von 0 erfordert die Angabe der Natur der Operation, die die Nichtbesteuerung rechtfertigt Gesamtbetrag übersteigt das für vereinfachte Rechnungen gemäß DPR 633/72, Art. 21bis und DM vom 10. Mai 2019 vorgesehene Limit Der Wert TD07 des Dokumententyps erlaubt nicht die Angabe derselben Person sowohl als Lieferant als auch als Empfänger IdFiscaleIVA und CodiceFiscale nicht ausgefüllt (mindestens eines der beiden muss ausgefüllt sein) DatiRiepilogo ist in der Korrespondenz mit einem Wert von DettaglioLinee.AliquiotaIVA oder DatiCassaPrevidenziale.AliquotaIVA nicht vorhanden '{PropertyName}' zulässige Werte: {AcceptedValues} Text enthält ungültige Zeichen ({0}). nicht akzeptierte Werte: {{NonLatinCode}} ================================================ FILE: Resources/ValidatorMessages.en.resx ================================================ text/microsoft-resx 1.3 System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 No VAT ID or Fiscal Code provided (at least one must be populated) Number does not contain numeric characters DatiRitenuta not present despite DatiCassaPrevidenziale.Ritenuta being populated Date is earlier than one or more dates in DatiFattureCollegate Nature not present when VAT Rate is zero DatiRiepilogo not present corresponding to at least one DettaglioLinee.AliquotaIVA or DatiCassaPrevidenziale.AliquotaIVA value Nature with value 'N6' (accounting reversal) against EsigiblitaIVA equal to 'S' (split payment) PrezzoTotale not calculated according to technical specifications Nature not present when VAT Rate is zero DatiRitenuta not present despite at least one DettaglioLinee block with Ritenuta equal to YES ImponibileImporto not calculated according to technical specifications In document type 'self-invoice for overstepping' all detail lines must have a VAT rate different from zero Elements IdPaese and IdPaese cannot both be populated with a code different from IT For the value indicated in element 2.1.1.1 DocumentType, the element 1.4.1.1 VAT ID of the buyer/customer must be present For the value indicated in element 2.1.1.1 DocumentType, the supplier/provider cannot be the same as the buyer/customer Document types TD21 and TD27 do not allow indication of a supplier different from the buyer For the value indicated in element 2.1.1.1 DocumentType, the value in element 1.2.1.1.1 IdPaese is not allowed All VAT rate values in invoice detail lines or social security fund data must also be present in summary data All operation nature values in invoice detail lines or social security fund data must also be present in summary data Nature present when VAT Rate is non-zero (a non-zero VAT rate indicates a taxable transaction, so the Nature element is not allowed, except when DocumentType has value TD16) Nature present when VAT Rate is non-zero (a non-zero VAT rate indicates a taxable transaction, so the Nature element is not allowed, except when DocumentType has value TD16) Percentage and Amount not present despite Type being populated Allowed values {0}-{1} DatiBeniServizi is required IdentificativiFiscali is required Date is earlier than the corrected invoice date Nature present when VAT Rate is non-zero A zero VAT rate requires indication of the operation nature that justifies its non-taxability Total amount exceeds the limit for simplified invoices under Presidential Decree 633/72, art. 21bis and Ministerial Decree of May 10, 2019 Document type TD07 does not allow indication of the same subject as both supplier and buyer in the invoice VAT ID and Fiscal Code not populated (at least one must be populated) '{PropertyName}' accepted values: {AcceptedValues} Text containing invalid characters ({0}). Unaccepted values: {{NonLatinCode}} ================================================ FILE: Resources/ValidatorMessages.resx ================================================  text/microsoft-resx 1.3 System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 IdFiscaleIVA e CodiceFiscale non valorizzati (almeno uno dei due deve essere valorizzato) Numero non contiene caratteri numerici DatiRitenuta non presente a fronte di DatiCassaPrevidenziale.Ritenuta valorizzato Data antecedente a una o più date in DatiFattureCollegate Natura non presente a fronte di Aliquota IVA pari a 0 DatiRiepilogo non presente in corrispondenza di almeno un valore DettaglioLinee.AliquiotaIVA o DatiCassaPrevidenziale.AliquotaIVA Natura con valore di tipo 'N6' (inversione contabile) a fronte EsigiblitaIVA uguale a 'S' (scissione pagamenti) PrezzoTotale non calcolato secondo le specifiche tecniche Natura non presente a fronte di Aliquota IVA pari a 0 DatiRitenuta non presente a fronte di almeno un blocco DettaglioLinee con Ritenuta uguale a SI ImponibileImporto non calcolato secondo le specifiche tecniche Nel tipo documento ‘autofattura per splafonamento’ tutte le linee di dettaglio devo avere un’aliquota IVA diversa da zero Gli elementi IdPaese e IdPaese non possono essere entrambi valorizzati con codice diverso da IT Per il valore indicato nell'elemento 2.1.1.1 TipoDocumento deve essere presente l'elemento 1.4.1.1 IdFiscaleIVA del cessionario/committente Per il valore indicato nell'elemento 2.1.1.1 TipoDocumento il cedente/prestatore non può essere uguale al cessionario/committente I valori TD21 e TD27 del tipo documento non ammettono l’indicazione in fattura di un cedente diverso dal cessionario Per il valore indicato nell'elemento 2.1.1.1 TipoDocumento il valore presente nell'elemento 1.2.1.1.1 IdPaese non è ammesso Tutti i valori delle aliquote IVA presenti nelle linee di dettaglio di una fattura o nei dati di cassa previdenziale devono essere presenti anche nei dati di riepilogo Tutti i valori di natura dell’operazione presenti nelle linee di dettaglio di una fattura o nei dati di cassa previdenziale devono essere presenti anche nei dati di riepilogo Natura presente a fronte di Aliquota IVA diversa da zero (l’indicazione di un’aliquota IVA diversa da zero qualifica l’operazione come imponibile e quindi non è ammessa la presenza dell’elemento Natura, ad eccezione del caso in cui l’elemento TipoDocumento assume valore TD16) Natura presente a fronte di Aliquota IVA diversa da zero (l’indicazione di un’aliquota IVA diversa da zero qualifica l’operazione come imponibile e quindi non è ammessa la presenza dell’elemento Natura, ad eccezione del caso in cui l’elemento TipoDocumento assume valore TD16) Percentuale e Importo non presenti a fronte di Tipo valorizzato Valori consentiti {0}-{1} DatiBeniServizi è obbligatorio IdentificativiFiscali è obbligatorio Data antecedente a data fattura rettificata Natura presente a fronte di Aliquota IVA diversa da zero L’indicazione di un’aliquota IVA pari a zero obbliga all’indicazione della natura dell’operazione che giustifichi la non imponibilità della stessa Importo totale superiore al limite previsto per le fatture semplificate ai sensi del DPR 633/72, art. 21bis e DM del 10 maggio 2019 Il valore TD07 del tipo documento non ammette l’indicazione in fattura dello stesso soggetto sia come cedente che come cessionario IdFiscaleIVA e CodiceFiscale non valorizzati (almeno uno dei due deve essere valorizzato) '{PropertyName}' valori accettati: {AcceptedValues} Testo contenente caratteri non validi ({0}). valori non accettati: {{NonLatinCode}} ================================================ FILE: Semplificata/FatturaElettronicaBody/DatiBeniServizi/DatiBeniServizi.cs ================================================ using System.Xml; using BaseClassSerializable = FatturaElettronica.Core.BaseClassSerializable; namespace FatturaElettronica.Semplificata.FatturaElettronicaBody.DatiBeniServizi { /// /// Blocco sempre obbligatorio contenente natura, qualità e quantità dei beni / servizi formanti oggetto dell'operazione. /// public class DatiBeniServizi : BaseClassSerializable { /// /// Blocco sempre obbligatorio contenente natura, qualità e quantità dei beni / servizi formanti oggetto dell'operazione. /// public DatiBeniServizi() { DatiIVA = new(); } public DatiBeniServizi(XmlReader r) : base(r) { } /// IMPORTANT /// Each data property must be flagged with the Order attribute or it will be ignored. /// Also, properties must be listed with the precise order in the specification. /// /// Natura e quantità dell'oggetto della cessione/prestazione /// [Core.DataProperty] public string Descrizione { get; set; } /// /// Ammontare complessivo (comprensivo di imposta). /// [Core.DataProperty] public decimal Importo { get; set; } /// /// Dati relativi all'imposta sul valore aggiunto. /// [Core.DataProperty] public DatiIVA DatiIVA { get; set; } /// /// L'elemento serve per indicare il motivo (Natura dell'operazione) per il quale l'emittente della fattura non indica aliquota IVA. /// [Core.DataProperty] public string Natura { get; set; } /// /// Norma di riferimento. /// [Core.DataProperty] public string RiferimentoNormativo { get; set; } } } ================================================ FILE: Semplificata/FatturaElettronicaBody/DatiBeniServizi/DatiIVA.cs ================================================ using System.Xml; using BaseClassSerializable = FatturaElettronica.Core.BaseClassSerializable; namespace FatturaElettronica.Semplificata.FatturaElettronicaBody.DatiBeniServizi { /// /// Dati relativi all'imposta sul valore aggiunto. /// public class DatiIVA : BaseClassSerializable { /// /// Dati relativi all'imposta sul valore aggiunto. /// public DatiIVA() { } public DatiIVA(XmlReader r) : base(r) { } /// /// Ammontare dell'imposta. Si può indicare in alternativa all'elemento informativo 2,2,3,2 /// [Core.DataProperty] public decimal? Imposta { get; set; } /// /// Aliquota (%) IVA applicata. Si può indicare in alternativa all'elemento informativo 2,2,3,1 /// [Core.DataProperty] public decimal? Aliquota { get; set; } } } ================================================ FILE: Semplificata/FatturaElettronicaBody/DatiGenerali/DatiFatturaRettificata.cs ================================================ using System; using System.Xml; using BaseClassSerializable = FatturaElettronica.Core.BaseClassSerializable; namespace FatturaElettronica.Semplificata.FatturaElettronicaBody.DatiGenerali { /// /// Dati relativi alla fattura rettificata. /// public class DatiFatturaRettificata : BaseClassSerializable { /// /// Dati generali del documento principale ed i dati dei documenti correlati. /// public DatiFatturaRettificata() { } public DatiFatturaRettificata(XmlReader r) : base(r) { } /// IMPORTANT /// Each data property must be flagged with the Order attribute or it will be ignored. /// Also, properties must be listed with the precise order in the specification. /// /// Numero progressivo della fattura rettificata. /// [Core.DataProperty] public string NumeroFR { get; set; } /// /// Data della fattura rettificata. /// [Core.DataProperty] public DateTime? DataFR { get; set; } /// /// Indicazioni specifiche degli elelementi oggetto di rettifica. /// [Core.DataProperty] public string ElementiRettificati { get; set; } } } ================================================ FILE: Semplificata/FatturaElettronicaBody/DatiGenerali/DatiGenerali.cs ================================================ using System.Xml; using BaseClassSerializable = FatturaElettronica.Core.BaseClassSerializable; namespace FatturaElettronica.Semplificata.FatturaElettronicaBody.DatiGenerali { /// /// Dati generali del documento principale e dati dei documenti correlati. /// public class DatiGenerali : BaseClassSerializable { /// /// Dati generali del documento principale e dati dei documenti correlati. /// public DatiGenerali() { DatiGeneraliDocumento = new(); DatiFatturaRettificata = new(); } public DatiGenerali(XmlReader r) : base(r) { } /// IMPORTANT /// Each data property must be flagged with the Order attribute or it will be ignored. /// Also, properties must be listed with the precise order in the specification. /// /// Dati generali del documento principale. /// [Core.DataProperty] public DatiGeneraliDocumento DatiGeneraliDocumento { get; set; } /// /// Blocco contenente le informazioni relative alla fattura rettificata. /// Vale per le fatture emesse ai sensi dell'articolo 26 DPR 633/72 /// [Core.DataProperty] public DatiFatturaRettificata DatiFatturaRettificata { get; set; } } } ================================================ FILE: Semplificata/FatturaElettronicaBody/DatiGenerali/DatiGeneraliDocumento.cs ================================================ using System; using System.Xml; using BaseClassSerializable = FatturaElettronica.Core.BaseClassSerializable; namespace FatturaElettronica.Semplificata.FatturaElettronicaBody.DatiGenerali { /// /// Dati generali del documento principale ed i dati dei documenti correlati. /// public class DatiGeneraliDocumento : BaseClassSerializable { /// /// Dati generali del documento principale ed i dati dei documenti correlati. /// public DatiGeneraliDocumento() { } public DatiGeneraliDocumento(XmlReader r) : base(r) { } /// IMPORTANT /// Each data property must be flagged with the Order attribute or it will be ignored. /// Also, properties must be listed with the precise order in the specification. /// /// Dati generali del documento principale. /// [Core.DataProperty] public string TipoDocumento { get; set; } /// /// Codice espresso secondo lo standard ISO 4217 alpha-3:2001 della valuta utilizzata per l'indicazione degli importi. /// [Core.DataProperty] public string Divisa { get; set; } /// /// Data del documento. /// [Core.DataProperty] public DateTime Data { get; set; } /// /// Numero progressivo del documento. /// [Core.DataProperty] public string Numero { get; set; } /// /// Bollo assolto ai sendi del decreto MEF 17 giugno 2014 (art.6). /// [Core.DataProperty] public string BolloVirtuale { get; set; } } } ================================================ FILE: Semplificata/FatturaElettronicaBody/FatturaElettronicaBody.cs ================================================ using System.Collections.Generic; using System.Xml; using FatturaElettronica.Common; using BaseClassSerializable = FatturaElettronica.Core.BaseClassSerializable; namespace FatturaElettronica.Semplificata.FatturaElettronicaBody { public class FatturaElettronicaBody : BaseClassSerializable { /// /// FatturaOrdinaria inclusa nella conunicazione. /// public FatturaElettronicaBody() { DatiGenerali = new(); DatiBeniServizi = new(); Allegati = new(); } public FatturaElettronicaBody(XmlReader r) : base(r) { } /// /// Dati generali del documento principale. /// [Core.DataProperty] public DatiGenerali.DatiGenerali DatiGenerali { get; set; } /// /// Blocco semre obbligatorio contenente natura qualità e quantità dei beni/servizi oggetto dell'operazione. /// [Core.DataProperty] public List DatiBeniServizi { get; set; } /// /// Dati relativi ad eventuali allegati. /// [Core.DataProperty] public List Allegati { get; set; } } } ================================================ FILE: Semplificata/FatturaElettronicaHeader/CedentePrestatore/CedentePrestatore.cs ================================================ using System.Text.Json.Serialization; using System.Xml; using FatturaElettronica.Common; using BaseClassSerializable = FatturaElettronica.Core.BaseClassSerializable; namespace FatturaElettronica.Semplificata.FatturaElettronicaHeader.CedentePrestatore { /// /// Dati relativi al cedente / prestatore. /// public class CedentePrestatore : BaseClassSerializable { /// /// Dati relativi al cedente / prestatore. /// public CedentePrestatore() { IdFiscaleIVA = new(); Sede = new(); StabileOrganizzazione = new(); RappresentanteFiscale = new(); IscrizioneREA = new(); } public CedentePrestatore(XmlReader r) : base(r) { } /// IMPORTANT /// Each data property must be flagged with the Order attribute or it will be ignored. /// Also, properties must be listed with the precise order in the specification. /// /// Numero di identificazione fiscale ai fini IVA; i primi due caratteri rappresentano il paese ed i restanti il codice /// vero e proprio che, per i residenti in Italia, corrisponde al numero di partita IVA. /// [Core.DataProperty(order: 0)] public IdFiscaleIVA IdFiscaleIVA { get; set; } /// /// Numero di Codice Fiscale. /// [Core.DataProperty(order: 1)] public string CodiceFiscale { get; set; } /// /// Gets or sets the Denominazione. /// [Core.DataProperty(order: 2)] public string Denominazione { get; set; } /// /// Gets or sets the Nome. /// [Core.DataProperty(order: 3)] public string Nome { get; set; } /// /// Gets or sets the Cognome. /// [Core.DataProperty(order: 4)] public string Cognome { get; set; } /// /// Returns Cognome and Nome as a single value. /// /// This is not a OrderedDataProperty so it will not be serialized to XML. [JsonIgnore] public string CognomeNome { get { var r = ((Cognome ?? string.Empty) + " " + (Nome ?? string.Empty)).Trim(); return string.IsNullOrEmpty(r) ? null : r; } } /// /// Dati della sede del cedente / prestatore. /// [Core.DataProperty(order: 5)] public SedeCedentePrestatore Sede { get; set; } /// /// Nei casi di cedente / prestatore non residente. /// [Core.DataProperty(order: 6)] public StabileOrganizzazione StabileOrganizzazione { get; set; } /// /// Rappresentante fiscale /// [Core.DataProperty(order: 7)] public RappresentanteFiscale RappresentanteFiscale { get; set; } /// /// Nei casi di società iscritte nel registro delle imprese ai sensi dell'art. 2250 del codice civile. /// [Core.DataProperty(order: 8)] public IscrizioneREA IscrizioneREA { get; set; } /// /// Codice identificativo del cedente / prestatore a fini amministrativi-contabili. /// [Core.DataProperty(order: 9)] public string RiferimentoAmministrazione { get; set; } /// /// Regime fiscale. /// [Core.DataProperty(order: 10)] public string RegimeFiscale { get; set; } } } ================================================ FILE: Semplificata/FatturaElettronicaHeader/CedentePrestatore/IscrizioneRea.cs ================================================ using System.Xml; using BaseClassSerializable = FatturaElettronica.Core.BaseClassSerializable; namespace FatturaElettronica.Semplificata.FatturaElettronicaHeader.CedentePrestatore { /// /// Represents a DatiAnagrafici object /// public class IscrizioneREA : BaseClassSerializable { public IscrizioneREA() { } public IscrizioneREA(XmlReader r) : base(r) { } /// /// Sigla della provincia dell'Ufficio del registro delle imprese presso il quale è registata la società. /// [Core.DataProperty] public string Ufficio { get; set; } /// /// Numero di iscrizione al registro delle imprese. /// [Core.DataProperty] // ReSharper disable once InconsistentNaming public string NumeroREA { get; set; } /// /// Nei soli casi di società di capitali (Spa, SApA, SRL), il campo va valorizzato per indicare il capitale sociale. /// [Core.DataProperty] public decimal? CapitaleSociale { get; set; } /// /// Nei soli casi di SRL, il campo va valorizzato per indicare se vi è un socio unico oppure se vi sono più soci. /// [Core.DataProperty] public string SocioUnico { get; set; } /// /// Indica se la Società si trova in stato di liquidazione oppure no. /// [Core.DataProperty] public string StatoLiquidazione { get; set; } } } ================================================ FILE: Semplificata/FatturaElettronicaHeader/CedentePrestatore/RappresentanteFiscale.cs ================================================ using System.Text.Json.Serialization; using System.Xml; using FatturaElettronica.Common; using BaseClassSerializable = FatturaElettronica.Core.BaseClassSerializable; namespace FatturaElettronica.Semplificata.FatturaElettronicaHeader { /// /// Dati relativi al rappresentante fiscale del cessionario / committente. /// public class RappresentanteFiscale : BaseClassSerializable { /// /// Dati relativi al rappresentante fiscale del cessionario / committente. /// public RappresentanteFiscale() { IdFiscaleIVA = new(); } public RappresentanteFiscale(XmlReader r) : base(r) { } /// IMPORTANT /// Each data property must be flagged with the Order attribute or it will be ignored. /// Also, properties must be listed with the precise order in the specification. /// /// Dati anagrafici del rappresentante fiscale del cedente / prestatore. /// [Core.DataProperty(order: 0)] public IdFiscaleIVA IdFiscaleIVA { get; set; } /// /// Gets or sets the Denominazione. /// [Core.DataProperty(order: 1)] public string Denominazione { get; set; } /// /// Gets or sets the Nome. /// [Core.DataProperty(order: 2)] public string Nome { get; set; } /// /// Gets or sets the Cognome. /// [Core.DataProperty(order: 3)] public string Cognome { get; set; } /// /// Returns Cognome and Nome as a single value. /// /// This is not a OrderedDataProperty so it will not be serialized to XML. [JsonIgnore] public string CognomeNome { get { var r = ((Cognome ?? string.Empty) + " " + (Nome ?? string.Empty)).Trim(); return string.IsNullOrEmpty(r) ? null : r; } } } } ================================================ FILE: Semplificata/FatturaElettronicaHeader/CedentePrestatore/SedeCedentePrestatore.cs ================================================ using System.Xml; namespace FatturaElettronica.Semplificata.FatturaElettronicaHeader.CedentePrestatore { public class SedeCedentePrestatore : Common.Località { public SedeCedentePrestatore() { } public SedeCedentePrestatore(XmlReader r) : base(r) { } } } ================================================ FILE: Semplificata/FatturaElettronicaHeader/CessionarioCommittente/AltriDatiIdentificativi.cs ================================================ using System.Text.Json.Serialization; using System.Xml; using FatturaElettronica.Common; using BaseClassSerializable = FatturaElettronica.Core.BaseClassSerializable; namespace FatturaElettronica.Semplificata.FatturaElettronicaHeader.CessionarioCommittente { /// /// Altri dati identificativi del cessionario / committente. /// public class AltriDatiIdentificativi : BaseClassSerializable { /// /// Altri dati fiscali del cessionario / committente. /// public AltriDatiIdentificativi() { Sede = new(); StabileOrganizzazione = new(); RappresentanteFiscale = new(); } public AltriDatiIdentificativi(XmlReader r) : base(r) { } /// /// Numero di identificazione fiscale ai fini IVA; i primi due caratteri rappresentano il paese ed i restanti il codice /// vero e proprio che, per i residenti in Italia, corrisponde al numero di partita IVA. /// /// /// Gets or sets the Denominazione. /// [Core.DataProperty(order: 0)] public string Denominazione { get; set; } /// /// Gets or sets the Nome. /// [Core.DataProperty(order: 1)] public string Nome { get; set; } /// /// Gets or sets the Cognome. /// [Core.DataProperty(order: 2)] public string Cognome { get; set; } /// /// Dati della sede del cessionario / committente. /// [Core.DataProperty] public SedeCessionarioCommittente Sede { get; set; } /// /// Blocco da valorizzare nei casi di cessionario/committente non residente e con stabile organizzazione in Italia. /// [Core.DataProperty] public StabileOrganizzazione StabileOrganizzazione { get; set; } /// /// Blocco da valorizzare nei casi in cui il cessionario/committente si avvalga di un rappresentante fiscale in Italia. /// [Core.DataProperty] public RappresentanteFiscaleCessionarioCommittente RappresentanteFiscale { get; set; } /// /// Returns Cognome and Nome as a single value. /// /// This is not a OrderedDataProperty so it will not be serialized to XML. [JsonIgnore] public string CognomeNome { get { var r = ((Cognome ?? string.Empty) + " " + (Nome ?? string.Empty)).Trim(); return string.IsNullOrEmpty(r) ? null : r; } } } } ================================================ FILE: Semplificata/FatturaElettronicaHeader/CessionarioCommittente/CessionarioCommittente.cs ================================================ using System.Xml; using BaseClassSerializable = FatturaElettronica.Core.BaseClassSerializable; namespace FatturaElettronica.Semplificata.FatturaElettronicaHeader.CessionarioCommittente { /// /// Dati relativi al cessionario/ committente. /// public class CessionarioCommittente : BaseClassSerializable { /// /// Dati relativi al cessionario / committente. /// public CessionarioCommittente() { IdentificativiFiscali = new(); AltriDatiIdentificativi = new(); } public CessionarioCommittente(XmlReader r) : base(r) { } /// IMPORTANT /// Each data property must be flagged with the Order attribute or it will be ignored. /// Also, properties must be listed with the precise order in the specification. /// /// Dati fiscali del cessionario / committente. /// [Core.DataProperty] public IdentificativiFiscali IdentificativiFiscali { get; set; } /// /// Altri dati fiscali del cessionario / committente. /// [Core.DataProperty] public AltriDatiIdentificativi AltriDatiIdentificativi { get; set; } } } ================================================ FILE: Semplificata/FatturaElettronicaHeader/CessionarioCommittente/IdentificativiFiscali.cs ================================================ using System.Xml; using FatturaElettronica.Common; using BaseClassSerializable = FatturaElettronica.Core.BaseClassSerializable; namespace FatturaElettronica.Semplificata.FatturaElettronicaHeader.CessionarioCommittente { /// /// Identificativi fiscali del cessionario/commitente /// public class IdentificativiFiscali : BaseClassSerializable { /// /// Dati fiscali del cessionario / committente. /// public IdentificativiFiscali() { IdFiscaleIVA = new(); } public IdentificativiFiscali(XmlReader r) : base(r) { } /// /// Numero di identificazione fiscale ai fini IVA; i primi due caratteri rappresentano il paese ed i restanti il codice /// vero e proprio che, per i residenti in Italia, corrisponde al numero di partita IVA. /// [Core.DataProperty(order: 0)] public IdFiscaleIVA IdFiscaleIVA { get; set; } /// /// Numero di Codice Fiscale. /// [Core.DataProperty(order: 1)] public string CodiceFiscale { get; set; } } } ================================================ FILE: Semplificata/FatturaElettronicaHeader/CessionarioCommittente/RappresentanteFiscaleCessionarioCommittente.cs ================================================ using System.Xml; using FatturaElettronica.Common; namespace FatturaElettronica.Semplificata.FatturaElettronicaHeader.CessionarioCommittente { /// /// Represents a CessionarioCommittente.RappresentanteFiscale object. /// public class RappresentanteFiscaleCessionarioCommittente : DenominazioneNomeCognome { public RappresentanteFiscaleCessionarioCommittente() { IdFiscaleIVA = new(); } public RappresentanteFiscaleCessionarioCommittente(XmlReader r) : base(r) { } /// /// Numero di identificazione fiscale ai fini IVA; i primi due caratteri rappresentano il paese ed i restanti il codice /// vero e proprio che, per i residenti in Italia, corrisponde al numero di partita IVA. /// [Core.DataProperty(order: -1)] public IdFiscaleIVA IdFiscaleIVA { get; set; } } } ================================================ FILE: Semplificata/FatturaElettronicaHeader/CessionarioCommittente/SedeCessionarioCommittente.cs ================================================ using System.Xml; namespace FatturaElettronica.Semplificata.FatturaElettronicaHeader.CessionarioCommittente { public class SedeCessionarioCommittente : Common.Località { public SedeCessionarioCommittente() { } public SedeCessionarioCommittente(XmlReader r) : base(r) { } } } ================================================ FILE: Semplificata/FatturaElettronicaHeader/DatiTrasmissione/DatiTrasmissione.cs ================================================ using System.Xml; using BaseClassSerializable = FatturaElettronica.Core.BaseClassSerializable; namespace FatturaElettronica.Semplificata.FatturaElettronicaHeader.DatiTrasmissione { /// /// Informazioni che identificano univocamente il soggetto che trasmette, il documento trasmesso, /// il formato in cui è stato trasmesso il documento, il soggetto destinatario. /// public class DatiTrasmissione : BaseClassSerializable { /// /// Constructor. /// public DatiTrasmissione() { IdTrasmittente = new(); } public DatiTrasmissione(XmlReader r) : base(r) { } /// IMPORTANT /// Each data property must be flagged with the Order attribute or it will be ignored. /// Also, properties must be listed with the precise order in the specification. /// /// Identificativo univoco del soggetto trasmittente. /// [Core.DataProperty] public IdTrasmittente IdTrasmittente { get; set; } /// /// Progressivo univoco, attribuito dal soggetto che trasmette, relativo ad ogni singolo documento fattura. /// [Core.DataProperty] public string ProgressivoInvio { get; set; } /// /// Codice identificativo del formato/versione con cui è stato trasmesso il documento fattura. /// [Core.DataProperty] public string FormatoTrasmissione { get; set; } /// /// Codice dell'ufficio dell'amministrazione dello stato destinatario della fattura, definito dall'amministrazione /// di appartenenza come riportato nella rubrica "Indice PA". /// [Core.DataProperty] public string CodiceDestinatario { get; set; } /// /// Inidirizzo PEC al quale inviare il documento. /// [Core.DataProperty] public string PECDestinatario { get; set; } } } ================================================ FILE: Semplificata/FatturaElettronicaHeader/DatiTrasmissione/IdTrasmittente.cs ================================================ using System.Xml; using FatturaElettronica.Common; namespace FatturaElettronica.Semplificata.FatturaElettronicaHeader.DatiTrasmissione { public class IdTrasmittente : IdFiscaleIVA { public IdTrasmittente() { } public IdTrasmittente(XmlReader r) : base(r) { } } } ================================================ FILE: Semplificata/FatturaElettronicaHeader/FatturaElettronicaHeader.cs ================================================ using System.Xml; using BaseClassSerializable = FatturaElettronica.Core.BaseClassSerializable; namespace FatturaElettronica.Semplificata.FatturaElettronicaHeader { public class FatturaElettronicaHeader : BaseClassSerializable { /// /// Intestazione della FatturaOrdinaria Elettronica. /// public FatturaElettronicaHeader() { DatiTrasmissione = new(); CedentePrestatore = new(); CessionarioCommittente = new(); } public FatturaElettronicaHeader(XmlReader r) : base(r) { } /// IMPORTANT /// Each data property must be flagged with the Order attribute or it will be ignored. /// Also, properties must be listed with the precise order in the specification. /// /// Informazioni che identificano univocamente il soggetto che trasmette, il documento trasmesso, /// il formato in cui è stato trasmesso il documento, il soggetto destinatario. /// [Core.DataProperty] public DatiTrasmissione.DatiTrasmissione DatiTrasmissione { get; set; } /// /// Dati relativi al cedente / prestatore. /// [Core.DataProperty] public CedentePrestatore.CedentePrestatore CedentePrestatore { get; set; } /// /// Dati relativi al cessionario / committente /// [Core.DataProperty] public CessionarioCommittente.CessionarioCommittente CessionarioCommittente { get; set; } /// /// Nei casi di documenti emessi da un soggetto diverso dal cedente / prestatore, indica se la fattura sia stata /// emessa o da parte del cessionario / committente oppure da parte di un terzo per conto del cedente / prestatore. /// [Core.DataProperty] public string SoggettoEmittente { get; set; } } } ================================================ FILE: Semplificata/FatturaSemplificata.cs ================================================ using System.Collections.Generic; using FatturaElettronica.Defaults; namespace FatturaElettronica.Semplificata { public class FatturaSemplificata : FatturaBase { public FatturaSemplificata() { FatturaElettronicaHeader = new(); FatturaElettronicaBody = new(); } public static FatturaSemplificata CreateInstance(Instance formato) { var fatturaSemplificata = new FatturaSemplificata(); switch (formato) { case Instance.Semplificata: fatturaSemplificata.FatturaElettronicaHeader.DatiTrasmissione.FormatoTrasmissione = FormatoTrasmissione.Semplificata; fatturaSemplificata.FatturaElettronicaHeader.DatiTrasmissione.CodiceDestinatario = new('0', 7); break; } return fatturaSemplificata; } public override string GetFormatoTrasmissione() { return FatturaElettronicaHeader.DatiTrasmissione.FormatoTrasmissione; } protected override string GetLocalName() { return "FatturaElettronicaSemplificata"; } protected override string GetNameSpace() { return "http://ivaservizi.agenziaentrate.gov.it/docs/xsd/fatture/v1.0"; } /// IMPORTANT /// Each data property must be flagged with the Order attribute or it will be ignored. /// Also, properties must be listed with the precise order in the specification. /// /// Intestazione della comunicazione. /// [Core.DataProperty] public FatturaElettronicaHeader.FatturaElettronicaHeader FatturaElettronicaHeader { get; set; } /// /// Lotto di fatture incluse nella comunicazione. /// /// Il blocco ha molteciplità 1 nel caso di fattura singola; nel caso di lotto di fatture, si ripete /// per ogni fattura componente il lotto stesso. [Core.DataProperty] public List FatturaElettronicaBody { get; set; } } } ================================================ FILE: Tabelle/CausalePagamento.cs ================================================ using System.Resources; namespace FatturaElettronica.Tabelle { public class CausalePagamento : Tabella { protected override ResourceManager ResourceManager => Resources.CausalePagamento.ResourceManager; } } ================================================ FILE: Tabelle/CondizioniPagamento.cs ================================================ using System.Resources; namespace FatturaElettronica.Tabelle { public class CondizioniPagamento : Tabella { protected override ResourceManager ResourceManager => Resources.CondizioniPagamento.ResourceManager; } } ================================================ FILE: Tabelle/Divisa.cs ================================================ using System.Resources; namespace FatturaElettronica.Tabelle { public class Divisa : Tabella { protected override ResourceManager ResourceManager => Resources.Divisa.ResourceManager; } } ================================================ FILE: Tabelle/EsigibilitaIVA.cs ================================================ using System.Resources; namespace FatturaElettronica.Tabelle { public class EsigibilitaIVA : Tabella { protected override ResourceManager ResourceManager => Resources.EsigibilitaIVA.ResourceManager; } } ================================================ FILE: Tabelle/FormatoTrasmissione.cs ================================================ namespace FatturaElettronica.Tabelle { public class FormatoTrasmissione : Tabella { public override Tabella[] List { get { return new Tabella[] { new FormatoTrasmissione{ Codice = Defaults.FormatoTrasmissione.PubblicaAmministrazione, Nome = Resources.FormatoTrasmissione.PubblicaAmministrazione }, new FormatoTrasmissione{ Codice = Defaults.FormatoTrasmissione.Privati, Nome = Resources.FormatoTrasmissione.Privati }, new FormatoTrasmissione{ Codice = Defaults.FormatoTrasmissione.Semplificata, Nome = Resources.FormatoTrasmissione.Semplificata } }; } } } } ================================================ FILE: Tabelle/IdPaese.cs ================================================ using System.Resources; namespace FatturaElettronica.Tabelle { public class IdPaese : Tabella { protected override ResourceManager ResourceManager => Resources.IdPaese.ResourceManager; } } ================================================ FILE: Tabelle/ModalitaPagamento.cs ================================================ using System.Resources; namespace FatturaElettronica.Tabelle { public class ModalitaPagamento : Tabella { protected override ResourceManager ResourceManager => Resources.ModalitaPagamento.ResourceManager; } } ================================================ FILE: Tabelle/Natura.cs ================================================ using System.Resources; namespace FatturaElettronica.Tabelle { public class Natura : Tabella { protected override ResourceManager ResourceManager => Resources.Natura.ResourceManager; } } ================================================ FILE: Tabelle/NaturaSemplificata.cs ================================================ using System.Resources; namespace FatturaElettronica.Tabelle { public class NaturaSemplificata : Tabella { protected override ResourceManager ResourceManager => Resources.NaturaSemplificata.ResourceManager; } } ================================================ FILE: Tabelle/Provincia.cs ================================================ using System.Resources; namespace FatturaElettronica.Tabelle { /// /// Attualmente non usata in convalida, vedo: /// https://github.com/FatturaElettronica/FatturaElettronica.NET/issues/129 /// /// public class Provincia : Tabella { protected override ResourceManager ResourceManager => Resources.Provincia.ResourceManager; } } ================================================ FILE: Tabelle/RegimeFiscale.cs ================================================ using System.Resources; namespace FatturaElettronica.Tabelle { public class RegimeFiscale : Tabella { protected override ResourceManager ResourceManager => Resources.RegimeFiscale.ResourceManager; } } ================================================ FILE: Tabelle/ScontoMaggiorazione.cs ================================================ using System.Resources; namespace FatturaElettronica.Tabelle { public class ScontoMaggiorazione : Tabella { protected override ResourceManager ResourceManager => Resources.ScontoMaggiorazione.ResourceManager; } } ================================================ FILE: Tabelle/SocioUnico.cs ================================================ using System.Resources; namespace FatturaElettronica.Tabelle { public class SocioUnico : Tabella { protected override ResourceManager ResourceManager => Resources.SocioUnico.ResourceManager; } } ================================================ FILE: Tabelle/SoggettoEmittente.cs ================================================ using System.Resources; namespace FatturaElettronica.Tabelle { public class SoggettoEmittente : Tabella { protected override ResourceManager ResourceManager => Resources.SoggettoEmittente.ResourceManager; } } ================================================ FILE: Tabelle/StatoLiquidazione.cs ================================================ using System.Resources; namespace FatturaElettronica.Tabelle { public class StatoLiquidazione : Tabella { protected override ResourceManager ResourceManager => Resources.StatoLiquidazione.ResourceManager; } } ================================================ FILE: Tabelle/Tabella.cs ================================================ using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.Globalization; using System.Linq; using System.Resources; namespace FatturaElettronica.Tabelle { public abstract class Tabella { private static readonly ConcurrentDictionary> CodiciCache = new(); public string Nome { get; set; } public string Codice { get; protected internal set; } public string Descrizione { get { return Codice + " " + Nome; } } public HashSet Codici { get { return CodiciCache.GetOrAdd(GetType().Name, n => new(List.Select(l => l.Codice).Distinct())); } } public abstract Tabella[] List { get; } } public abstract class Tabella : Tabella where T : Tabella, new() { private readonly Lazy _lazyList; protected Tabella() { _lazyList = new Lazy(LoadResources); } protected abstract ResourceManager ResourceManager { get; } private T[] LoadResources() { var resourceSet = ResourceManager.GetResourceSet(CultureInfo.CurrentUICulture, true, true); var enumerator = resourceSet.GetEnumerator(); using var enumerator1 = enumerator as IDisposable; var count = 0; while (enumerator.MoveNext()) { count++; } var resourcesArray = new T[count]; enumerator.Reset(); var index = 0; while (enumerator.MoveNext()) { if (enumerator.Key is null) { continue; } resourcesArray[index] = new T { Codice = enumerator.Key.ToString(), Nome = enumerator.Value.ToString() }; index++; } return resourcesArray; } public override Tabella[] List => _lazyList.Value; } } ================================================ FILE: Tabelle/TipoCassa.cs ================================================ using System.Resources; namespace FatturaElettronica.Tabelle { public class TipoCassa : Tabella { protected override ResourceManager ResourceManager => Resources.TipoCassa.ResourceManager; } } ================================================ FILE: Tabelle/TipoCessionePrestazione.cs ================================================ using System.Resources; namespace FatturaElettronica.Tabelle { public class TipoCessionePrestazione : Tabella { protected override ResourceManager ResourceManager => Resources.TipoCessionePrestazione.ResourceManager; } } ================================================ FILE: Tabelle/TipoDocumento.cs ================================================ using System.Resources; namespace FatturaElettronica.Tabelle { public class TipoDocumento : Tabella { protected override ResourceManager ResourceManager => Resources.TipoDocumento.ResourceManager; } } ================================================ FILE: Tabelle/TipoDocumentoSemplificata.cs ================================================ using System.Resources; namespace FatturaElettronica.Tabelle { public class TipoDocumentoSemplificata : Tabella { protected override ResourceManager ResourceManager => Resources.TipoDocumentoSemplificata.ResourceManager; } } ================================================ FILE: Tabelle/TipoResa.cs ================================================ using System.Resources; namespace FatturaElettronica.Tabelle { public class TipoResa : Tabella { protected override ResourceManager ResourceManager => Resources.TipoResa.ResourceManager; } } ================================================ FILE: Tabelle/TipoRitenuta.cs ================================================ using System.Resources; namespace FatturaElettronica.Tabelle { public class TipoRitenuta : Tabella { protected override ResourceManager ResourceManager => Resources.TipoRitenuta.ResourceManager; } } ================================================ FILE: Test/BaseClass.cs ================================================ using System; using System.Collections.Generic; using System.Linq; using System.Linq.Expressions; using System.Reflection; using FatturaElettronica.Core; using FatturaElettronica.Extensions; using FatturaElettronica.Tabelle; using FluentValidation; using FluentValidation.Results; using FluentValidation.TestHelper; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace FatturaElettronica.Test { [TestClass] public abstract class BaseClass where TClass : BaseClassSerializable where TValidator : IValidator { protected TValidator Validator; protected TClass Challenge; [TestInitialize] public void Init() { Validator = Activator.CreateInstance(); Challenge = Activator.CreateInstance(); } [TestMethod] public void ValidateExtensionMethodIsAvailable() { var r1 = Challenge.Validate(); Assert.IsInstanceOfType(r1, typeof(ValidationResult)); var r2 = Validator.Validate(Challenge); // ValidationResult equality operatore has not been implemented. for (var i = 0; i <= r1.Errors.Count - 1; i++) { Assert.AreEqual(r1.Errors[i].PropertyName, r2.Errors[i].PropertyName); Assert.AreEqual(r1.Errors[i].ErrorMessage, r2.Errors[i].ErrorMessage); } } protected void AssertOptional(Expression> outExpr, bool emptyStringAllowed = true) { var prop = GetProperty(outExpr); prop.SetValue(Challenge, null); var result = Validator.TestValidate(Challenge); result.ShouldNotHaveValidationErrorFor(outExpr); if (!emptyStringAllowed || typeof(T) != typeof(string)) return; prop.SetValue(Challenge, string.Empty); result = Validator.TestValidate(Challenge); result.ShouldNotHaveValidationErrorFor(outExpr); } protected void AssertRequired(Expression> outExpr, string expectedErrorCode = null) { var prop = GetProperty(outExpr); if (expectedErrorCode == null) { if (typeof(T) == typeof(DateTime?) || typeof(T) == typeof(decimal?)) expectedErrorCode = "NotNullValidator"; else expectedErrorCode = "NotEmptyValidator"; } prop.SetValue(Challenge, null); var result = Validator.TestValidate(Challenge); result.ShouldHaveValidationErrorFor(outExpr).WithErrorCode(expectedErrorCode); if (typeof(T) == typeof(string)) { prop.SetValue(Challenge, string.Empty); result = Validator.TestValidate(Challenge); result.ShouldHaveValidationErrorFor(outExpr).WithErrorCode(expectedErrorCode); } if (typeof(T) != typeof(decimal)) return; prop.SetValue(Challenge, 0m); result = Validator.TestValidate(Challenge); result.ShouldHaveValidationErrorFor(outExpr).WithErrorCode(expectedErrorCode); } protected void AssertMinMaxLength(Expression> outExpr, int min, int max, char filler = 'x', string expectedErrorCode = "LengthValidator") { var prop = GetProperty(outExpr); prop.SetValue(Challenge, new string(filler, max + 1)); var result = Validator.TestValidate(Challenge); result.ShouldHaveValidationErrorFor(outExpr).WithErrorCode(expectedErrorCode); prop.SetValue(Challenge, new string(filler, min)); result = Validator.TestValidate(Challenge); result.ShouldNotHaveValidationErrorFor(outExpr); prop.SetValue(Challenge, new string(filler, max)); result = Validator.TestValidate(Challenge); result.ShouldNotHaveValidationErrorFor(outExpr); } protected void AssertDigitsOrUppercase(Expression> outExpr, int length = 16) { var prop = GetProperty(outExpr); prop.SetValue(Challenge, new string('x', 16)); var result = Validator.TestValidate(Challenge); result.ShouldHaveValidationErrorFor(outExpr).WithErrorCode("RegularExpressionValidator"); prop.SetValue(Challenge, new string('X', 16)); result = Validator.TestValidate(Challenge); result.ShouldNotHaveValidationErrorFor(outExpr); } protected void AssertLength(Expression> outExpr, int length, char filler = 'x', string expectedErrorCode = "ExactLengthValidator") { var prop = GetProperty(outExpr); prop.SetValue(Challenge, new string(filler, length + 1)); var result = Validator.TestValidate(Challenge); result.ShouldHaveValidationErrorFor(outExpr).WithErrorCode(expectedErrorCode); prop.SetValue(Challenge, new string(filler, length - 1)); result = Validator.TestValidate(Challenge); result.ShouldHaveValidationErrorFor(outExpr).WithErrorCode(expectedErrorCode); prop.SetValue(Challenge, new string(filler, length)); result = Validator.TestValidate(Challenge); result.ShouldNotHaveValidationErrorFor(outExpr); } protected void AssertOnlyAcceptsTableValues(Expression> outExpr, string expectedErrorCode = "IsValidValidator") where T : Tabella, new() { var prop = GetProperty(outExpr); prop.SetValue(Challenge, "hello"); var result = Validator.TestValidate(Challenge); result.ShouldHaveValidationErrorFor(outExpr).WithErrorCode(expectedErrorCode); foreach (var codice in new T().Codici) { prop.SetValue(Challenge, codice); result = Validator.TestValidate(Challenge); result.ShouldNotHaveValidationErrorFor(outExpr); } } protected void AssertCollectionCanBeEmpty(Expression>> outExpr) { var prop = GetProperty(outExpr); var r = Validator.Validate(Challenge); Assert.IsNull(r.Errors.FirstOrDefault(x => x.PropertyName == prop.Name)); } protected void AssertCollectionCannotBeEmpty(Expression>> outExpr) { var prop = GetProperty(outExpr); var r = Validator.Validate(Challenge); Assert.AreEqual("NotEmptyValidator", r.Errors.FirstOrDefault(x => x.PropertyName == prop.Name)?.ErrorCode); } protected void AssertOnlyAcceptsSIValue(Expression> outExpr) { var prop = GetProperty(outExpr); prop.SetValue(Challenge, "NO"); var result = Validator.TestValidate(Challenge); result.ShouldHaveValidationErrorFor(outExpr); prop.SetValue(Challenge, "SI"); result = Validator.TestValidate(Challenge); result.ShouldNotHaveValidationErrorFor(outExpr); } protected void AssertMustBeBasicLatin(Expression> outExpr) { var prop = GetProperty(outExpr); // Important: test string not longer than 10. Must include a number. prop.SetValue(Challenge, "test ~tes1"); var result = Validator.TestValidate(Challenge); result.ShouldNotHaveValidationErrorFor(outExpr); prop.SetValue(Challenge, "test Àtes1"); result = Validator.TestValidate(Challenge); result.ShouldHaveValidationErrorFor(outExpr); } protected void AssertMustBeLatin1Supplement(Expression> outExpr) { var prop = GetProperty(outExpr); prop.SetValue(Challenge, "test ~tes1"); var result = Validator.TestValidate(Challenge); result.ShouldNotHaveValidationErrorFor(outExpr); prop.SetValue(Challenge, "test Àtes1"); result = Validator.TestValidate(Challenge); result.ShouldNotHaveValidationErrorFor(outExpr); prop.SetValue(Challenge, "test ›tes1"); result = Validator.TestValidate(Challenge); result.ShouldHaveValidationErrorFor(outExpr); } protected void AssertProvinciaOnlyAcceptsValidValues(Expression> outExpr) { var prop = GetProperty(outExpr); prop.SetValue(Challenge, "mi"); var result = Validator.TestValidate(Challenge); result.ShouldHaveValidationErrorFor(outExpr); prop.SetValue(Challenge, "M"); result = Validator.TestValidate(Challenge); result.ShouldHaveValidationErrorFor(outExpr); prop.SetValue(Challenge, "MIL"); result = Validator.TestValidate(Challenge); result.ShouldHaveValidationErrorFor(outExpr); prop.SetValue(Challenge, "MI"); result = Validator.TestValidate(Challenge); result.ShouldNotHaveValidationErrorFor(outExpr); } private static PropertyInfo GetProperty(Expression> outExpr) { var expr = (MemberExpression)outExpr.Body; return (PropertyInfo)expr.Member; } protected void AssertDecimalType(Expression> outExpr, int scale, int precision) { var maxValue = (decimal)Math.Pow(10, precision - scale) - 1; var prop = GetProperty(outExpr); prop.SetValue(Challenge, maxValue + 1); var result = Validator.TestValidate(Challenge); result.ShouldHaveValidationErrorFor(outExpr); prop.SetValue(Challenge, maxValue); result = Validator.TestValidate(Challenge); result.ShouldNotHaveValidationErrorFor(outExpr); var decimalValueValid = (decimal)Math.Pow(10, -scale); prop.SetValue(Challenge, decimalValueValid); result = Validator.TestValidate(Challenge); result.ShouldNotHaveValidationErrorFor(outExpr); var decimalValueInvalid = (decimal)Math.Pow(10, -scale - 1); prop.SetValue(Challenge, decimalValueInvalid); result = Validator.TestValidate(Challenge); result.ShouldHaveValidationErrorFor(outExpr); } protected void AssertDecimalType(Expression> outExpr, int scale, int precision) { var maxValue = (decimal)Math.Pow(10, precision - scale) - 1; var prop = GetProperty(outExpr); prop.SetValue(Challenge, maxValue + 1); var result = Validator.TestValidate(Challenge); result.ShouldHaveValidationErrorFor(outExpr); prop.SetValue(Challenge, maxValue); result = Validator.TestValidate(Challenge); result.ShouldNotHaveValidationErrorFor(outExpr); var decimalValueValid = (decimal)Math.Pow(10, -scale); prop.SetValue(Challenge, decimalValueValid); result = Validator.TestValidate(Challenge); result.ShouldNotHaveValidationErrorFor(outExpr); var decimalValueInvalid = (decimal)Math.Pow(10, -scale - 1); prop.SetValue(Challenge, decimalValueInvalid); result = Validator.TestValidate(Challenge); result.ShouldHaveValidationErrorFor(outExpr); } } } ================================================ FILE: Test/Common/AnagraficaValidator.cs ================================================ using FatturaElettronica.Common; using FatturaElettronica.Test.Ordinaria; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace FatturaElettronica.Test.Common { [TestClass] public class AnagraficaValidator : DenominazioneNomeCognomeValidator { [TestMethod] public void TitoloIsOptional() { AssertOptional(x => x.Titolo); } [TestMethod] public void TitoloMinMaxLength() { AssertMinMaxLength(x => x.Titolo, 2, 10); } [TestMethod] public void TitoloMustBeBasicLatin() { AssertMustBeBasicLatin(x => x.Titolo); } [TestMethod] public void CodEORIsOptional() { AssertOptional(x => x.CodEORI); } [TestMethod] public void CodEORIMinMaxLength() { AssertMinMaxLength(x => x.CodEORI, 13, 17); } [TestMethod] public void DenominazioneMustBeLatin1Supplement() { AssertMustBeLatin1Supplement(x => x.Denominazione); } } } ================================================ FILE: Test/Common/IdFiscaleIva.cs ================================================ using FatturaElettronica.Common; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace FatturaElettronica.Test.Common { [TestClass] public class IdFiscaleIva { [TestMethod] public void ToStringOverride() { var idFiscale = new IdFiscaleIVA {IdCodice = "123", IdPaese = "IT"}; Assert.AreEqual("IT123", idFiscale.ToString()); idFiscale = new() {IdPaese = "IT"}; Assert.AreEqual("IT", idFiscale.ToString()); idFiscale = new() {IdCodice = "123"}; Assert.AreEqual("123", idFiscale.ToString()); idFiscale = new(); Assert.AreEqual(string.Empty, idFiscale.ToString()); } } } ================================================ FILE: Test/Common/IdFiscaleValidator.cs ================================================ using FatturaElettronica.Common; using FatturaElettronica.Tabelle; using FatturaElettronica.Validators; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace FatturaElettronica.Test.Common { [TestClass] public class IdFiscaleValidator : BaseClass { [TestMethod] public void IdPaeseIsRequired() { AssertRequired(x => x.IdPaese); } [TestMethod] public void IdPaeseOnlyAcceptsTableValues() { AssertOnlyAcceptsTableValues(x => x.IdPaese); } [TestMethod] public void IdCodiceIsRequired() { AssertRequired(x => x.IdCodice); } [TestMethod] public void IdCodiceMinMaxLength() { AssertMinMaxLength(x => x.IdCodice, 1, 28); } [TestMethod] public void IdFiscaleToString() { var idFiscale = new IdFiscaleIVA {IdCodice = "123", IdPaese = "IT"}; Assert.AreEqual("IT123", idFiscale.ToString()); idFiscale = new() {IdPaese = "IT"}; Assert.AreEqual("IT", idFiscale.ToString()); idFiscale = new() {IdCodice = "123"}; Assert.AreEqual("123", idFiscale.ToString()); idFiscale = new(); Assert.AreEqual(string.Empty, idFiscale.ToString()); } } } ================================================ FILE: Test/Common/IdTrasmittenteValidator.cs ================================================ using FatturaElettronica.Validators; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace FatturaElettronica.Test.Common { [TestClass] public class IdTrasmittenteValidator { [TestMethod] public void IdTrasmittenteValidatorIsOfTypeIdFiscaleIVAValidator() { var challenge = new FatturaElettronica.Validators.IdTrasmittenteValidator(); Assert.IsInstanceOfType(challenge, typeof(IdFiscaleIVAValidator)); } } } ================================================ FILE: Test/Common/ScontoMaggiorazioneValidator.cs ================================================ using FatturaElettronica.Common; using FluentValidation.TestHelper; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace FatturaElettronica.Test.Common { [TestClass] public class ScontoMaggiorazioneValidator : BaseClass { [TestMethod] public void TipoIsRequired() { AssertRequired(x => x.Tipo); } [TestMethod] public void TipoOnlyAcceptsTableValues() { // Necessario per non incappare nell'errore 00437. Challenge.Importo = 1; AssertOnlyAcceptsTableValues(x => x.Tipo); } [TestMethod] public void TipoValidateAgainstError00437() { Challenge.Tipo = "SC"; Challenge.Importo = null; Challenge.Percentuale = null; var result = Validator.TestValidate(Challenge); result.ShouldHaveValidationErrorFor(x => x.Tipo).WithErrorCode("00437"); Challenge.Importo = null; Challenge.Percentuale = 0; result = Validator.TestValidate(Challenge); result.ShouldNotHaveValidationErrorFor(x => x.Tipo); Challenge.Importo = 0; Challenge.Percentuale = null; result = Validator.TestValidate(Challenge); result.ShouldNotHaveValidationErrorFor(x => x.Tipo); } [TestMethod] public void Importo() { AssertDecimalType(x => x.Importo, 8, 19); } [TestMethod] public void Percentuale() { AssertDecimalType(x => x.Percentuale, 2, 6); } } } ================================================ FILE: Test/Common/StabileOrganizzazioneValidator.cs ================================================ using FatturaElettronica.Common; using FatturaElettronica.Test.Ordinaria; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace FatturaElettronica.Test.Common { [TestClass] public class StabileOrganizzazioneValidator : BaseLocalitàValidator { } } ================================================ FILE: Test/Core/JsonTest.cs ================================================ using System; using System.Text; using System.Text.Json; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace FatturaElettronica.Test.Core { [TestClass] public class JsonTest { [TestMethod] public void JsonDeSerialize() { var base64String = "VGhpcyBpcyBhIHN0cmluZw=="; var original = new TestMe { AString = "a string", ADate = DateTime.Now, ADecimal = 0.12345678m, ABool = true, AByteArray = Convert.FromBase64String(base64String) }; original.SubTestMe.AString = "a sub string"; original.SubTestMe.ADate = DateTime.Now.AddDays(+1); original.SubTestMe.ADecimal = 0.98765432m; original.SubTestMe.AByteArray = Convert.FromBase64String(base64String); var json = original.ToJson(); Assert.IsFalse(json.Contains("XmlOptions")); var challenge = new TestMe(); challenge.FromJson(new Utf8JsonReader(Encoding.UTF8.GetBytes(json))); Assert.AreEqual(original.AString, challenge.AString); Assert.AreEqual(original.ADate, challenge.ADate); Assert.AreEqual(original.ADecimal, challenge.ADecimal); CollectionAssert.AreEqual(original.AByteArray, challenge.AByteArray); Assert.AreEqual(original.SubTestMe.AString, challenge.SubTestMe.AString); Assert.AreEqual(original.SubTestMe.ADate, challenge.SubTestMe.ADate); Assert.AreEqual(original.SubTestMe.ABool, challenge.SubTestMe.ABool); Assert.AreEqual(original.SubTestMe.ADecimal, challenge.SubTestMe.ADecimal); CollectionAssert.AreEqual(original.SubTestMe.AByteArray, challenge.SubTestMe.AByteArray); } } } ================================================ FILE: Test/Core/TestMe.cs ================================================ using System; using FatturaElettronica.Core; namespace FatturaElettronica.Test.Core { public class TestMe : BaseClassSerializable { [DataProperty] public string AString { get; set; } [DataProperty] public DateTime ADate { get; set; } [DataProperty] public decimal ADecimal { get; set; } [DataProperty] public byte[] AByteArray { get; set; } [DataProperty] public bool ABool { get; set; } [DataProperty] public SubTestMe SubTestMe { get; } = new(); public override void WriteXml(System.Xml.XmlWriter w) { w.WriteStartElement("test"); base.WriteXml(w); w.WriteEndElement(); } } public class SubTestMe : BaseClassSerializable { [DataProperty] public string AString { get; set; } [DataProperty] public DateTime ADate { get; set; } [DataProperty] public decimal ADecimal { get; set; } [DataProperty] public byte[] AByteArray { get; set; } [DataProperty] public bool ABool { get; set; } } } ================================================ FILE: Test/Core/XmlTest.cs ================================================ using System; using System.Xml; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace FatturaElettronica.Test.Core { [TestClass] public class DeSerialize { [TestMethod] public void XmlDeSerialize() { var original = new TestMe { AString = "a string", ADate = DateTime.Now, ADecimal = 0.12345678m }; original.SubTestMe.AString = "a sub string"; original.SubTestMe.ADate = DateTime.Now.AddDays(+1); original.SubTestMe.ADecimal = 0.98765432m; var tempFile = "test.xml"; using (var w = XmlWriter.Create(tempFile)) { original.WriteXml(w); } var challenge = new TestMe(); using (var r = XmlReader.Create(tempFile)) { challenge.ReadXml(r); } Assert.AreEqual(original.AString, challenge.AString); Assert.AreEqual(original.ADate.Date, challenge.ADate); Assert.AreEqual(original.ADecimal, challenge.ADecimal); Assert.AreEqual(original.SubTestMe.AString, challenge.SubTestMe.AString); Assert.AreEqual(original.SubTestMe.ADate.Date, challenge.SubTestMe.ADate); Assert.AreEqual(original.SubTestMe.ADate.Date, challenge.SubTestMe.ADate); Assert.AreEqual(original.SubTestMe.ADecimal, challenge.SubTestMe.ADecimal); } } } ================================================ FILE: Test/Extensions/FilenameGeneratorTest.cs ================================================ using System; using FatturaElettronica.Extensions; using FatturaElettronica.Extensions.Resources; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace FatturaElettronica.Test.Extensions { [TestClass] public class FilenameGeneratorTest { [TestMethod] public void Initialize() { Assert.ThrowsException(() => new FatturaElettronicaFileNameGenerator(null)); Assert.ThrowsException(() => new FatturaElettronicaFileNameGenerator(new()), ErrorMessages.IdFiscaleIsMissing); Assert.ThrowsException( () => new FatturaElettronicaFileNameGenerator(new() {IdPaese = "I"}), ErrorMessages.IdPaeseIsWrongOrMissing); Assert.ThrowsException( () => new FatturaElettronicaFileNameGenerator(new() {IdPaese = "IT"}), ErrorMessages.IdCodiceIsMissing); var filename = new FatturaElettronicaFileNameGenerator(new() {IdPaese = "IT", IdCodice = "0123456789"}); Assert.IsTrue(filename != null); } [TestMethod] public void ConvertIntegerToFilename() { var filenameGenerator = new FatturaElettronicaFileNameGenerator(new() {IdPaese = "IT", IdCodice = "0123456789"}); var filename = filenameGenerator.GetNextFileName(11); Assert.IsTrue(filename == "IT0123456789_0000C.xml"); Assert.AreEqual(12, filenameGenerator.CurrentIndex); } [TestMethod] public void ConvertStringToFilename() { var filenameGenerator = new FatturaElettronicaFileNameGenerator(new() {IdPaese = "IT", IdCodice = "0123456789"}); var filename = filenameGenerator.GetNextFileName("0000C"); Assert.IsTrue(filename == "IT0123456789_0000D.xml"); Assert.AreEqual(13, filenameGenerator.CurrentIndex); } [TestMethod] public void ConvertIntegerToFilenameSigned() { var filenameGenerator = new FatturaElettronicaFileNameGenerator( new() {IdPaese = "IT", IdCodice = "0123456789"}, FatturaElettronicaFileNameExtensionType.Signed); var filename = filenameGenerator.GetNextFileName(11); Assert.IsTrue(filename == "IT0123456789_0000C.xml.p7m"); Assert.AreEqual(12, filenameGenerator.CurrentIndex); } [TestMethod] public void ConvertStringToFilenameSigned() { var filenameGenerator = new FatturaElettronicaFileNameGenerator( new() {IdPaese = "IT", IdCodice = "0123456789"}, FatturaElettronicaFileNameExtensionType.Signed); var filename = filenameGenerator.GetNextFileName("0000C"); Assert.IsTrue(filename == "IT0123456789_0000D.xml.p7m"); Assert.AreEqual(13, filenameGenerator.CurrentIndex); } [TestMethod] public void ConvertIntegerToFilename2Char() { var filenameGenerator = new FatturaElettronicaFileNameGenerator(new() {IdPaese = "IT", IdCodice = "0123456789"}); var filename = filenameGenerator.GetNextFileName(36); Assert.IsTrue(filename == "IT0123456789_00011.xml"); Assert.AreEqual(37, filenameGenerator.CurrentIndex); } [TestMethod] public void LastBillingNumberLength() { var filenameGenerator = new FatturaElettronicaFileNameGenerator(new() {IdPaese = "IT", IdCodice = "0123456789"}); Assert.ThrowsException(() => filenameGenerator.GetNextFileName("123456"), ErrorMessages.LastBillingNumberIsTooLong); } } } ================================================ FILE: Test/Extensions/HtmlExtensionsTest.cs ================================================ using System; using System.IO; using FatturaElettronica.Extensions; using FatturaElettronica.Ordinaria; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace FatturaElettronica.Test.Extensions { [TestClass] public class HtmlExtensionsTest { [TestMethod] public void WriteHtml() { var f = new FatturaOrdinaria(); var outFile = Path.GetTempFileName(); f.ReadXml("Samples/IT02182030391_32.xml"); f.WriteHtml(outFile, "Samples/fatturaPA_v1.2.1.xsl"); var bytes = File.ReadAllBytes(outFile); Assert.IsTrue(bytes.Length > 2048); } [TestMethod] public void WriteHtmlThrowsOnInvalidArguments() { var f = new FatturaOrdinaria(); Assert.ThrowsException(() => f.WriteHtml(outPath: null, xslPath: "xslPath")); Assert.ThrowsException(() => f.WriteHtml(outPath: "fileName", xslPath: null)); } } } ================================================ FILE: Test/Extensions/JsonExtensionsTest.cs ================================================ using FatturaElettronica.Defaults; using FatturaElettronica.Extensions; using FatturaElettronica.Ordinaria; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace FatturaElettronica.Test.Extensions { [TestClass] public class JsonExtensionsTest { [TestMethod] public void FromJson() { var f = FatturaOrdinaria.CreateInstance(Instance.Privati); f.ReadXml("Samples/IT02182030391_32.xml"); Assert.AreEqual("32", f.FatturaElettronicaHeader.DatiTrasmissione.ProgressivoInvio); var json = f.ToJson(); var challenge = FatturaOrdinaria.CreateInstance(Instance.Privati); challenge.FromJson(json); Assert.AreEqual("32", challenge.FatturaElettronicaHeader.DatiTrasmissione.ProgressivoInvio); } } } ================================================ FILE: Test/Extensions/SignedFileExtensionsTest.cs ================================================ using System; using System.IO; using System.Security.Cryptography; using FatturaElettronica.Defaults; using FatturaElettronica.Extensions; using FatturaElettronica.Ordinaria; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace FatturaElettronica.Test.Extensions { [TestClass] public class SignedFileExtensionsTest { [TestMethod] public void ReadXMLSigned() { var f = FatturaOrdinaria.CreateInstance(Instance.Privati); f.ReadXmlSigned("Samples/IT02182030391_31.xml.p7m"); Assert.AreEqual("31", f.FatturaElettronicaHeader.DatiTrasmissione.ProgressivoInvio); } [TestMethod] [DataRow(false)] [DataRow(true)] public void ReadXMLSigned_ShouldThrowExceptionOnTamperedDocuments(bool performValidation) { var f = FatturaOrdinaria.CreateInstance(Instance.Privati); var exception = Assert.ThrowsException(() => f.ReadXmlSigned("Samples/IT02182030391_31_tampered.xml.p7m", performValidation)); } [TestMethod] public void ReadXMLSignedBase64() { var f = FatturaOrdinaria.CreateInstance(Instance.Privati); f.ReadXmlSignedBase64("Samples/IT02182030391_31.Base64.xml.p7m"); Assert.AreEqual("31", f.FatturaElettronicaHeader.DatiTrasmissione.ProgressivoInvio); } [TestMethod] public void ReadXMLSignedFallbacksToBase64Attempt() { var f = FatturaOrdinaria.CreateInstance(Instance.Privati); f.ReadXmlSigned("Samples/IT02182030391_31.Base64.xml.p7m"); Assert.AreEqual("31", f.FatturaElettronicaHeader.DatiTrasmissione.ProgressivoInvio); } [TestMethod] public void ReadXMLSignedValidateSignatureDisabled() { var f = FatturaOrdinaria.CreateInstance(Instance.Privati); f.ReadXmlSigned("Samples/IT02182030391_31.xml.p7m", validateSignature: false); Assert.AreEqual("31", f.FatturaElettronicaHeader.DatiTrasmissione.ProgressivoInvio); } [TestMethod] public void ReadXMLSignedBase64ValidateSignatureDisabled() { var f = FatturaOrdinaria.CreateInstance(Instance.Privati); f.ReadXmlSignedBase64("Samples/IT02182030391_31.Base64.xml.p7m", validateSignature: false); Assert.AreEqual("31", f.FatturaElettronicaHeader.DatiTrasmissione.ProgressivoInvio); } [TestMethod] public void ReadXMLSignedThrowsOnNonSignedFile() { var f = FatturaOrdinaria.CreateInstance(Instance.Privati); Assert.ThrowsException(() => f.ReadXmlSigned("Samples/IT02182030391_32.xml")); } [TestMethod] public void ReadXMLSignedBase64ThrowsOnNonSignedFile() { var f = FatturaOrdinaria.CreateInstance(Instance.Privati); Assert.ThrowsException(() => f.ReadXmlSignedBase64("Samples/IT02182030391_32.xml")); } [TestMethod] public void ReadXMLSignedStream() { var f = new FatturaOrdinaria(); using (var inputStream = new FileStream("Samples/IT02182030391_31.xml.p7m", FileMode.Open, FileAccess.Read)) { f.ReadXmlSigned(inputStream); } Assert.AreEqual("31", f.FatturaElettronicaHeader.DatiTrasmissione.ProgressivoInvio); } [TestMethod] public void CreateInstanceFromXmlBase64WithCRLF() { using var stream = new FileStream("Samples/IT02182030391_31.Base64.CRLF.xml.p7m", FileMode.Open, FileAccess.Read); var f = FatturaBase.CreateInstanceFromXml(stream); Assert.IsInstanceOfType(f, typeof(FatturaOrdinaria)); Assert.AreEqual("31", ((FatturaOrdinaria)f).FatturaElettronicaHeader.DatiTrasmissione.ProgressivoInvio); } [TestMethod] public void WriteXmlSigned() { if (File.Exists("Samples/IT02182030391_32.xml.p7m")) File.Delete("Samples/IT02182030391_32.xml.p7m"); var f = FatturaOrdinaria.CreateInstance(Instance.Privati); f.WriteXmlSigned("Samples/idsrv3test.pfx", "idsrv3test", "Samples/IT02182030391_32.xml.p7m"); Assert.IsTrue(File.Exists("Samples/IT02182030391_32.xml.p7m")); } [TestMethod] public void WriteXmlSignedThrowsOnMissingPfxFile() { var f = FatturaOrdinaria.CreateInstance(Instance.Privati); Assert.ThrowsException(() => f.WriteXmlSigned("Samples/notreally.pfx", "idsrv3test", "Samples/IT02182030391_32.xml.p7m")); } } } ================================================ FILE: Test/Extensions/StreamExtensionsTest.cs ================================================ using System; using System.IO; using System.Text; using FatturaElettronica.Extensions; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace FatturaElettronica.Test.Extensions { [TestClass] public class StreamExtensionsTest { [TestMethod] public void ReadXml_ShouldRewindBeforeReading() { var inputStream = new MemoryStream(Encoding.UTF8.GetBytes(Base64String)); inputStream.Position = 5; var resultStream = StreamExtensions.PreprocessStreamEncoding(inputStream); var decodedString = Encoding.UTF8.GetString((resultStream as MemoryStream).ToArray()); Assert.AreEqual(BareString, decodedString); } [TestMethod] public void PreprocessStreamEncoding_ShouldOnlyConvertBase64Input() { var inputStream = new MemoryStream(Encoding.UTF8.GetBytes(BareString)); var resultStream = StreamExtensions.PreprocessStreamEncoding(inputStream); var decodedString = Encoding.UTF8.GetString((resultStream as MemoryStream).ToArray()); Assert.AreEqual(BareString, decodedString); Assert.AreEqual(inputStream.Length, resultStream.Length); } [TestMethod] public void PreprocessStreamEncoding_ShouldDecodeCorrectly() { var inputStream = new MemoryStream(Encoding.UTF8.GetBytes(Base64String)); inputStream.Position = 5; var resultStream = StreamExtensions.PreprocessStreamEncoding(inputStream); var decodedString = Encoding.UTF8.GetString((resultStream as MemoryStream).ToArray()); Assert.AreEqual(BareString, decodedString); } [TestMethod] public void PreprocessStreamEncoding_ShouldNotRewindNonSeekableStream() { var mixedPreviousContent = "CouldBeAFileHeader"; var mixedBufferStream = new NonRewindableStream(Encoding.UTF8.GetBytes(string.Concat("CouldBeAFileHeader", Base64String))); mixedBufferStream.Position = mixedPreviousContent.Length; //We move to the stream position where the base64 starts var resultStream = StreamExtensions.PreprocessStreamEncoding(mixedBufferStream); var decodedString = Encoding.UTF8.GetString((resultStream as MemoryStream).ToArray()); Assert.AreEqual(BareString, decodedString); } [TestMethod] public void PreprocessStreamEncoding_ShouldNotRewindPositionZeroStreams() { var correctlyPositionedStream = new SusceptibleMemoryStream(Encoding.UTF8.GetBytes(Base64String)); var resultStream = StreamExtensions.PreprocessStreamEncoding(correctlyPositionedStream); var decodedString = Encoding.UTF8.GetString((resultStream as MemoryStream).ToArray()); Assert.AreEqual(BareString, decodedString); } private const string BareString = "NotABaseEncodedString"; private const string Base64String = "Tm90QUJhc2VFbmNvZGVkU3RyaW5n"; private class NonRewindableStream : MemoryStream { public NonRewindableStream(byte[] buffer) : base(buffer) { } public override bool CanSeek => false; } /// /// This class will take offense if Position is invoked and it's original value is zero /// private class SusceptibleMemoryStream : MemoryStream { public SusceptibleMemoryStream(byte[] buffer) : base(buffer) { } public override long Position { get => base.Position; set { if (base.Position == 0) { throw new Exception("You should not see this if the StreamExtensions class is implemented correctly"); } base.Position = value; } } } } } ================================================ FILE: Test/Extensions/XmlExtensionsTest.cs ================================================ using System.IO; using System.Xml; using FatturaElettronica.Defaults; using FatturaElettronica.Extensions; using FatturaElettronica.Ordinaria; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace FatturaElettronica.Test.Extensions { [TestClass] public class XmlExtensionsTest { [TestMethod] public void ReadXMLFile() { var f = FatturaOrdinaria.CreateInstance(Instance.Privati); f.ReadXml("Samples/IT02182030391_32.xml"); Assert.AreEqual("32", f.FatturaElettronicaHeader.DatiTrasmissione.ProgressivoInvio); } [TestMethod] public void ReadXMLStream() { var f = FatturaOrdinaria.CreateInstance(Instance.Privati); f.ReadXml(File.OpenRead("Samples/IT02182030391_32.xml")); Assert.AreEqual("32", f.FatturaElettronicaHeader.DatiTrasmissione.ProgressivoInvio); } [TestMethod] public void WriteXML() { var f = FatturaOrdinaria.CreateInstance(Instance.Privati); f.FatturaElettronicaHeader.DatiTrasmissione.ProgressivoInvio = "99"; var outFile = Path.GetTempFileName(); f.WriteXml(outFile); var challenge = FatturaOrdinaria.CreateInstance(Instance.Privati); using (var r = XmlReader.Create(outFile, new() {IgnoreWhitespace = true, IgnoreComments = true})) { challenge.ReadXml(r); } Assert.AreEqual("99", f.FatturaElettronicaHeader.DatiTrasmissione.ProgressivoInvio); } } } ================================================ FILE: Test/FatturaElettronica.Test.csproj ================================================  net10.0 false Always Always Always PreserveNewest PreserveNewest PreserveNewest PreserveNewest PreserveNewest PreserveNewest PreserveNewest PreserveNewest PreserveNewest ================================================ FILE: Test/JSONDeSerialize.cs ================================================ using System.Text; using System.Text.Json; using System.Xml; using FatturaElettronica.Defaults; using FatturaElettronica.Extensions; using FatturaElettronica.Ordinaria; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace FatturaElettronica.Test { [TestClass] public class JSONDeSerialize { [TestMethod] public void DeserializeAndThenSerializeOfficialPRSample() { var f = Deserialize("Samples/IT01234567890_FPR02.xml"); Assert.IsTrue(f.Validate().IsValid); var json = f.ToJson(); var challenge = FatturaOrdinaria.CreateInstance(Instance.Privati); challenge.FromJson(new Utf8JsonReader(Encoding.UTF8.GetBytes(json))); Assert.IsTrue(challenge.Validate().IsValid); } [TestMethod] public void NomeCognomeIsIgnored() { var f = FatturaOrdinaria.CreateInstance(Instance.Privati); var anagrafica = f.FatturaElettronicaHeader.CedentePrestatore.DatiAnagrafici.Anagrafica; anagrafica.Nome = "nome"; var json = f.FatturaElettronicaHeader.CedentePrestatore.DatiAnagrafici.Anagrafica.ToJson(); Assert.AreEqual("nome", anagrafica.CognomeNome); Assert.IsFalse(json.Contains("CognomeNome")); } private FatturaOrdinaria Deserialize(string fileName) { var f = FatturaOrdinaria.CreateInstance(Instance.Privati); using (var r = XmlReader.Create(fileName, new() { IgnoreWhitespace = true })) { f.ReadXml(r); } return f; } } } ================================================ FILE: Test/Ordinaria/AllegatiValidator.cs ================================================ using FatturaElettronica.Common; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace FatturaElettronica.Test.Ordinaria { [TestClass] public class AllegatiValidator : BaseClass { [TestMethod] public void NomeAttachmentIsRequired() { AssertRequired(x => x.NomeAttachment); } [TestMethod] public void NomeAttachmentMinMaxLength() { AssertMinMaxLength(x => x.NomeAttachment, 1, 60); } [TestMethod] public void NomeAttachmentMustBeLatin1Supplement() { AssertMustBeLatin1Supplement(x => x.NomeAttachment); } [TestMethod] public void AlgoritmoCompressioneIsOptional() { AssertOptional(x => x.AlgoritmoCompressione); } [TestMethod] public void AlgoritmoCompressioneMinMaxLength() { AssertMinMaxLength(x => x.AlgoritmoCompressione, 1, 60); } [TestMethod] public void AlgoritmoCompressioneMustBeBasicLatin() { AssertMustBeBasicLatin(x => x.AlgoritmoCompressione); } [TestMethod] public void FormatoAttachmentIsOptional() { AssertOptional(x => x.FormatoAttachment); } [TestMethod] public void FormatoAttachmentMinMaxLength() { AssertMinMaxLength(x => x.FormatoAttachment, 1, 10); } [TestMethod] public void FormatoAttachmentMustBeBasicLatin() { AssertMustBeBasicLatin(x => x.FormatoAttachment); } [TestMethod] public void DescrizioneAttachmentIsOptional() { AssertOptional(x => x.DescrizioneAttachment); } [TestMethod] public void DescrizioneAttachmentMinMaxLength() { AssertMinMaxLength(x => x.DescrizioneAttachment, 1, 100); } [TestMethod] public void DescrizioneAttachmentMustBeLatin1Supplement() { AssertMustBeLatin1Supplement(x => x.DescrizioneAttachment); } [TestMethod] public void AttachmentIsRequired() { AssertRequired(x => x.Attachment); } } } ================================================ FILE: Test/Ordinaria/AltriDatiGestionaliValidator.cs ================================================ using FatturaElettronica.Ordinaria.FatturaElettronicaBody.DatiBeniServizi; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace FatturaElettronica.Test.Ordinaria { [TestClass] public class AltriDatiGestionaliValidator : BaseClass { [TestMethod] public void TipoDatoIsRequired() { AssertRequired(x => x.TipoDato); } [TestMethod] public void TipoDatoMinMaxLength() { AssertMinMaxLength(x => x.TipoDato, 1, 10); } [TestMethod] public void TipoDatoMustBeBasicLatin() { AssertMustBeBasicLatin(x => x.TipoDato); } [TestMethod] public void RiferimentoTestoIsOptional() { AssertOptional(x => x.RiferimentoTesto); } [TestMethod] public void RiferimentoTestoMinMaxLength() { AssertMinMaxLength(x => x.RiferimentoTesto, 1, 60); } [TestMethod] public void RiferimentoTestoMustBeLatin1Supplement() { AssertMustBeLatin1Supplement(x => x.RiferimentoTesto); } [TestMethod] public void RiferimentoNumero() { AssertDecimalType(x => x.RiferimentoNumero, 8, 19); } } } ================================================ FILE: Test/Ordinaria/BaseDatiDocumentoValidator.cs ================================================ using System.Collections.Generic; using FluentValidation; using FluentValidation.TestHelper; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace FatturaElettronica.Test.Ordinaria { [TestClass] public abstract class BaseDatiDocumentoValidator : BaseClass where TClass : FatturaElettronica.Common.DatiDocumento where TValidator : IValidator { [TestMethod] public void IdDocumentoIsRequired() { AssertRequired(x => x.IdDocumento); } [TestMethod] public void IdDocumentoMinMaxLength() { AssertMinMaxLength(x => x.IdDocumento, 1, 20); } [TestMethod] public void IdDocumentMustBeBasicLatin() { AssertMustBeBasicLatin(x => x.IdDocumento); } [TestMethod] public void NumItemIsOptional() { AssertOptional(x => x.NumItem); } [TestMethod] public void NumItemMinMaxLength() { AssertMinMaxLength(x => x.NumItem, 1, 20); } [TestMethod] public void NumItemMustBeBasicLatin() { AssertMustBeBasicLatin(x => x.NumItem); } [TestMethod] public void CodiceCommessaIsOptional() { AssertOptional(x => x.CodiceCommessaConvenzione); } [TestMethod] public void CodiceCommessaMustBeLatin1Supplement() { AssertMustBeLatin1Supplement(x => x.CodiceCommessaConvenzione); } [TestMethod] public void CodiceCommessaMinMaxLength() { AssertMinMaxLength(x => x.CodiceCommessaConvenzione, 1, 100); } [TestMethod] public void CodiceCUPIsOptional() { AssertOptional(x => x.CodiceCUP); } [TestMethod] public void CodiceCUPMinMaxLength() { AssertMinMaxLength(x => x.CodiceCUP, 1, 15); } [TestMethod] public void CodiceCUPMustBeBasicLatin() { AssertMustBeBasicLatin(x => x.CodiceCUP); } [TestMethod] public void CodiceCIGIsOptional() { AssertOptional(x => x.CodiceCIG); } [TestMethod] public void CodiceCIGMinMaxLength() { AssertMinMaxLength(x => x.CodiceCIG, 1, 15); } [TestMethod] public void CodiceCIGMustBeBasicLatin() { AssertMustBeBasicLatin(x => x.CodiceCIG); } [TestMethod] public void RiferimentoNumeroLineaValidatorMinMax() { Challenge.RiferimentoNumeroLinea = new() { -1 }; var result = Validator.TestValidate(Challenge); result.ShouldHaveValidationErrorFor(x => x.RiferimentoNumeroLinea); Challenge.RiferimentoNumeroLinea = new() { 10000 }; result = Validator.TestValidate(Challenge); result.ShouldHaveValidationErrorFor(x => x.RiferimentoNumeroLinea); Challenge.RiferimentoNumeroLinea = new() { 1 }; result = Validator.TestValidate(Challenge); result.ShouldNotHaveValidationErrorFor(x => x.RiferimentoNumeroLinea); Challenge.RiferimentoNumeroLinea = new() { 9999 }; result = Validator.TestValidate(Challenge); result.ShouldNotHaveValidationErrorFor(x => x.RiferimentoNumeroLinea); } } } ================================================ FILE: Test/Ordinaria/BaseLocalitàValidator.cs ================================================ using FatturaElettronica.Tabelle; using FluentValidation; using FluentValidation.TestHelper; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace FatturaElettronica.Test.Ordinaria { [TestClass] public abstract class BaseLocalitàValidator : BaseClass where TClass : FatturaElettronica.Common.Località where TValidator : IValidator { [TestMethod] public void IndirizzoIsRequired() { AssertRequired(x => x.Indirizzo); } [TestMethod] public void IndirizzoMinMaxLength() { AssertMinMaxLength(x => x.Indirizzo, 1, 60); } [TestMethod] public void IndirizzoMustBeLatin1Supplement() { AssertMustBeLatin1Supplement(x => x.Indirizzo); } [TestMethod] public void NumeroCivicoIsOptional() { AssertOptional(x => x.NumeroCivico); } [TestMethod] public void NumeroCivicoMinMaxLength() { AssertMinMaxLength(x => x.NumeroCivico, 1, 8); } [TestMethod] public void CAPIsRequired() { AssertRequired(x => x.CAP); } [TestMethod] public void CAPLength() { AssertLength(x => x.CAP, 5, filler: '9'); } [TestMethod] public void CAPMustBeNumeric() { Challenge.CAP = "1234A"; var result = Validator.TestValidate(Challenge); result.ShouldHaveValidationErrorFor(x => x.CAP); Challenge.CAP = "12345"; result = Validator.TestValidate(Challenge); result.ShouldNotHaveValidationErrorFor(x => x.CAP); } [TestMethod] public void ComuneIsRequired() { AssertRequired(x => x.Comune); } [TestMethod] public void ComuneMinMaxLength() { AssertMinMaxLength(x => x.Comune, 1, 60); } [TestMethod] public void ComuneMustBeLatin1Supplement() { AssertMustBeLatin1Supplement(x => x.Indirizzo); } [TestMethod] public void ProvinciaOptional() { AssertOptional(x => x.Provincia); } [TestMethod] public void ProvinciaOnlyAcceptsValidValues() { AssertProvinciaOnlyAcceptsValidValues(x => x.Provincia); } [TestMethod] public void NazioneIsRequired() { AssertRequired(x => x.Nazione); } [TestMethod] public void NazioneOnlyAcceptsTableValues() { AssertOnlyAcceptsTableValues(x => x.Nazione); } } } ================================================ FILE: Test/Ordinaria/CedentePrestatoreValidator.cs ================================================ using FatturaElettronica.Ordinaria.FatturaElettronicaHeader.CedentePrestatore; using FluentValidation.TestHelper; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace FatturaElettronica.Test.Ordinaria { [TestClass] public class CedentePrestatoreValidator : BaseClass { [TestMethod] public void DatiAnagraficiHasChildValidator() { Validator.ShouldHaveChildValidator(x => x.DatiAnagrafici, typeof(FatturaElettronica.Validators.DatiAnagraficiCedentePrestatoreValidator)); } [TestMethod] public void SedeHasChildValidator() { Validator.ShouldHaveChildValidator(x => x.Sede, typeof(FatturaElettronica.Validators.SedeCedentePrestatoreValidator)); } [TestMethod] public void StabileOrganizzazioneHasChildValidator() { Validator.ShouldHaveDelegatePropertyChildValidator( x => x.StabileOrganizzazione, typeof(Validators.StabileOrganizzazioneValidator)); } [TestMethod] public void IscrizioneREAHasChildValidator() { Validator.ShouldHaveDelegatePropertyChildValidator(x => x.IscrizioneREA, typeof(FatturaElettronica.Validators.IscrizioneREAValidator)); } [TestMethod] public void ContattiHasChildValidator() { Validator.ShouldHaveDelegatePropertyChildValidator(x => x.Contatti, typeof(FatturaElettronica.Validators.ContattiValidator)); } [TestMethod] public void RiferimentoAmministrazioneMinMaxLength() { AssertMinMaxLength(x => x.RiferimentoAmministrazione, 1, 20); } [TestMethod] public void RiferimentoAmministrazioneMustBeBasicLatin() { AssertMustBeBasicLatin(x => x.RiferimentoAmministrazione); } } } ================================================ FILE: Test/Ordinaria/CessionarioCommittenteValidator.cs ================================================ using FatturaElettronica.Ordinaria.FatturaElettronicaHeader.CessionarioCommittente; using FluentValidation.TestHelper; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace FatturaElettronica.Test.Ordinaria { [TestClass] public class CessionarioCommittenteValidator : BaseClass { [TestMethod] public void DatiAnagraficiHasChildValidator() { Validator.ShouldHaveChildValidator(x => x.DatiAnagrafici, typeof(FatturaElettronica.Validators.DatiAnagraficiCessionarioCommittenteValidator)); } [TestMethod] public void SedeHasChildValidator() { Validator.ShouldHaveChildValidator(x => x.Sede, typeof(FatturaElettronica.Validators.SedeCessionarioCommittenteValidator)); } [TestMethod] public void StabileOrganizzazioneHasChildValidator() { Validator.ShouldHaveDelegatePropertyChildValidator( x => x.StabileOrganizzazione, typeof(Validators.StabileOrganizzazioneValidator)); } [TestMethod] public void RappresentateFiscaleHasChildValidator() { Validator.ShouldHaveDelegatePropertyChildValidator( x => x.RappresentanteFiscale, typeof(Validators.RappresentanteFiscaleCessionarioCommittenteValidator)); } } } ================================================ FILE: Test/Ordinaria/CodiceArticoloValidator.cs ================================================ using FatturaElettronica.Ordinaria.FatturaElettronicaBody.DatiBeniServizi; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace FatturaElettronica.Test.Ordinaria { [TestClass] public class CodiceArticoloValidator : BaseClass { [TestMethod] public void CodiceTipoIsRequired() { AssertRequired(x => x.CodiceTipo); } [TestMethod] public void CodiceTipoMinMaxLength() { AssertMinMaxLength(x => x.CodiceTipo, 1, 35); } [TestMethod] public void CodiceTipoMustBeBasicLatin() { AssertMustBeBasicLatin(x => x.CodiceTipo); } [TestMethod] public void CodiceValoreIsRequired() { AssertRequired(x => x.CodiceValore); } [TestMethod] public void CodiceValoreMinMaxLength() { AssertMinMaxLength(x => x.CodiceValore, 1, 35); } [TestMethod] public void CodiceValoreMustBeBasicLatin() { AssertMustBeLatin1Supplement(x => x.CodiceValore); } } } ================================================ FILE: Test/Ordinaria/ContattiTrasmittenteValidator.cs ================================================ using FatturaElettronica.Ordinaria.FatturaElettronicaHeader.DatiTrasmissione; using FluentValidation.TestHelper; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace FatturaElettronica.Test.Ordinaria { [TestClass] public class ContattiTrasmittenteValidator : BaseClass { [TestMethod] public void TelefonoIsOptional() { AssertOptional(x => x.Telefono); } [TestMethod] public void TelefonoMinMaxLength() { AssertMinMaxLength(x => x.Telefono, 5, 12); } [TestMethod] public void EmailIsOptional() { AssertOptional(x => x.Email); } [TestMethod] public void EmailMustBeValid() { Challenge.Email = "not really"; var result = Validator.TestValidate(Challenge); result.ShouldHaveValidationErrorFor(x => x.Email); Challenge.Email = "maybe@we.can"; result = Validator.TestValidate(Challenge); result.ShouldNotHaveValidationErrorFor(x => x.Email); } } } ================================================ FILE: Test/Ordinaria/ContattiValidator.cs ================================================ using FatturaElettronica.Ordinaria.FatturaElettronicaHeader.CedentePrestatore; using FluentValidation.TestHelper; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace FatturaElettronica.Test.Ordinaria { [TestClass] public class ContattiValidator : BaseClass { [TestMethod] public void TelefonoIsOptional() { AssertOptional(x => x.Telefono); } [TestMethod] public void TelefonoMinMaxLength() { AssertMinMaxLength(x => x.Telefono, 5, 12); } [TestMethod] public void FaxIsOptional() { AssertOptional(x => x.Fax); } [TestMethod] public void FaxMinMaxLength() { AssertMinMaxLength(x => x.Fax, 5, 12); } [TestMethod] public void EmailIsOptional() { AssertOptional(x => x.Email); } [TestMethod] public void EmailMustBeValid() { Challenge.Email = "not really"; var result = Validator.TestValidate(Challenge); result.ShouldHaveValidationErrorFor(x => x.Email); Challenge.Email = "maybe@we.can"; result = Validator.TestValidate(Challenge); result.ShouldNotHaveValidationErrorFor(x => x.Email); } } } ================================================ FILE: Test/Ordinaria/DatiAnagraficiCedentePrestatoreValidator.cs ================================================ using FatturaElettronica.Extensions; using FatturaElettronica.Ordinaria.FatturaElettronicaHeader.CedentePrestatore; using FatturaElettronica.Tabelle; using FluentValidation.TestHelper; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace FatturaElettronica.Test.Ordinaria { [TestClass] public class DatiAnagraficiCedentePrestatoreValidator : BaseClass { [TestMethod] public void IdFiscaleIVAHasChildValidator() { Validator.ShouldHaveChildValidator(x => x.IdFiscaleIVA, typeof(Validators.IdFiscaleIVAValidator)); } [TestMethod] public void CodiceFiscaleIsOptional() { AssertOptional(x => x.CodiceFiscale); } [TestMethod] public void CodiceFiscaleMustBeDigitsOrUpperCase() { AssertDigitsOrUppercase(x => x.CodiceFiscale); } [TestMethod] public void CodiceFiscaleMinMaxLength() { AssertMinMaxLength(x => x.CodiceFiscale, 11, 16, 'X', "RegularExpressionValidator"); } [TestMethod] public void AnagraficaHasChildValidator() { Validator.ShouldHaveChildValidator(x => x.Anagrafica, typeof(Validators.AnagraficaValidator)); } [TestMethod] public void AlboProfessionalIsOptional() { AssertOptional(x => x.AlboProfessionale); } [TestMethod] public void AlboProfessionaleMinMaxLength() { AssertMinMaxLength(x => x.AlboProfessionale, 1, 60); } [TestMethod] public void AlboProfessionaleMustBeLatin1Supplement() { AssertMustBeLatin1Supplement(x => x.AlboProfessionale); } [TestMethod] public void ProvinciaAlboIsOptional() { AssertOptional(x => x.ProvinciaAlbo); } [TestMethod] public void ProvinciaAlboOnlyAcceptsValidValues() { AssertProvinciaOnlyAcceptsValidValues(x => x.ProvinciaAlbo); } [TestMethod] public void NumeroIscrizioneAlboIsOptional() { AssertOptional(x => x.NumeroIscrizioneAlbo); } [TestMethod] public void NumeroIscrizioneAlboMinMaxLength() { AssertMinMaxLength(x => x.NumeroIscrizioneAlbo, 1, 60); } [TestMethod] public void NumeroIscrizioneAlboMustBeBasicLatin() { AssertMustBeBasicLatin(x => x.NumeroIscrizioneAlbo); } [TestMethod] public void RegimeFiscaleIsRequired() { AssertRequired(x => x.RegimeFiscale); } [TestMethod] public void RegimeFiscaleOnlyAcceptsTableValues() { AssertOnlyAcceptsTableValues(x => x.RegimeFiscale); } } } ================================================ FILE: Test/Ordinaria/DatiAnagraficiCessionarioCommittenteValidator.cs ================================================ using System.Linq; using FatturaElettronica.Ordinaria.FatturaElettronicaHeader.CessionarioCommittente; using FluentValidation.TestHelper; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace FatturaElettronica.Test.Ordinaria { [TestClass] public class DatiAnagraficiCessionarioCommittenteValidator : BaseClass { [TestMethod] public void IdFiscaleIVAHasChildValidator() { Validator.ShouldHaveDelegatePropertyChildValidator(x => x.IdFiscaleIVA, typeof(Validators.IdFiscaleIVAValidator)); } [TestMethod] public void CodiceFiscaleIsOptional() { Challenge.IdFiscaleIVA.IdCodice = "x"; AssertOptional(x => x.CodiceFiscale); } [TestMethod] public void CodiceFiscaleMustBeDigitsOrUpperCase() { AssertDigitsOrUppercase(x => x.CodiceFiscale); } [TestMethod] public void CodiceFiscaleMinMaxLength() { AssertMinMaxLength(x => x.CodiceFiscale, 11, 16, 'X', "RegularExpressionValidator"); } [TestMethod] public void AnagraficaHasChildValidator() { Validator.ShouldHaveChildValidator(x => x.Anagrafica, typeof(Validators.AnagraficaValidator)); } [TestMethod] public void IdFiscaleIVAIsOptional() { Challenge.CodiceFiscale = "x"; Assert.IsTrue(Challenge.IdFiscaleIVA.IsEmpty()); var r = Validator.Validate(Challenge); Assert.IsNull(r.Errors.FirstOrDefault(x => x.PropertyName == "IdFiscaleIVA")); } [TestMethod] public void CodiceFiscaleOrIdFiscaleIVAMustHaveValue() { Assert.IsTrue(string.IsNullOrEmpty(Challenge.CodiceFiscale)); Assert.IsTrue(Challenge.IdFiscaleIVA.IsEmpty()); var result = Validator.TestValidate(Challenge); result.ShouldHaveValidationErrorFor(x => x.CodiceFiscale).WithErrorCode("00417"); } } } ================================================ FILE: Test/Ordinaria/DatiAnagraficiVettoreValidator.cs ================================================ using FatturaElettronica.Ordinaria.FatturaElettronicaBody.DatiGenerali; using FluentValidation.TestHelper; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace FatturaElettronica.Test.Ordinaria { [TestClass] public class DatiAnagraficiVettoreValidator : BaseClass { [TestMethod] public void IdFiscaleIVAHasChildValidator() { Validator.ShouldHaveChildValidator(x => x.IdFiscaleIVA, typeof(Validators.IdFiscaleIVAValidator)); } [TestMethod] public void CodiceFiscaleIsOptional() { AssertOptional(x => x.CodiceFiscale); } [TestMethod] public void CodiceFiscaleMustBeDigitsOrUpperCase() { AssertDigitsOrUppercase(x => x.CodiceFiscale); } [TestMethod] public void CodiceFiscaleMinMaxLength() { AssertMinMaxLength(x => x.CodiceFiscale, 11, 16, 'X', "RegularExpressionValidator"); } [TestMethod] public void AnagraficaHasChildValidator() { Validator.ShouldHaveChildValidator(x => x.Anagrafica, typeof(Validators.AnagraficaValidator)); } [TestMethod] public void NumeroLicenzaIsOptional() { AssertOptional(x => x.NumeroLicenzaGuida); } [TestMethod] public void NumeroLicenzaGuidaMinMaxLength() { AssertMinMaxLength(x => x.NumeroLicenzaGuida, 1, 20); } [TestMethod] public void NumeroLicenzaGuidaMustBeBasicLatin() { AssertMustBeBasicLatin(x => x.NumeroLicenzaGuida); } } } ================================================ FILE: Test/Ordinaria/DatiBeniServiziValidator.cs ================================================ using FluentValidation.TestHelper; using System.Linq; using Microsoft.VisualStudio.TestTools.UnitTesting; using FatturaElettronica.Ordinaria.FatturaElettronicaBody.DatiBeniServizi; namespace FatturaElettronica.Test.Ordinaria { [TestClass] public class DatiBeniServiziValidator : BaseClass { [TestMethod] public void DettaglioLineeHasCollectionValidator() { Validator.ShouldHaveChildValidator( x => x.DettaglioLinee, typeof(FatturaElettronica.Validators.DettaglioLineeValidator)); } [TestMethod] public void DettaglioLineeCollectionCannotBeEmpty() { var r = Validator.Validate(Challenge); Assert.IsNotNull(r.Errors.FirstOrDefault(x => x.PropertyName == "DettaglioLinee")); Challenge.DettaglioLinee.Add(new()); r = Validator.Validate(Challenge); Assert.IsNull(r.Errors.FirstOrDefault(x => x.PropertyName == "DettaglioLinee")); } [TestMethod] public void DatiRiepilogoCollectionValidator() { Validator.ShouldHaveChildValidator( x => x.DatiRiepilogo, typeof(FatturaElettronica.Validators.DatiRiepilogoValidator)); } [TestMethod] public void DatiRiepilogoCollectionCannotBeEmpty() { AssertCollectionCannotBeEmpty(x => x.DatiRiepilogo); } } } ================================================ FILE: Test/Ordinaria/DatiBolloValidator.cs ================================================ using Microsoft.VisualStudio.TestTools.UnitTesting; using FatturaElettronica.Ordinaria.FatturaElettronicaBody.DatiGenerali; namespace FatturaElettronica.Test.Ordinaria { [TestClass] public class DatiBolloValidator : BaseClass { [TestMethod] public void BolloVirtualeIsRequired() { AssertRequired(x => x.BolloVirtuale); } [TestMethod] public void BolloVirtualeOnlyAcceptsSIValue() { AssertOnlyAcceptsSIValue(x => x.BolloVirtuale); } [TestMethod] public void ImportoBollo() { AssertDecimalType(x => x.ImportoBollo, 2, 13); } } } ================================================ FILE: Test/Ordinaria/DatiCassaPrevidenzialeValidator.cs ================================================ using Microsoft.VisualStudio.TestTools.UnitTesting; using FluentValidation.TestHelper; using FatturaElettronica.Ordinaria.FatturaElettronicaBody.DatiGenerali; using FatturaElettronica.Tabelle; namespace FatturaElettronica.Test.Ordinaria { [TestClass] public class DatiCassaPrevidenzialeValidator : BaseClass { [TestMethod] public void TipoCassaIsRequired() { AssertRequired(x => x.TipoCassa); } [TestMethod] public void TipoCassaOnlyAcceptsTableValues() { AssertOnlyAcceptsTableValues(x => x.TipoCassa); } [TestMethod] public void NaturaIsRequiredWhenAliquotaIsZero() { Challenge.AliquotaIVA = 0; AssertRequired(x => x.Natura, expectedErrorCode:"00413"); } [TestMethod] public void NaturaIsNotAllowedWhenAliquotaIsNotZero() { Challenge.AliquotaIVA = 1; Challenge.Natura = "N1"; var result = Validator.TestValidate(Challenge); result.ShouldHaveValidationErrorFor(x => x.Natura).WithErrorCode("00414"); } [TestMethod] public void NaturaOnlyAcceptsTableValuesWhenAliquotaIsZero() { Challenge.AliquotaIVA = 0; AssertOnlyAcceptsTableValues(x => x.Natura); } [TestMethod] public void NaturaIsOnlyValidatedWhenIsNotZero() { Challenge.Natura = null; Challenge.AliquotaIVA = 1; var result = Validator.TestValidate(Challenge); result.ShouldNotHaveValidationErrorFor(x => x.Natura); } [TestMethod] public void RiferimentoAmministrazioneIsOptional() { AssertOptional(x => x.RiferimentoAmministrazione); } [TestMethod] public void RiferimentoAmministrazioneMinMaxLength() { AssertMinMaxLength(x => x.RiferimentoAmministrazione, 1, 20); } [TestMethod] public void RiferimentoAmministrazioneMustBeBasicLatin() { AssertMustBeBasicLatin(x => x.RiferimentoAmministrazione); } [TestMethod] public void RitenutaIsOptional() { AssertOptional(x => x.Ritenuta); } [TestMethod] public void RitenutaOnlyAcceptSIValue() { AssertOnlyAcceptsSIValue(x => x.Ritenuta); } [TestMethod] public void ImportoContributoCassa() { AssertDecimalType(x => x.ImportoContributoCassa, 2, 13); } [TestMethod] public void ImponibileCassa() { AssertDecimalType(x => x.ImponibileCassa, 2, 13); } } } ================================================ FILE: Test/Ordinaria/DatiContrattoValidator.cs ================================================ using Microsoft.VisualStudio.TestTools.UnitTesting; using FatturaElettronica.Ordinaria.FatturaElettronicaBody.DatiGenerali; namespace FatturaElettronica.Test.Ordinaria { [TestClass] public class DatiContrattoValidator : BaseDatiDocumentoValidator { } } ================================================ FILE: Test/Ordinaria/DatiConvenzioneValidator.cs ================================================ using Microsoft.VisualStudio.TestTools.UnitTesting; using FatturaElettronica.Ordinaria.FatturaElettronicaBody.DatiGenerali; namespace FatturaElettronica.Test.Ordinaria { [TestClass] public class DatiConvenzioneValidator : BaseDatiDocumentoValidator { } } ================================================ FILE: Test/Ordinaria/DatiDDTValidator.cs ================================================ using Microsoft.VisualStudio.TestTools.UnitTesting; using FatturaElettronica.Ordinaria.FatturaElettronicaBody.DatiGenerali; using FluentValidation.TestHelper; namespace FatturaElettronica.Test.Ordinaria { [TestClass] public class DatiDDTValidator : BaseClass { [TestMethod] public void NumeroDDTIsRequired() { AssertRequired(x => x.NumeroDDT); } [TestMethod] public void NumeroDDTMinMaxLength() { AssertMinMaxLength(x => x.NumeroDDT, 1, 20); } [TestMethod] public void NumeroDDTMustBeBasicLatin() { AssertMustBeBasicLatin(x => x.NumeroDDT); } [TestMethod] public void RiferimentoNumeroLineaValidatorMinMax() { Challenge.RiferimentoNumeroLinea = new() { -1 }; var result = Validator.TestValidate(Challenge); result.ShouldHaveValidationErrorFor(x => x.RiferimentoNumeroLinea); Challenge.RiferimentoNumeroLinea = new() { 10000 }; result = Validator.TestValidate(Challenge); result.ShouldHaveValidationErrorFor(x => x.RiferimentoNumeroLinea); Challenge.RiferimentoNumeroLinea = new() { 1 }; result = Validator.TestValidate(Challenge); result.ShouldNotHaveValidationErrorFor(x => x.RiferimentoNumeroLinea); Challenge.RiferimentoNumeroLinea = new() { 9999 }; result = Validator.TestValidate(Challenge); result.ShouldNotHaveValidationErrorFor(x => x.RiferimentoNumeroLinea); } } } ================================================ FILE: Test/Ordinaria/DatiFattureCollegateValidator.cs ================================================ using Microsoft.VisualStudio.TestTools.UnitTesting; using FatturaElettronica.Ordinaria.FatturaElettronicaBody.DatiGenerali; namespace FatturaElettronica.Test.Ordinaria { [TestClass] public class DatiFattureCollegateValidator : BaseDatiDocumentoValidator { } } ================================================ FILE: Test/Ordinaria/DatiGeneraliDocumentoValidator.cs ================================================ using FluentValidation.TestHelper; using Microsoft.VisualStudio.TestTools.UnitTesting; using FatturaElettronica.Ordinaria.FatturaElettronicaBody.DatiGenerali; using FatturaElettronica.Validators; using System.Linq; using FatturaElettronica.Tabelle; namespace FatturaElettronica.Test.Ordinaria { [TestClass] public class DatiGeneraliDocumentoValidator : BaseClass { [TestMethod] public void TipoDocumentoIsRequired() { AssertRequired(x => x.TipoDocumento); } [TestMethod] public void TipoDocumentoOnlyAcceptsTableValues() { AssertOnlyAcceptsTableValues(x => x.TipoDocumento); } [TestMethod] public void DivisaIsRequired() { AssertRequired(x => x.Divisa); } [TestMethod] public void DivisaOnlyAcceptsTableValues() { AssertOnlyAcceptsTableValues(x => x.Divisa); } [TestMethod] public void NumeroIsRequired() { AssertRequired(x => x.Numero); } [TestMethod] public void NumeroMinMaxLength() { AssertMinMaxLength(x => x.Numero, 1, 20, filler: '1'); } [TestMethod] public void NumeroMustBeBasicLatin() { AssertMustBeBasicLatin(x => x.Numero); } [TestMethod] public void NumeroMustHaveAtLeatOneNumericChar() { Challenge.Numero = "hello"; var result = Validator.TestValidate(Challenge); result.ShouldHaveValidationErrorFor(x => x.Numero).WithErrorCode("00425"); Challenge.Numero = "hello1"; result = Validator.TestValidate(Challenge); result.ShouldNotHaveValidationErrorFor(x => x.Numero); } [TestMethod] public void DatiRitenutaHasChildValidator() { Validator.ShouldHaveChildValidator(x => x.DatiRitenuta, typeof(FatturaElettronica.Validators.DatiRitenutaValidator)); } [TestMethod] public void DatiBolloHasChildValidator() { Validator.ShouldHaveDelegatePropertyChildValidator(x => x.DatiBollo, typeof(FatturaElettronica.Validators.DatiBolloValidator)); } [TestMethod] public void DatiCassaPrevidenzialeHasCollectionValidator() { Validator.ShouldHaveChildValidator(x => x.DatiCassaPrevidenziale, typeof(FatturaElettronica.Validators.DatiCassaPrevidenzialeValidator)); } [TestMethod] public void ScontoMaggiorazioneHasCollectionValidator() { Validator.ShouldHaveChildValidator(x => x.ScontoMaggiorazione, typeof(ScontoMaggiorazioneValidator)); } [TestMethod] public void DatiRitenutaRequiredWhenDatiCassaPrevidenzialeNotEmpty() { Challenge.DatiCassaPrevidenziale.Add(new() {Ritenuta = "SI"}); var r = Validator.Validate(Challenge); Assert.AreEqual("00415", r.Errors.FirstOrDefault(x => x.PropertyName == "DatiCassaPrevidenziale")?.ErrorCode); Challenge.DatiCassaPrevidenziale.Clear(); r = Validator.Validate(Challenge); Assert.IsNull(r.Errors.FirstOrDefault(x => x.PropertyName == "DatiCassaPrevidenziale")); // test che falso errore di convalida sia risolto. Vedi: // https://github.com/FatturaElettronica/FatturaElettronica.NET/issues/44 Challenge.DatiCassaPrevidenziale.Add(new() { TipoCassa = "TC20", AlCassa = 4, ImportoContributoCassa = 46.56m, Natura = "N5" }); r = Validator.Validate(Challenge); Assert.IsNull(r.Errors.FirstOrDefault(x => x.PropertyName == "DatiCassaPrevidenziale")); } [TestMethod] public void CausaleHasCollectionValidator() { Validator.ShouldHaveChildValidator(x => x.Causale, typeof(CausaleValidator)); } [TestMethod] public void Art73IsOptional() { AssertOptional(x => x.Art73); } [TestMethod] public void Art73OnlyAcceptsSIValue() { AssertOnlyAcceptsSIValue(x => x.Art73); } [TestMethod] public void PenalitaPagamentiRitardati() { AssertDecimalType(x => x.ImportoTotaleDocumento, 2, 13); } [TestMethod] public void ImportoPagamento() { AssertDecimalType(x => x.Arrotondamento, 2, 13); } } } ================================================ FILE: Test/Ordinaria/DatiGeneraliValidator.cs ================================================ using FluentValidation.TestHelper; using Microsoft.VisualStudio.TestTools.UnitTesting; using FatturaElettronica.Ordinaria.FatturaElettronicaBody.DatiGenerali; using System; using System.Linq; namespace FatturaElettronica.Test.Ordinaria { [TestClass] public class DatiGeneraliValidator : BaseClass { [TestMethod] public void DatiGeneraliDocumentoHasChildValidator() { Validator.ShouldHaveChildValidator( x => x.DatiGeneraliDocumento, typeof(FatturaElettronica.Validators.DatiGeneraliDocumentoValidator)); } [TestMethod] public void DatiGeneraliDocumentoCannotPredateDatiFattureCollegate() { Challenge.DatiGeneraliDocumento.Data = DateTime.Now.AddDays(-1); Challenge.DatiFattureCollegate.Add( new() { Data = DateTime.Now }); var r = Validator.Validate(Challenge); Assert.IsFalse(r.IsValid); Assert.AreEqual("00418", r.Errors.FirstOrDefault(x => x.PropertyName == "DatiGeneraliDocumento.Data")?.ErrorCode); Challenge.DatiGeneraliDocumento.Data = DateTime.Now; r = Validator.Validate(Challenge); Assert.IsNull(r.Errors.FirstOrDefault(x => x.PropertyName == "DatiGeneraliDocumento.Data")); } [TestMethod] public void DatiOrdineAcquistoHasChildValidator() { Validator.ShouldHaveChildValidator(x => x.DatiOrdineAcquisto, typeof(Validators.DatiOrdineAcquistoValidator)); } [TestMethod] public void DatiContrattoHasChildValidator() { Validator.ShouldHaveChildValidator(x => x.DatiContratto, typeof(FatturaElettronica.Validators.DatiContrattoValidator)); } [TestMethod] public void DatiConvenzioneHasChildValidator() { Validator.ShouldHaveChildValidator(x => x.DatiConvenzione, typeof(FatturaElettronica.Validators.DatiConvenzioneValidator)); } [TestMethod] public void DatiRicezioneHasChildValidator() { Validator.ShouldHaveChildValidator(x => x.DatiRicezione, typeof(FatturaElettronica.Validators.DatiRicezioneValidator)); } [TestMethod] public void DatiFattureCollegateHasChildValidator() { Validator.ShouldHaveChildValidator(x => x.DatiFattureCollegate, typeof(FatturaElettronica.Validators.DatiFattureCollegateValidator)); } [TestMethod] public void DatiDDTHasChildValidator() { Validator.ShouldHaveChildValidator(x => x.DatiDDT, typeof(FatturaElettronica.Validators.DatiDDTValidator)); } [TestMethod] public void DatiTrasportoHasChildValidator() { Validator.ShouldHaveDelegatePropertyChildValidator(x => x.DatiTrasporto, typeof(FatturaElettronica.Validators.DatiTrasportoValidator)); } [TestMethod] public void FatturaPrincipaleHasChildValidator() { Validator.ShouldHaveDelegatePropertyChildValidator(x => x.FatturaPrincipale, typeof(FatturaElettronica.Validators.FatturaPrincipaleValidator)); } [TestMethod] public void DatiSALHasChildValidator() { Validator.ShouldHaveChildValidator(x => x.DatiSAL, typeof(Validators.DatiSALValidator)); } } } ================================================ FILE: Test/Ordinaria/DatiOrdineAcquistoValidator.cs ================================================ using Microsoft.VisualStudio.TestTools.UnitTesting; using FatturaElettronica.Ordinaria.FatturaElettronicaBody.DatiGenerali; namespace FatturaElettronica.Test.Ordinaria { [TestClass] public class DatiDocumentoValidator : BaseDatiDocumentoValidator { } } ================================================ FILE: Test/Ordinaria/DatiPagamentoValidator.cs ================================================ using FluentValidation.TestHelper; using Microsoft.VisualStudio.TestTools.UnitTesting; using FatturaElettronica.Ordinaria.FatturaElettronicaBody.DatiPagamento; using FatturaElettronica.Tabelle; namespace FatturaElettronica.Test.Ordinaria { [TestClass] public class DatiPagamentoValidator : BaseClass { [TestMethod] public void CondizioniPagamentoIsRequired() { AssertRequired(x => x.CondizioniPagamento); } [TestMethod] public void CondizioniPagamentoOnlyAcceptsTableValues() { AssertOnlyAcceptsTableValues(x => x.CondizioniPagamento); } [TestMethod] public void DettaglioPagamentoHasChildValidator() { Validator.ShouldHaveChildValidator( x => x.DettaglioPagamento, typeof(FatturaElettronica.Validators.DettaglioPagamentoValidator)); } [TestMethod] public void DettaglioPagamentoCollectionCannotBeEmpty() { AssertCollectionCannotBeEmpty(x => x.DettaglioPagamento); } } } ================================================ FILE: Test/Ordinaria/DatiRicezioneValidator.cs ================================================ using Microsoft.VisualStudio.TestTools.UnitTesting; using FatturaElettronica.Ordinaria.FatturaElettronicaBody.DatiGenerali; namespace FatturaElettronica.Test.Ordinaria { [TestClass] public class DatiRicezioneValidator : BaseDatiDocumentoValidator { } } ================================================ FILE: Test/Ordinaria/DatiRiepilogoValidator.cs ================================================ using FluentValidation.TestHelper; using Microsoft.VisualStudio.TestTools.UnitTesting; using FatturaElettronica.Ordinaria.FatturaElettronicaBody.DatiBeniServizi; using FatturaElettronica.Tabelle; namespace FatturaElettronica.Test.Ordinaria { [TestClass] public class DatiRiepilogoValidator : BaseClass { [TestMethod] public void NaturaOnlyAcceptsTableValues() { AssertOnlyAcceptsTableValues(x => x.Natura); } [TestMethod] public void NaturaValidateAgainstError00400() { Challenge.AliquotaIVA = 0; Challenge.Natura = string.Empty; var result = Validator.TestValidate(Challenge); result.ShouldHaveValidationErrorFor(x => x.Natura).WithErrorCode("00429"); Challenge.AliquotaIVA = 0; Challenge.Natura = null; result = Validator.TestValidate(Challenge); result.ShouldHaveValidationErrorFor(x => x.Natura).WithErrorCode("00429"); Challenge.AliquotaIVA = 22m; Challenge.Natura = string.Empty; result = Validator.TestValidate(Challenge); result.ShouldNotHaveValidationErrorFor(x => x.Natura); } [TestMethod] public void NaturaValidateAgainstError00420() { Challenge.EsigibilitaIVA = "S"; Challenge.Natura = "N6.1"; var result = Validator.TestValidate(Challenge); result.ShouldHaveValidationErrorFor(x => x.Natura).WithErrorCode("00420"); Challenge.EsigibilitaIVA = "I"; result = Validator.TestValidate(Challenge); result.ShouldNotHaveValidationErrorFor(x => x.Natura); } [TestMethod] public void ImpostaValidateAgainstError00421() { Challenge.AliquotaIVA = 10; Challenge.ImponibileImporto = 70863.00m; Challenge.Imposta = 7086.29m; var result = Validator.TestValidate(Challenge); result.ShouldNotHaveValidationErrorFor(x => x.Imposta); Challenge.Imposta = 10.01m; result = Validator.TestValidate(Challenge); result.ShouldHaveValidationErrorFor(x => x.Imposta).WithErrorCode("00421"); } [TestMethod] public void EsigibilitaIVAIsOptional() { AssertOptional(x => x.EsigibilitaIVA); } [TestMethod] public void EsigibilitaIVAOnlyAcceptsTableValues() { AssertOnlyAcceptsTableValues(x => x.EsigibilitaIVA); } [TestMethod] public void RiferimentoNormativoIsRequiredWhenNaturaHasValue() { AssertOptional(x => x.RiferimentoNormativo); } [TestMethod] public void RiferimentoNormativoMinMaxLength() { AssertMinMaxLength(x => x.RiferimentoNormativo, 1, 100); } [TestMethod] public void RiferimentoNormativoMustBeLatin1Supplement() { AssertMustBeLatin1Supplement(x => x.RiferimentoNormativo); } [TestMethod] public void SpeseAccessorie() { AssertDecimalType(x => x.SpeseAccessorie, 2, 13); } [TestMethod] public void ImponibileImporto() { AssertDecimalType(x => x.ImponibileImporto, 2, 13); } [TestMethod] public void Arrotondamento() { AssertDecimalType(x => x.Arrotondamento, 8, 19); } } } ================================================ FILE: Test/Ordinaria/DatiRitenutaValidator.cs ================================================ using Microsoft.VisualStudio.TestTools.UnitTesting; using FatturaElettronica.Ordinaria.FatturaElettronicaBody.DatiGenerali; using FatturaElettronica.Tabelle; namespace FatturaElettronica.Test.Ordinaria { [TestClass] public class DatiRitenutaValidator : BaseClass { [TestMethod] public void TipoRitenutaIsRequired() { AssertRequired(x => x.TipoRitenuta); } [TestMethod] public void TipoRitenutaOnlyAcceptsTableValues() { AssertOnlyAcceptsTableValues(x => x.TipoRitenuta); } [TestMethod] public void CausalePagamentoIsRequired() { AssertRequired(x => x.CausalePagamento); } [TestMethod] public void CausalePagamentoOnlyAcceptsTableValues() { AssertOnlyAcceptsTableValues(x => x.CausalePagamento); } [TestMethod] public void ImponibileImporto() { AssertDecimalType(x => x.ImportoRitenuta, 2, 13); } } } ================================================ FILE: Test/Ordinaria/DatiSALValidator.cs ================================================ using FatturaElettronica.Ordinaria.FatturaElettronicaBody.DatiGenerali; using FluentValidation.TestHelper; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace FatturaElettronica.Test.Ordinaria { [TestClass] public class DatiSALValidator : BaseClass { [TestMethod] public void RiferimentoFaseValidatorMinMax() { Challenge.RiferimentoFase = 0; var result = Validator.TestValidate(Challenge); result.ShouldHaveValidationErrorFor(x => x.RiferimentoFase); Challenge.RiferimentoFase = 1000; result = Validator.TestValidate(Challenge); result.ShouldHaveValidationErrorFor(x => x.RiferimentoFase); Challenge.RiferimentoFase = 1; result = Validator.TestValidate(Challenge); result.ShouldNotHaveValidationErrorFor(x => x.RiferimentoFase); Challenge.RiferimentoFase = 999; result = Validator.TestValidate(Challenge); result.ShouldNotHaveValidationErrorFor(x => x.RiferimentoFase); } } } ================================================ FILE: Test/Ordinaria/DatiTrasmissioneValidator.cs ================================================ using FatturaElettronica.Ordinaria.FatturaElettronicaHeader.DatiTrasmissione; using FatturaElettronica.Tabelle; using FluentValidation.TestHelper; using Microsoft.VisualStudio.TestTools.UnitTesting; using FatturaElettronica.Validators; namespace FatturaElettronica.Test.Ordinaria { [TestClass] public class DatiTrasmissioneValidator : BaseClass { [TestMethod] public void IdTrasmittenteHasChildValidator() { Validator.ShouldHaveChildValidator(x => x.IdTrasmittente, typeof(IdTrasmittenteValidator)); } [TestMethod] public void ProgressivoInvioIsRequired() { AssertRequired(x => x.ProgressivoInvio); } [TestMethod] public void ContattiTrasmittenteHasChildValidator() { Validator.ShouldHaveDelegatePropertyChildValidator(x => x.ContattiTrasmittente, typeof(FatturaElettronica.Validators.ContattiTrasmittenteValidator)); } [TestMethod] public void ProgressivoInvioMinMaxLength() { AssertMinMaxLength(x => x.ProgressivoInvio, 1, 10); } [TestMethod] public void ProgressivoInvioMustBeBasicLatin() { AssertMustBeBasicLatin(x => x.ProgressivoInvio); } [TestMethod] public void FormatoTrasmissioneIsRequired() { AssertRequired(x => x.FormatoTrasmissione); } [TestMethod] public void FormatoTrasmissioneOnlyAcceptsTableValues() { AssertOnlyAcceptsTableValues(x => x.FormatoTrasmissione, expectedErrorCode: "00428"); } [TestMethod] public void CodiceDestinatarioIsRequired() { AssertRequired(x => x.CodiceDestinatario); } [TestMethod] public void CodiceDestinatarioMustBeValid() { Challenge.CodiceDestinatario = "hello"; var result = Validator.TestValidate(Challenge); result.ShouldHaveValidationErrorFor(x => x.CodiceDestinatario); Challenge.CodiceDestinatario = "Subm70N"; result = Validator.TestValidate(Challenge); result.ShouldHaveValidationErrorFor(x => x.CodiceDestinatario); Challenge.CodiceDestinatario = "Sub-70N"; result = Validator.TestValidate(Challenge); result.ShouldHaveValidationErrorFor(x => x.CodiceDestinatario); Challenge.CodiceDestinatario = "SUBM70N"; result = Validator.TestValidate(Challenge); result.ShouldNotHaveValidationErrorFor(x => x.CodiceDestinatario); } [TestMethod] public void CodiceDestinatarioWhenFormatoTrasmissioneHasValueFPA12() { // Quando FormatoTrasmissione = FPA12 ProgressivioInvio.Lenght = 6. Challenge.FormatoTrasmissione = Defaults.FormatoTrasmissione.PubblicaAmministrazione; AssertLength(x => x.CodiceDestinatario, 6, expectedErrorCode: "00427", filler: 'X'); } [TestMethod] public void CodiceDestinatarioWhenFormatoTrasmissioneHasValueFPR12() { // Quando FormatoTrasmissione = FPR12 ProgressivioInvio.Lenght = 7. Challenge.FormatoTrasmissione = Defaults.FormatoTrasmissione.Privati; AssertLength(x => x.CodiceDestinatario, 7, expectedErrorCode: "00427", filler: 'X'); } [TestMethod] public void PECDestinatarioIsOptional() { AssertOptional(x => x.PECDestinatario); } [TestMethod] public void PECDestinatarioMustBeValid() { Challenge.PECDestinatario = "not really"; var result = Validator.TestValidate(Challenge); result.ShouldHaveValidationErrorFor(x => x.PECDestinatario); Challenge.PECDestinatario = "not@really,com"; result = Validator.TestValidate(Challenge); result.ShouldHaveValidationErrorFor(x => x.PECDestinatario); Challenge.PECDestinatario = "test@2bbresine.it"; result = Validator.TestValidate(Challenge); result.ShouldNotHaveValidationErrorFor(x => x.PECDestinatario); Challenge.PECDestinatario = "maybe@we.can"; result = Validator.TestValidate(Challenge); result.ShouldNotHaveValidationErrorFor(x => x.PECDestinatario); } } } ================================================ FILE: Test/Ordinaria/DatiTrasportoValidator.cs ================================================ using FatturaElettronica.Ordinaria.FatturaElettronicaBody.DatiGenerali; using FatturaElettronica.Tabelle; using FluentValidation.TestHelper; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace FatturaElettronica.Test.Ordinaria { [TestClass] public class DatiTrasportoValidator : BaseClass { [TestMethod] public void DatiAnagraficiVettoreHasChildValidator() { Validator.ShouldHaveDelegatePropertyChildValidator( x => x.DatiAnagraficiVettore, typeof(FatturaElettronica.Validators.DatiAnagraficiVettoreValidator)); } [TestMethod] public void MezzoTrasportoIsOptional() { AssertOptional(x => x.MezzoTrasporto); } [TestMethod] public void MezzoTrasportoMinMaxLength() { AssertMinMaxLength(x => x.MezzoTrasporto, 1, 80); } [TestMethod] public void MezzoTrasportoMinMustBeLatin1Supplement() { AssertMustBeLatin1Supplement(x => x.MezzoTrasporto); } [TestMethod] public void CausaleTrasportoIsOptional() { AssertOptional(x => x.CausaleTrasporto); } [TestMethod] public void CausaleTrasportoMinMaxLength() { AssertMinMaxLength(x => x.CausaleTrasporto, 1, 100); } [TestMethod] public void CausaleTrasportoMinMustBeLatin1Supplement() { AssertMustBeLatin1Supplement(x => x.CausaleTrasporto); } [TestMethod] public void DescrizioneIsOptional() { AssertOptional(x => x.Descrizione); } [TestMethod] public void DescrizioneMinMaxLength() { AssertMinMaxLength(x => x.Descrizione, 1, 100); } [TestMethod] public void DescrizioneMustBeLatin1Supplement() { AssertMustBeLatin1Supplement(x => x.Descrizione); } [TestMethod] public void UnitaMisuraPesoIsOptional() { AssertOptional(x => x.UnitaMisuraPeso); } [TestMethod] public void UnitaMisuraPesoMinMaxLength() { AssertMinMaxLength(x => x.UnitaMisuraPeso, 1, 10); } [TestMethod] public void UnitaMisuraPesoMustBeBasicLatin() { AssertMustBeBasicLatin(x => x.UnitaMisuraPeso); } [TestMethod] public void TipoResaIsOptional() { AssertOptional(x => x.TipoResa); } [TestMethod] public void TipoResaOnlyAcceptsTableValues() { AssertOnlyAcceptsTableValues(x => x.TipoResa); } [TestMethod] public void IndirizzoResaHasChildValidator() { Validator.ShouldHaveDelegatePropertyChildValidator(x => x.IndirizzoResa, typeof(Validators.IndirizzoResaValidator)); } [TestMethod] public void PesoNettoMaxValue() { Challenge.PesoNetto = 10000m; var result = Validator.TestValidate(Challenge); result.ShouldHaveValidationErrorFor(x => x.PesoNetto); Challenge.PesoNetto = 9999.99m; result = Validator.TestValidate(Challenge); result.ShouldNotHaveValidationErrorFor(x => x.PesoNetto); } [TestMethod] public void PesoLordoMaxValue() { Challenge.PesoLordo = 10000m; var result = Validator.TestValidate(Challenge); result.ShouldHaveValidationErrorFor(x => x.PesoLordo); Challenge.PesoLordo = 9999.99m; result = Validator.TestValidate(Challenge); result.ShouldNotHaveValidationErrorFor(x => x.PesoLordo); } [TestMethod] public void NumeroColliMinMax() { Challenge.NumeroColli = -1; var result = Validator.TestValidate(Challenge); result.ShouldHaveValidationErrorFor(x => x.NumeroColli); Challenge.NumeroColli = 10000; result = Validator.TestValidate(Challenge); result.ShouldHaveValidationErrorFor(x => x.NumeroColli); Challenge.NumeroColli = 1; result = Validator.TestValidate(Challenge); result.ShouldNotHaveValidationErrorFor(x => x.NumeroColli); Challenge.NumeroColli = 9999; result = Validator.TestValidate(Challenge); result.ShouldNotHaveValidationErrorFor(x => x.NumeroColli); } } } ================================================ FILE: Test/Ordinaria/DatiVeicoliValidator.cs ================================================ using FatturaElettronica.Ordinaria.FatturaElettronicaBody.DatiVeicoli; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace FatturaElettronica.Test.Ordinaria { [TestClass] public class DatiVeicoliValidator : BaseClass { [TestMethod] public void TotalePercorsoIsRequired() { AssertRequired(x => x.TotalePercorso); } [TestMethod] public void TotalePercorsoMinMaxLength() { AssertMinMaxLength(x => x.TotalePercorso, 1, 15); } [TestMethod] public void TotalePercorsoMustBeBasicLatin() { AssertMustBeBasicLatin(x => x.TotalePercorso); } [TestMethod] public void DataIsRequired() { AssertRequired(x => x.Data); } } } ================================================ FILE: Test/Ordinaria/DenominazioneNomeCognomeValidator.cs ================================================ using FatturaElettronica.Common; using FluentValidation; using FluentValidation.TestHelper; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace FatturaElettronica.Test.Ordinaria { [TestClass] public abstract class DenominazioneNomeCognomeValidator : BaseClass where TClass : DenominazioneNomeCognome where TValidator : IValidator { [TestMethod] public void DenominazioneIsRequiredWhenNomeCognomeIsEmpty() { Challenge.Nome = null; Challenge.Cognome = null; AssertRequired(x => x.Denominazione, expectedErrorCode: "00200"); AssertMinMaxLength(x => x.Denominazione, 1, 80, expectedErrorCode: "00200"); AssertMustBeLatin1Supplement(x => x.Denominazione); } [TestMethod] public void DenominazioneMustBeEmptyWhenNomeCognoneIsNotEmpty() { Challenge.Nome = "nome"; Challenge.Denominazione = "x"; var result = Validator.TestValidate(Challenge); result.ShouldHaveValidationErrorFor(x => x.Denominazione).WithErrorCode("00200"); Challenge.Denominazione = null; result = Validator.TestValidate(Challenge); result.ShouldNotHaveValidationErrorFor(x => x.Denominazione); Challenge.Denominazione = string.Empty; result = Validator.TestValidate(Challenge); result.ShouldNotHaveValidationErrorFor(x => x.Denominazione); } [TestMethod] public void NomeIsRequiredWhenDenominazioneIsEmpty() { Challenge.Denominazione = null; AssertRequired(x => x.Nome, expectedErrorCode: "00200"); AssertMinMaxLength(x => x.Nome, 1, 60, expectedErrorCode: "00200"); AssertMustBeLatin1Supplement(x => x.Nome); } [TestMethod] public void NomeMustBeEmptyWhenDenominazioneIsNotEmpty() { Challenge.Denominazione = "denominazione"; Challenge.Nome = "x"; var result = Validator.TestValidate(Challenge); result.ShouldHaveValidationErrorFor(x => x.Nome).WithErrorCode("00200"); Challenge.Nome = null; result = Validator.TestValidate(Challenge); result.ShouldNotHaveValidationErrorFor(x => x.Nome); Challenge.Nome = string.Empty; result = Validator.TestValidate(Challenge); result.ShouldNotHaveValidationErrorFor(x => x.Nome); } [TestMethod] public void CognomeIsRequiredWhenDenominazioneIsEmpty() { Challenge.Denominazione = null; AssertRequired(x => x.Cognome, expectedErrorCode: "00200"); AssertMinMaxLength(x => x.Cognome, 1, 60, expectedErrorCode: "00200"); AssertMustBeLatin1Supplement(x => x.Cognome); } [TestMethod] public void CognomeMustBeEmptyWhenDenominazioneIsNotEmpty() { Challenge.Denominazione = "denominazione"; Challenge.Cognome = "x"; var result = Validator.TestValidate(Challenge); result.ShouldHaveValidationErrorFor(x => x.Cognome).WithErrorCode("00200"); Challenge.Cognome = null; result = Validator.TestValidate(Challenge); result.ShouldNotHaveValidationErrorFor(x => x.Cognome); Challenge.Cognome = string.Empty; result = Validator.TestValidate(Challenge); result.ShouldNotHaveValidationErrorFor(x => x.Cognome); } } } ================================================ FILE: Test/Ordinaria/DettaglioLineeValidator.cs ================================================ using FatturaElettronica.Ordinaria.FatturaElettronicaBody.DatiBeniServizi; using FatturaElettronica.Tabelle; using FluentValidation.TestHelper; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace FatturaElettronica.Test.Ordinaria { [TestClass] public class DettaglioLineeValidator : BaseClass { [TestMethod] public void NumeroLineaValidatorMinMax() { Challenge.NumeroLinea = 0; var result = Validator.TestValidate(Challenge); result.ShouldHaveValidationErrorFor(x => x.NumeroLinea); Challenge.NumeroLinea = 10000; result = Validator.TestValidate(Challenge); result.ShouldHaveValidationErrorFor(x => x.NumeroLinea); Challenge.NumeroLinea = 1; result = Validator.TestValidate(Challenge); result.ShouldNotHaveValidationErrorFor(x => x.NumeroLinea); Challenge.NumeroLinea = 9999; result = Validator.TestValidate(Challenge); result.ShouldNotHaveValidationErrorFor(x => x.NumeroLinea); } [TestMethod] public void TipoCessionePrestazioneIsOptional() { AssertOptional(x => x.TipoCessionePrestazione); } [TestMethod] public void TipoCessionePrestazioneOnlyAcceptsTableValues() { AssertOnlyAcceptsTableValues(x => x.TipoCessionePrestazione); } [TestMethod] public void CodiceArticoloHasCollectionValidator() { Validator.ShouldHaveChildValidator(x => x.CodiceArticolo, typeof(FatturaElettronica.Validators.CodiceArticoloValidator)); } [TestMethod] public void CodiceArticoloCollectionCanBeEmpty() { AssertCollectionCanBeEmpty(x => x.CodiceArticolo); } [TestMethod] public void DescrizioneIsRequired() { AssertRequired(x => x.Descrizione); } [TestMethod] public void DescrizioneMinMaxLength() { AssertMinMaxLength(x => x.Descrizione, 1, 1000); } [TestMethod] public void DescrizioneMustBeLatin1Supplement() { AssertMustBeLatin1Supplement(x => x.Descrizione); } [TestMethod] public void UnitaMisuraIsOptional() { AssertOptional(x => x.UnitaMisura); } [TestMethod] public void UnitaMisuraMinMaxLength() { AssertMinMaxLength(x => x.UnitaMisura, 1, 10); } [TestMethod] public void UnitaMisuraMustBeBasicLatin() { AssertMustBeBasicLatin(x => x.UnitaMisura); } [TestMethod] public void ScontoMaggioazioneHasChildValidator() { Validator.ShouldHaveChildValidator(x => x.ScontoMaggiorazione, typeof(Validators.ScontoMaggiorazioneValidator)); } [TestMethod] public void ScontoMaggiorazioneCollectionCanBeEmpty() { AssertCollectionCanBeEmpty(x => x.ScontoMaggiorazione); } [TestMethod] public void PrezzoTotaleValidatesAgainstError00423() { Challenge.PrezzoUnitario = 13.4426m; Challenge.Quantita = 2; Challenge.PrezzoTotale = 26.89m; var result = Validator.TestValidate(Challenge); result.ShouldNotHaveValidationErrorFor(x => x.PrezzoTotale); Challenge.PrezzoUnitario = 3.0246m; Challenge.Quantita = 5; Challenge.PrezzoTotale = 15.12m; result = Validator.TestValidate(Challenge); result.ShouldNotHaveValidationErrorFor(x => x.PrezzoTotale); Challenge.PrezzoUnitario = 5.7377m; Challenge.Quantita = 0.2m; Challenge.PrezzoTotale = 1.15m; result = Validator.TestValidate(Challenge); result.ShouldNotHaveValidationErrorFor(x => x.PrezzoTotale); Challenge.PrezzoUnitario = 0.0492m; Challenge.Quantita = 4; Challenge.PrezzoTotale = 0.20m; result = Validator.TestValidate(Challenge); result.ShouldNotHaveValidationErrorFor(x => x.PrezzoTotale); Challenge.PrezzoUnitario = 22; Challenge.Quantita = 4; Challenge.PrezzoTotale = 88; result = Validator.TestValidate(Challenge); result.ShouldNotHaveValidationErrorFor(x => x.PrezzoTotale); Challenge.PrezzoUnitario = 9.2425m; Challenge.Quantita = 4; Challenge.PrezzoTotale = 36.97m; result = Validator.TestValidate(Challenge); result.ShouldNotHaveValidationErrorFor(x => x.PrezzoTotale); Challenge.PrezzoUnitario = 12.235m; Challenge.Quantita = 1; Challenge.PrezzoTotale = 12.24m; result = Validator.TestValidate(Challenge); result.ShouldNotHaveValidationErrorFor(x => x.PrezzoTotale); Challenge.PrezzoUnitario = 19.30m; Challenge.Quantita = 1; Challenge.ScontoMaggiorazione.Add( new() { Tipo = "SC", Percentuale = 15m }); Challenge.PrezzoTotale = 16.41m; result = Validator.TestValidate(Challenge); result.ShouldNotHaveValidationErrorFor(x => x.PrezzoTotale); Challenge.PrezzoUnitario = 20.5m; Challenge.Quantita = 2; Challenge.PrezzoTotale = 42; result = Validator.TestValidate(Challenge); result.ShouldHaveValidationErrorFor(x => x.PrezzoTotale).WithErrorCode("00423"); // https://github.com/FatturaElettronica/FatturaElettronica.NET/issues/45 Challenge.ScontoMaggiorazione.Clear(); Challenge.PrezzoUnitario = 0.865951m; Challenge.Quantita = 98; Challenge.PrezzoTotale = 84.863198m; result = Validator.TestValidate(Challenge); result.ShouldNotHaveValidationErrorFor(x => x.PrezzoTotale); // https://github.com/FatturaElettronica/FatturaElettronica.NET/issues/66 Challenge.PrezzoUnitario = 20.5m; Challenge.Quantita = 1; Challenge.PrezzoTotale = 20.5m; result = Validator.TestValidate(Challenge); result.ShouldNotHaveValidationErrorFor(x => x.PrezzoTotale); Challenge.PrezzoTotale = 20.51m; result = Validator.TestValidate(Challenge); result.ShouldNotHaveValidationErrorFor(x => x.PrezzoTotale); Challenge.PrezzoTotale = 20.52m; result = Validator.TestValidate(Challenge); result.ShouldHaveValidationErrorFor(x => x.PrezzoTotale).WithErrorCode("00423"); Challenge.PrezzoTotale = 20.49m; result = Validator.TestValidate(Challenge); result.ShouldNotHaveValidationErrorFor(x => x.PrezzoTotale); Challenge.PrezzoTotale = 20.48m; result = Validator.TestValidate(Challenge); result.ShouldHaveValidationErrorFor(x => x.PrezzoTotale).WithErrorCode("00423"); // https://github.com/FatturaElettronica/FatturaElettronica.NET/issues/71 Challenge.ScontoMaggiorazione.Clear(); Challenge.ScontoMaggiorazione.Add(new() { Importo = 0, Tipo = "SC" }); Challenge.PrezzoUnitario = 1m; Challenge.Quantita = 1; Challenge.PrezzoTotale = 1m; result = Validator.TestValidate(Challenge); result.ShouldNotHaveValidationErrorFor(x => x.PrezzoTotale); //numero massimo di decimali Challenge.ScontoMaggiorazione.Clear(); Challenge.PrezzoUnitario = 0.12345678m; Challenge.Quantita = 1000000000; Challenge.PrezzoTotale = Challenge.PrezzoUnitario * Challenge.Quantita.Value; result = Validator.TestValidate(Challenge); result.ShouldNotHaveValidationErrorFor(x => x.PrezzoTotale); //Errore 00423 per prezzo unitario per arrotondamento Challenge.ScontoMaggiorazione.Clear(); Challenge.PrezzoUnitario = 0.123456789m; Challenge.Quantita = 10000000000; Challenge.PrezzoTotale = Challenge.PrezzoUnitario * Challenge.Quantita.Value; result = Validator.TestValidate(Challenge); result.ShouldHaveValidationErrorFor(x => x.PrezzoTotale).WithErrorCode("00423"); // https://github.com/FatturaElettronica/FatturaElettronica.NET/issues/394 Challenge.PrezzoUnitario = 0.093m; Challenge.Quantita = 200; Challenge.PrezzoTotale = 9.66m; Challenge.ScontoMaggiorazione.Add(new() { Tipo = "SC", Percentuale = 48m }); result = Validator.TestValidate(Challenge); result.ShouldNotHaveValidationErrorFor(x => x.PrezzoTotale); } [TestMethod] public void RitenutaIsOptional() { AssertOptional(x => x.Ritenuta); } [TestMethod] public void RitenutaOnlyAccepstSIValue() { AssertOnlyAcceptsSIValue(x => x.Ritenuta); } [TestMethod] public void NaturaOnlyAcceptsTableValues() { AssertOnlyAcceptsTableValues(x => x.Natura); } [TestMethod] public void NaturaValidateAgainstError00400() { Challenge.AliquotaIVA = 0; Challenge.Natura = string.Empty; var result = Validator.TestValidate(Challenge); result.ShouldHaveValidationErrorFor(x => x.Natura).WithErrorCode("00400"); Challenge.AliquotaIVA = 0; Challenge.Natura = null; result = Validator.TestValidate(Challenge); result.ShouldHaveValidationErrorFor(x => x.Natura).WithErrorCode("00400"); Challenge.AliquotaIVA = 22m; Challenge.Natura = string.Empty; result = Validator.TestValidate(Challenge); result.ShouldNotHaveValidationErrorFor(x => x.Natura); } [TestMethod] public void RiferimentoAmministrazioneIsOptional() { AssertOptional(x => x.RiferimentoAmministrazione); } [TestMethod] public void RiferimentoAmministrazioneMinMaxLength() { AssertMinMaxLength(x => x.RiferimentoAmministrazione, 1, 20); } [TestMethod] public void RiferimentoAmministrazioneMustBeBasicLatin() { AssertMustBeBasicLatin(x => x.RiferimentoAmministrazione); } [TestMethod] public void AltriDatiGestionaliHasChildValidator() { Validator.ShouldHaveChildValidator(x => x.AltriDatiGestionali, typeof(FatturaElettronica.Validators.AltriDatiGestionaliValidator)); } [TestMethod] public void AltriDatiGestionaliCollectionCanBeEmpty() { AssertCollectionCanBeEmpty(x => x.AltriDatiGestionali); } [TestMethod] public void QuantitaIsOptional() { AssertOptional(x => x.Quantita); } [TestMethod] public void QuantitaCannotBeNegative() { Challenge.Quantita = -1; var result = Validator.TestValidate(Challenge); result.ShouldHaveValidationErrorFor(x => x.Quantita); Challenge.Quantita = 0; result = Validator.TestValidate(Challenge); result.ShouldNotHaveValidationErrorFor(x => x.Quantita); } [TestMethod] public void PrezzoUnitario() { AssertDecimalType(x => x.PrezzoUnitario, 8, 19); } [TestMethod] public void AliquotaIvaShouldBeLessOrEqualTo100() { Challenge.AliquotaIVA = 101; var result = Validator.TestValidate(Challenge); result.ShouldHaveValidationErrorFor(x => x.AliquotaIVA); Challenge.AliquotaIVA = 100; result = Validator.TestValidate(Challenge); result.ShouldNotHaveValidationErrorFor(x => x.AliquotaIVA); } } } ================================================ FILE: Test/Ordinaria/DettaglioPagamentoValidator.cs ================================================ using FatturaElettronica.Ordinaria.FatturaElettronicaBody.DatiPagamento; using FatturaElettronica.Tabelle; using FluentValidation.TestHelper; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace FatturaElettronica.Test.Ordinaria { [TestClass] public class DettaglioPagamentoValidator : BaseClass { [TestMethod] public void BeneficiarioIsOptional() { AssertOptional(x => x.Beneficiario); } [TestMethod] public void BeneficiarioMisuraMinMaxLength() { AssertMinMaxLength(x => x.Beneficiario, 1, 200); } [TestMethod] public void BeneficiarioMustBeLatin1Supplement() { AssertMustBeLatin1Supplement(x => x.Beneficiario); } [TestMethod] public void ModalitaPagamentoIsRequired() { AssertRequired(x => x.ModalitaPagamento); } [TestMethod] public void ModalitaPagamentoOnlyAcceptsTableValues() { AssertOnlyAcceptsTableValues(x => x.ModalitaPagamento); } [TestMethod] public void CodUfficioPostaleIsOptional() { AssertOptional(x => x.CodUfficioPostale); } [TestMethod] public void CodUfficioPostaleMinMaxLength() { AssertMinMaxLength(x => x.CodUfficioPostale, 1, 20); } [TestMethod] public void CodUfficioPostaleMustBeBasicLatin() { AssertMustBeBasicLatin(x => x.CodUfficioPostale); } [TestMethod] public void CognomeQuietanzanteIsOptional() { AssertOptional(x => x.CognomeQuietanzante); } [TestMethod] public void CognomeQuietanzanteMinMaxLength() { AssertMinMaxLength(x => x.CognomeQuietanzante, 1, 60); } [TestMethod] public void CognomeQuietanzanteMustBeLatin1Supplement() { AssertMustBeLatin1Supplement(x => x.CognomeQuietanzante); } [TestMethod] public void NomeQuietanzanteIsOptional() { AssertOptional(x => x.NomeQuietanzante); } [TestMethod] public void NomeQuietanzanteMinMaxLength() { AssertMinMaxLength(x => x.NomeQuietanzante, 1, 60); } [TestMethod] public void NomeQuietanzanteMustBeLatin1Supplement() { AssertMustBeLatin1Supplement(x => x.NomeQuietanzante); } [TestMethod] public void CFQuietanzanteIsOptional() { AssertOptional(x => x.CFQuietanzante); } [TestMethod] public void CFQuietanzanteMinMaxLength() { AssertMinMaxLength(x => x.CFQuietanzante, 1, 16); } [TestMethod] public void TitoloQuietanzanteIsOptional() { AssertOptional(x => x.TitoloQuietanzante); } [TestMethod] public void TitoloQuietanzanteMinMaxLength() { AssertMinMaxLength(x => x.TitoloQuietanzante, 2, 10); } [TestMethod] public void TitoloQuietanzanteMustBeBasicLatin() { AssertMustBeBasicLatin(x => x.TitoloQuietanzante); } [TestMethod] public void IstitutoFinanziarioIsOptional() { AssertOptional(x => x.IstitutoFinanziario); } [TestMethod] public void IstitutoFinanziarioMinMaxLength() { AssertMinMaxLength(x => x.IstitutoFinanziario, 1, 80); } [TestMethod] public void IstitutoFinanziarioMustBeLatin1Supplement() { AssertMustBeLatin1Supplement(x => x.IstitutoFinanziario); } [TestMethod] public void IBANIsOptional() { AssertOptional(x => x.IBAN); } [TestMethod] public void IBANMustBeValid() { Challenge.IBAN = "hello"; var result = Validator.TestValidate(Challenge); result.ShouldHaveValidationErrorFor(x => x.IBAN); Challenge.IBAN = "IBAN IT17 X060 5502 1000 0000 1234 567"; result = Validator.TestValidate(Challenge); result.ShouldHaveValidationErrorFor(x => x.IBAN); Challenge.IBAN = "ITQ0103071210000000011561"; result = Validator.TestValidate(Challenge); result.ShouldHaveValidationErrorFor(x => x.IBAN); } [TestMethod] public void ABIIsOptional() { AssertOptional(x => x.ABI); } [TestMethod] public void ABIMinMaxLength() { AssertLength(x => x.ABI, 5); } [TestMethod] public void CABIsOptional() { AssertOptional(x => x.CAB); } [TestMethod] public void CABMinMaxLength() { AssertLength(x => x.CAB, 5); } [TestMethod] public void BICIsOptional() { AssertOptional(x => x.BIC); } [TestMethod] public void BICMinMaxLength() { AssertMinMaxLength(x => x.BIC, 8, 11); } [TestMethod] public void CodicePagamentoIsOptional() { AssertOptional(x => x.CodicePagamento); } [TestMethod] public void CodicePagamentoMinMaxLength() { AssertMinMaxLength(x => x.CodicePagamento, 1, 60); } [TestMethod] public void CodicePagamentoMustBeBasicLatin() { AssertMustBeBasicLatin(x => x.CodicePagamento); } [TestMethod] public void ScontoPagamentoAnticipato() { AssertDecimalType(x => x.ScontoPagamentoAnticipato, 2, 13); } [TestMethod] public void PenalitaPagamentiRitardati() { AssertDecimalType(x => x.PenalitaPagamentiRitardati, 2, 13); } [TestMethod] public void ImportoPagamento() { AssertDecimalType(x => x.ImportoPagamento, 2, 13); } [TestMethod] public void GiorniTerminiPagamentoMinMax() { Challenge.GiorniTerminiPagamento = -1; var result = Validator.TestValidate(Challenge); result.ShouldHaveValidationErrorFor(x => x.GiorniTerminiPagamento); Challenge.GiorniTerminiPagamento = 1000; result = Validator.TestValidate(Challenge); result.ShouldHaveValidationErrorFor(x => x.GiorniTerminiPagamento); Challenge.GiorniTerminiPagamento = 1; result = Validator.TestValidate(Challenge); result.ShouldNotHaveValidationErrorFor(x => x.GiorniTerminiPagamento); Challenge.GiorniTerminiPagamento = 999; result = Validator.TestValidate(Challenge); result.ShouldNotHaveValidationErrorFor(x => x.GiorniTerminiPagamento); } } } ================================================ FILE: Test/Ordinaria/FatturaCreateInstance.cs ================================================ using FatturaElettronica.Defaults; using FatturaElettronica.Ordinaria; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace FatturaElettronica.Test.Ordinaria { [TestClass] public class FatturaCreateInstance { FatturaBase _challenge; [TestMethod] public void CreatePubblicaAmministrazioneInstance() { _challenge = FatturaOrdinaria.CreateInstance(Instance.PubblicaAmministrazione); Assert.AreEqual(FormatoTrasmissione.PubblicaAmministrazione, ((FatturaOrdinaria) _challenge).FatturaElettronicaHeader.DatiTrasmissione.FormatoTrasmissione); } [TestMethod] public void CreatePrivatiInstance() { _challenge = FatturaOrdinaria.CreateInstance(Instance.Privati); Assert.AreEqual(FormatoTrasmissione.Privati, ((FatturaOrdinaria) _challenge).FatturaElettronicaHeader.DatiTrasmissione.FormatoTrasmissione); Assert.AreEqual("0000000", ((FatturaOrdinaria) _challenge).FatturaElettronicaHeader.DatiTrasmissione.CodiceDestinatario); } } } ================================================ FILE: Test/Ordinaria/FatturaElettronicaBodyValidator.cs ================================================ using System.Linq; using FatturaElettronica.Extensions; using FatturaElettronica.Ordinaria.FatturaElettronicaBody; using FatturaElettronica.Resources; using FluentValidation.TestHelper; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace FatturaElettronica.Test.Ordinaria { [TestClass] public class FatturaElettronicaBodyValidator : BaseClass { [TestMethod] public void DatiGeneraliHasChildValidator() { Validator.ShouldHaveChildValidator( x => x.DatiGenerali, typeof(FatturaElettronica.Validators.DatiGeneraliValidator)); } [TestMethod] public void DatiBeniServiziHasChildValidator() { Validator.ShouldHaveChildValidator( x => x.DatiBeniServizi, typeof(FatturaElettronica.Validators.DatiBeniServiziValidator)); } [TestMethod] public void DatiBeniServiziCannotBeEmpty() { var r = Validator.Validate(Challenge); Assert.AreEqual(ValidatorMessages.DatiBeniServiziEObbligatorio, r.Errors.FirstOrDefault(x => x.PropertyName == "DatiBeniServizi")?.ErrorMessage); } [TestMethod] public void TipoDocumentoValidateAgainstError00474() { Challenge.DatiGenerali.DatiGeneraliDocumento.TipoDocumento = "TD21"; Challenge.DatiBeniServizi.DettaglioLinee.Add(new() {AliquotaIVA = 1m}); Challenge.DatiBeniServizi.DettaglioLinee.Add(new() {AliquotaIVA = 0m}); Assert.IsNotNull(Challenge.Validate().Errors.FirstOrDefault(x => x.ErrorCode == "00474")); Challenge.DatiGenerali.DatiGeneraliDocumento.TipoDocumento = "TD01"; Assert.IsNull(Challenge.Validate().Errors.FirstOrDefault(x => x.ErrorCode == "00474")); Challenge.DatiGenerali.DatiGeneraliDocumento.TipoDocumento = "TD21"; Challenge.DatiBeniServizi.DettaglioLinee[1].AliquotaIVA = 2m; Assert.IsNull(Challenge.Validate().Errors.FirstOrDefault(x => x.ErrorCode == "00474")); } [TestMethod] public void DatiRitenutaValidateAgainstError00411() { Challenge.DatiBeniServizi.DettaglioLinee.Add(new() {Ritenuta = "SI"}); var r = Validator.Validate(Challenge); Assert.AreEqual("00411", r.Errors.FirstOrDefault(x => x.PropertyName == "DatiGenerali.DatiGeneraliDocumento.DatiRitenuta") ?.ErrorCode); Challenge.DatiBeniServizi.DettaglioLinee[0].Ritenuta = null; r = Validator.Validate(Challenge); Assert.IsNull(r.Errors.FirstOrDefault(x => x.PropertyName == "DatiGenerali.DatiGeneraliDocumento.DatiRitenuta")); } [TestMethod] public void DatiRitenutaValidateAgainstError00422() { Challenge.DatiBeniServizi.DettaglioLinee.Add(new() {AliquotaIVA = 10m, PrezzoTotale = 100m}); Challenge.DatiBeniServizi.DatiRiepilogo.Add(new() { AliquotaIVA = 10m, ImponibileImporto = 101m }); var r = Validator.Validate(Challenge); Assert.AreEqual("00422", r.Errors.FirstOrDefault(x => x.PropertyName == "DatiBeniServizi.DatiRiepilogo")?.ErrorCode); Challenge.DatiBeniServizi.DatiRiepilogo[0].ImponibileImporto = 100m; r = Validator.Validate(Challenge); Assert.IsNull(r.Errors.FirstOrDefault(x => x.PropertyName == "DatiBeniServizi.DatiRiepilogo")); } [TestMethod] public void DatiRitenutaValidateAgainstError00419() { Challenge.DatiBeniServizi.DettaglioLinee.Add(new() {AliquotaIVA = 1}); Challenge.DatiBeniServizi.DettaglioLinee.Add(new() {AliquotaIVA = 2}); Challenge.DatiBeniServizi.DettaglioLinee.Add(new() {AliquotaIVA = 3}); Challenge.DatiGenerali.DatiGeneraliDocumento.DatiCassaPrevidenziale.Add( new() {AliquotaIVA = 4}); Challenge.DatiBeniServizi.DatiRiepilogo.Add(new() {AliquotaIVA = 1}); Challenge.DatiBeniServizi.DatiRiepilogo.Add(new() {AliquotaIVA = 2}); Challenge.DatiBeniServizi.DatiRiepilogo.Add(new() {AliquotaIVA = 3}); var r = Validator.Validate(Challenge); Assert.AreEqual("00419", r.Errors.FirstOrDefault(x => x.PropertyName == "DatiBeniServizi.DatiRiepilogo")?.ErrorCode); Challenge.DatiBeniServizi.DatiRiepilogo.Add(new() {AliquotaIVA = 4}); r = Validator.Validate(Challenge); Assert.IsNull(r.Errors.FirstOrDefault(x => x.PropertyName == "DatiBeniServizi.DatiRiepilogo")); } [TestMethod] public void DatiVeicoliHasChildValidator() { Validator.ShouldHaveChildValidator( x => x.DatiGenerali, typeof(FatturaElettronica.Validators.DatiGeneraliValidator)); } [TestMethod] public void DatiPagamentoHasChildValidator() { Validator.ShouldHaveChildValidator( x => x.DatiPagamento, typeof(FatturaElettronica.Validators.DatiPagamentoValidator)); } [TestMethod] public void AllegatiHasChildValidator() { Validator.ShouldHaveChildValidator( x => x.Allegati, typeof(FatturaElettronica.Validators.AllegatiValidator)); } } } ================================================ FILE: Test/Ordinaria/FatturaElettronicaHeaderValidator.cs ================================================ using System.Linq; using FatturaElettronica.Ordinaria.FatturaElettronicaHeader; using FatturaElettronica.Tabelle; using FluentValidation.TestHelper; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace FatturaElettronica.Test.Ordinaria { [TestClass] public class FatturaElettronicaHeaderValidator : BaseClass { [TestMethod] public void DatiTramissioneHasChildValidator() { Validator.ShouldHaveChildValidator( x => x.DatiTrasmissione, typeof(FatturaElettronica.Validators.DatiTrasmissioneValidator)); } [TestMethod] public void CedentePrestatoreHasChildValidator() { Validator.ShouldHaveChildValidator( x => x.CedentePrestatore, typeof(FatturaElettronica.Validators.CedentePrestatoreValidator)); } [TestMethod] public void RappresentanteFiscaleHasChildValidator() { Validator.ShouldHaveDelegatePropertyChildValidator( x => x.Rappresentante, typeof(FatturaElettronica.Validators.RappresentanteFiscaleValidator)); } [TestMethod] public void CessionarioCommittenteHasChildValidator() { Validator.ShouldHaveChildValidator( x => x.CessionarioCommittente, typeof(FatturaElettronica.Validators.CessionarioCommittenteValidator)); } [TestMethod] public void TerzoIntermediarioHasChildValidator() { Validator.ShouldHaveDelegatePropertyChildValidator( x => x.TerzoIntermediarioOSoggettoEmittente, typeof(FatturaElettronica.Validators.TerzoIntermediarioOSoggettoEmittenteValidator)); } [TestMethod] public void SoggettoEmittenteIsOptional() { AssertOptional(x => x.SoggettoEmittente); } [TestMethod] public void SoggettoEmittenteOnlyAcceptsTableValues() { AssertOnlyAcceptsTableValues(x => x.SoggettoEmittente); } [TestMethod] public void HeaderValidateAgainstError00313() { Challenge.CessionarioCommittente.DatiAnagrafici.IdFiscaleIVA.IdPaese = "IT"; Challenge.DatiTrasmissione.CodiceDestinatario = "XXXXXXX"; var result = Validator.Validate(Challenge); Assert.IsNotNull(result.Errors.FirstOrDefault(x => x.ErrorCode == "00313")); Challenge.CessionarioCommittente.DatiAnagrafici.IdFiscaleIVA.IdPaese = "FR"; result = Validator.Validate(Challenge); Assert.IsNull(result.Errors.FirstOrDefault(x => x.ErrorCode == "00313")); Challenge.CessionarioCommittente.DatiAnagrafici.IdFiscaleIVA.IdPaese = "IT"; Challenge.DatiTrasmissione.CodiceDestinatario = "0123456"; result = Validator.Validate(Challenge); Assert.IsNull(result.Errors.FirstOrDefault(x => x.ErrorCode == "00313")); } [TestMethod] public void HeaderValidateAgainstError00476() { Challenge.CessionarioCommittente.DatiAnagrafici.IdFiscaleIVA.IdPaese = "FR"; Challenge.CedentePrestatore.DatiAnagrafici.IdFiscaleIVA.IdPaese = "FR"; var result = Validator.Validate(Challenge); Assert.IsNotNull(result.Errors.FirstOrDefault(x => x.ErrorCode == "00476")); Challenge.CessionarioCommittente.DatiAnagrafici.IdFiscaleIVA.IdPaese = "IT"; Challenge.CedentePrestatore.DatiAnagrafici.IdFiscaleIVA.IdPaese = "FR"; result = Validator.Validate(Challenge); Assert.IsNull(result.Errors.FirstOrDefault(x => x.ErrorCode == "00476")); Challenge.CessionarioCommittente.DatiAnagrafici.IdFiscaleIVA.IdPaese = "FT"; Challenge.CedentePrestatore.DatiAnagrafici.IdFiscaleIVA.IdPaese = "IT"; result = Validator.Validate(Challenge); Assert.IsNull(result.Errors.FirstOrDefault(x => x.ErrorCode == "00476")); Challenge.CedentePrestatore.DatiAnagrafici.IdFiscaleIVA.IdPaese = "IT"; Challenge.CessionarioCommittente.DatiAnagrafici.IdFiscaleIVA.IdPaese = ""; result = Validator.Validate(Challenge); Assert.IsNull(result.Errors.FirstOrDefault(x => x.ErrorCode == "00476")); Challenge.CedentePrestatore.DatiAnagrafici.IdFiscaleIVA.IdPaese = "IT"; Challenge.CessionarioCommittente.DatiAnagrafici.IdFiscaleIVA.IdPaese = null; result = Validator.Validate(Challenge); Assert.IsNull(result.Errors.FirstOrDefault(x => x.ErrorCode == "00476")); } } } ================================================ FILE: Test/Ordinaria/FatturaPrincipaleValidator.cs ================================================ using FatturaElettronica.Ordinaria.FatturaElettronicaBody.DatiGenerali; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace FatturaElettronica.Test.Ordinaria { [TestClass] public class FatturaPrincipaleValidator : BaseClass { [TestMethod] public void NumeroFatturaPrincipaleIsRequired() { AssertRequired(x => x.NumeroFatturaPrincipale); } [TestMethod] public void NumeroFatturaPrinicipaleMinMaxLength() { AssertMinMaxLength(x => x.NumeroFatturaPrincipale, 1, 20); } [TestMethod] public void NumeroFatturaPrincipaleMustBeBasicLatin() { AssertMustBeBasicLatin(x => x.NumeroFatturaPrincipale); } [TestMethod] public void DataFatturaPrincipaleIsRequired() { AssertRequired(x => x.DataFatturaPrincipale); } } } ================================================ FILE: Test/Ordinaria/FatturaValidator.cs ================================================ using System.Collections.Generic; using System.Linq; using FatturaElettronica.Common; using FatturaElettronica.Extensions; using FatturaElettronica.Ordinaria; using FatturaElettronica.Ordinaria.FatturaElettronicaBody; using FluentValidation.TestHelper; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace FatturaElettronica.Test.Ordinaria { [TestClass] public class FatturaValidator : BaseClass { [TestInitialize] public new void Init() { Validator = new(); Challenge = new(); } [TestMethod] public void FatturaElettronicaHeaderHasChildValidator() { Validator.ShouldHaveChildValidator( x => x.FatturaElettronicaHeader, typeof(Validators.FatturaElettronicaHeaderValidator)); } [TestMethod] public void FatturaElettronicaBodyHasChildValidator() { Validator.ShouldHaveChildValidator( x => x.FatturaElettronicaBody, typeof(Validators.FatturaElettronicaBodyValidator)); } [TestMethod] public void FatturaValidateAgainstError00475() { var tipiDocumento = new[] { "TD16", "TD17", "TD18", "TD19", "TD20", "TD22", "TD23" }; var datiAnagrafici = Challenge.FatturaElettronicaHeader.CessionarioCommittente.DatiAnagrafici; var idEmpty = new IdFiscaleIVA(); var id123 = new IdFiscaleIVA { IdPaese = "IT", IdCodice = "123" }; foreach (var tipoDocumento in tipiDocumento) { Challenge.FatturaElettronicaBody.Clear(); var body = new FatturaElettronicaBody(); body.DatiGenerali.DatiGeneraliDocumento.TipoDocumento = tipoDocumento; Challenge.FatturaElettronicaBody.Add(body); datiAnagrafici.IdFiscaleIVA = idEmpty; var result = Challenge.Validate(); Assert.IsNotNull(result.Errors.FirstOrDefault(x => x.ErrorCode == "00475")); datiAnagrafici.IdFiscaleIVA = id123; result = Challenge.Validate(); Assert.IsNull(result.Errors.FirstOrDefault(x => x.ErrorCode == "00475")); } } [TestMethod] public void FatturaValidateAgainstError00473() { var tipiDocumento = new[] { "TD17", "TD18", "TD19", "TD28" }; var cedente = Challenge.FatturaElettronicaHeader.CedentePrestatore.DatiAnagrafici; cedente.IdFiscaleIVA = new() { IdPaese = "IT" }; var body = new FatturaElettronicaBody(); Challenge.FatturaElettronicaBody.Add(body); foreach (var tipoDocumento in tipiDocumento) { body.DatiGenerali.DatiGeneraliDocumento.TipoDocumento = tipoDocumento; Assert.IsNotNull(Challenge.Validate().Errors.FirstOrDefault(x => x.ErrorCode == "00473")); } body.DatiGenerali.DatiGeneraliDocumento.TipoDocumento = "TD01"; Assert.IsNull(Challenge.Validate().Errors.FirstOrDefault(x => x.ErrorCode == "00473")); cedente.IdFiscaleIVA = new() { IdPaese = "SM" }; foreach (var tipoDocumento in tipiDocumento) { body.DatiGenerali.DatiGeneraliDocumento.TipoDocumento = tipoDocumento; Assert.IsNull(Challenge.Validate().Errors.FirstOrDefault(x => x.ErrorCode == "00473")); } } [TestMethod] public void FatturaValidateAgainstError00472() { var cedente = Challenge.FatturaElettronicaHeader.CedentePrestatore.DatiAnagrafici; var cessionario = Challenge.FatturaElettronicaHeader.CessionarioCommittente.DatiAnagrafici; var id123 = new IdFiscaleIVA { IdPaese = "IT", IdCodice = "123" }; var id456 = new IdFiscaleIVA { IdPaese = "IT", IdCodice = "456" }; var tipiDocumento = new[] { "TD21", "TD27" }; foreach (var tipoDocumento in tipiDocumento) { var body = new FatturaElettronicaBody(); body.DatiGenerali.DatiGeneraliDocumento.TipoDocumento = tipoDocumento; Challenge.FatturaElettronicaBody.Add(body); cedente.CodiceFiscale="123"; cessionario.CodiceFiscale = "123"; Assert.IsNull(Challenge.Validate().Errors.FirstOrDefault(x => x.ErrorCode == "00472")); cedente.CodiceFiscale = null; cessionario.CodiceFiscale = null; cedente.IdFiscaleIVA = id123; cessionario.IdFiscaleIVA = id456; Assert.IsNotNull(Challenge.Validate().Errors.FirstOrDefault(x => x.ErrorCode == "00472")); cessionario.IdFiscaleIVA = id123; Assert.IsNull(Challenge.Validate().Errors.FirstOrDefault(x => x.ErrorCode == "00472")); cedente.CodiceFiscale = "123"; cessionario.CodiceFiscale = "456"; Assert.IsNotNull(Challenge.Validate().Errors.FirstOrDefault(x => x.ErrorCode == "00472")); cedente.CodiceFiscale = "123"; Assert.IsNotNull(Challenge.Validate().Errors.FirstOrDefault(x => x.ErrorCode == "00472")); // https://github.com/FatturaElettronica/FatturaElettronica.NET/issues/396 cedente.IdFiscaleIVA = id123; cessionario.IdFiscaleIVA = id123; cessionario.CodiceFiscale = null; Assert.IsNull(Challenge.Validate().Errors.FirstOrDefault(x => x.ErrorCode == "00472")); cessionario.CodiceFiscale = ""; Assert.IsNull(Challenge.Validate().Errors.FirstOrDefault(x => x.ErrorCode == "00472")); body.DatiGenerali.DatiGeneraliDocumento.TipoDocumento = "TD01"; Assert.IsNull(Challenge.Validate().Errors.FirstOrDefault(x => x.ErrorCode == "00472")); } } [TestMethod] public void FatturaValidateAgainstError00471() { var tipiDocumento = new[] { "TD01", "TD02", "TD03", "TD06", "TD16", "TD17", "TD18", "TD19", "TD20", "TD24", "TD25", "TD28" }; var cedente = Challenge.FatturaElettronicaHeader.CedentePrestatore.DatiAnagrafici; var cessionario = Challenge.FatturaElettronicaHeader.CessionarioCommittente.DatiAnagrafici; var id123 = new IdFiscaleIVA { IdPaese = "IT", IdCodice = "123" }; var id456 = new IdFiscaleIVA { IdPaese = "IT", IdCodice = "456" }; foreach (var tipoDocumento in tipiDocumento) { var body = new FatturaElettronicaBody(); body.DatiGenerali.DatiGeneraliDocumento.TipoDocumento = tipoDocumento; Challenge.FatturaElettronicaBody.Add(body); cedente.IdFiscaleIVA = id123; cessionario.IdFiscaleIVA = id123; var result = Challenge.Validate(); Assert.IsNotNull(result.Errors.FirstOrDefault(x => x.ErrorCode == "00471")); cedente.IdFiscaleIVA = id456; result = Challenge.Validate(); Assert.IsNull(result.Errors.FirstOrDefault(x => x.ErrorCode == "00471")); cedente.IdFiscaleIVA = new(); cessionario.IdFiscaleIVA = new(); result = Challenge.Validate(); Assert.IsNotNull(result.Errors.FirstOrDefault(x => x.ErrorCode == "00471")); } } [TestMethod] public void BodyValidateAgainstError00444() { var body = new FatturaElettronicaBody(); body.DatiBeniServizi.DettaglioLinee.Add(new() { Natura = "N1" }); body.DatiBeniServizi.DettaglioLinee.Add(new() { Natura = "N2" }); body.DatiGenerali.DatiGeneraliDocumento.DatiCassaPrevidenziale.Add( new() { Natura = "N3" }); body.DatiBeniServizi.DatiRiepilogo.Add(new() { Natura = "N1" }); Challenge.FatturaElettronicaBody.Add(body); var result = Validator.Validate(Challenge); Assert.IsNotNull(result.Errors.FirstOrDefault(x => x.ErrorCode == "00444")); body.DatiBeniServizi.DatiRiepilogo.Add(new() { Natura = "N2" }); Assert.IsNotNull(result.Errors.FirstOrDefault(x => x.ErrorCode == "00444")); body.DatiBeniServizi.DatiRiepilogo.Add(new() { Natura = "N3" }); result = Validator.Validate(Challenge); Assert.IsNull(result.Errors.FirstOrDefault(x => x.ErrorCode == "00444")); body.DatiBeniServizi.DettaglioLinee.Add(new() { Natura = null }); result = Validator.Validate(Challenge); Assert.IsNotNull(result.Errors.FirstOrDefault(x => x.ErrorCode == "00444")); body.DatiBeniServizi.DatiRiepilogo.Add(new() { Natura = null }); result = Validator.Validate(Challenge); Assert.IsNull(result.Errors.FirstOrDefault(x => x.ErrorCode == "00444")); } [TestMethod] public void BodyValidateAgainstError00443() { var body = new FatturaElettronicaBody(); body.DatiBeniServizi.DettaglioLinee.Add(new() { AliquotaIVA = 1m }); body.DatiBeniServizi.DettaglioLinee.Add(new() { AliquotaIVA = 2m }); body.DatiGenerali.DatiGeneraliDocumento.DatiCassaPrevidenziale.Add( new() { AliquotaIVA = 3m }); body.DatiBeniServizi.DatiRiepilogo.Add(new() { AliquotaIVA = 1m }); Challenge.FatturaElettronicaBody.Add(body); var result = Validator.Validate(Challenge); Assert.IsNotNull(result.Errors.FirstOrDefault(x => x.ErrorCode == "00443")); body.DatiBeniServizi.DatiRiepilogo.Add(new() { AliquotaIVA = 2m }); Assert.IsNotNull(result.Errors.FirstOrDefault(x => x.ErrorCode == "00443")); body.DatiBeniServizi.DatiRiepilogo.Add(new() { AliquotaIVA = 3m }); result = Validator.Validate(Challenge); Assert.IsNull(result.Errors.FirstOrDefault(x => x.ErrorCode == "00443")); body.DatiBeniServizi.DatiRiepilogo.Add(new() { AliquotaIVA = 4m }); result = Validator.Validate(Challenge); Assert.IsNotNull(result.Errors.FirstOrDefault(x => x.ErrorCode == "00443")); } [TestMethod] public void BodyValidateAgainstError00401() { var tipiDocumento = new[] { "TD01", "TD02", "TD03", "TD06", "TD17", "TD18", "TD19", "TD20", "TD24", "TD25", "TD28" }; foreach (var tipoDocumento in tipiDocumento) { var body = new FatturaElettronicaBody(); body.DatiBeniServizi.DettaglioLinee.Add(new() { AliquotaIVA = 1m, Natura = "N6.1" }); body.DatiGenerali.DatiGeneraliDocumento.TipoDocumento = tipoDocumento; Challenge.FatturaElettronicaBody = new List() { body }; var result = Challenge.Validate(); Assert.IsNotNull(result.Errors.FirstOrDefault(x => x.ErrorCode == "00401")); body = new FatturaElettronicaBody(); body.DatiBeniServizi.DettaglioLinee.Add(new() { AliquotaIVA = 0m, Natura = "N6.1" }); body.DatiGenerali.DatiGeneraliDocumento.TipoDocumento = tipoDocumento; Challenge.FatturaElettronicaBody = new List() { body }; result = Challenge.Validate(); Assert.IsNull(result.Errors.FirstOrDefault(x => x.ErrorCode == "00401")); } var bodyTD16 = new FatturaElettronicaBody(); bodyTD16.DatiGenerali.DatiGeneraliDocumento.TipoDocumento = "TD16"; bodyTD16.DatiBeniServizi.DettaglioLinee.Add(new() { AliquotaIVA = 1m, Natura = "N6.1" }); Challenge.FatturaElettronicaBody = new List() { bodyTD16 }; var resultTD16 = Challenge.Validate(); Assert.IsNull(resultTD16.Errors.FirstOrDefault(x => x.ErrorCode == "00401")); } [TestMethod] public void BodyValidateAgainstError00430() { var tipiDocumento = new[] { "TD01", "TD02", "TD03", "TD06", "TD17", "TD18", "TD19", "TD20", "TD24", "TD25", "TD28" }; foreach (var tipoDocumento in tipiDocumento) { var body = new FatturaElettronicaBody(); body.DatiBeniServizi.DatiRiepilogo.Add(new() { AliquotaIVA = 1m, Natura = "N6.1" }); body.DatiGenerali.DatiGeneraliDocumento.TipoDocumento = tipoDocumento; Challenge.FatturaElettronicaBody = new List() { body }; var result = Challenge.Validate(); Assert.IsNotNull(result.Errors.FirstOrDefault(x => x.ErrorCode == "00430")); body = new FatturaElettronicaBody(); body.DatiBeniServizi.DatiRiepilogo.Add(new() { AliquotaIVA = 0m, Natura = "N6.1" }); body.DatiGenerali.DatiGeneraliDocumento.TipoDocumento = tipoDocumento; Challenge.FatturaElettronicaBody = new List() { body }; result = Challenge.Validate(); Assert.IsNull(result.Errors.FirstOrDefault(x => x.ErrorCode == "00430")); } var bodyTD16 = new FatturaElettronicaBody(); bodyTD16.DatiBeniServizi.DatiRiepilogo.Add(new() { AliquotaIVA = 1m, Natura = "N6.1" }); bodyTD16.DatiGenerali.DatiGeneraliDocumento.TipoDocumento = "TD16"; Challenge.FatturaElettronicaBody = new List() { bodyTD16 }; var resultTD16 = Challenge.Validate(); Assert.IsNull(resultTD16.Errors.FirstOrDefault(x => x.ErrorCode == "00430")); } } } ================================================ FILE: Test/Ordinaria/IscrizioneREAValidator.cs ================================================ using FatturaElettronica.Ordinaria.FatturaElettronicaHeader.CedentePrestatore; using FatturaElettronica.Tabelle; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace FatturaElettronica.Test.Ordinaria { [TestClass] public class IscrizioneREAValidator : BaseClass { [TestMethod] public void UfficioIsRequired() { AssertRequired(x => x.Ufficio); } [TestMethod] public void UfficioOnlyAcceptsValidValues() { AssertProvinciaOnlyAcceptsValidValues(x => x.Ufficio); } [TestMethod] public void NumeroREAIsRequired() { AssertRequired(x => x.NumeroREA); } [TestMethod] public void NumeroREAMinMaxLength() { AssertMinMaxLength(x => x.NumeroREA, 1, 20); } [TestMethod] public void NumeroREAMustBeBasicLatin() { AssertMustBeBasicLatin(x => x.NumeroREA); } [TestMethod] public void SocioUnicoIsOptional() { AssertOptional(x => x.SocioUnico); } [TestMethod] public void SocioUnicoOnlyAcceptsTableValues() { AssertOnlyAcceptsTableValues(x => x.SocioUnico); } [TestMethod] public void StatoLiquidazioneIsRequired() { AssertRequired(x => x.StatoLiquidazione); } [TestMethod] public void StatoLiquidazioneOnlyAcceptsTableValues() { AssertOnlyAcceptsTableValues(x => x.StatoLiquidazione); } } } ================================================ FILE: Test/Ordinaria/RappresentanteFiscaleCessionarioCommittenteValidator.cs ================================================ using FatturaElettronica.Ordinaria.FatturaElettronicaHeader.CessionarioCommittente; using FluentValidation.TestHelper; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace FatturaElettronica.Test.Ordinaria { [TestClass] public class RappresentateFiscaleCessionarioCommittenteValidator : DenominazioneNomeCognomeValidator { [TestMethod] public void IdFiscaleIVAHasChildValidator() { Validator.ShouldHaveChildValidator(x => x.IdFiscaleIVA, typeof(Validators.IdFiscaleIVAValidator)); } } } ================================================ FILE: Test/Ordinaria/RappresentanteFiscaleValidator.cs ================================================ using FatturaElettronica.Ordinaria.FatturaElettronicaHeader.RappresentanteFiscale; using FluentValidation.TestHelper; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace FatturaElettronica.Test.Ordinaria { [TestClass] public class RappresentanteFiscaleValidator : BaseClass { [TestMethod] public void DatiAnagraficiHasDelegateChildValidator() { Validator.ShouldHaveChildValidator(x => x.DatiAnagrafici, typeof(Validators.DatiAnagraficiRappresentanteFiscaleValidator)); } } } ================================================ FILE: Test/Ordinaria/SedeCedentePrestatoreValidator.cs ================================================ using FatturaElettronica.Ordinaria.FatturaElettronicaHeader.CedentePrestatore; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace FatturaElettronica.Test.Ordinaria { [TestClass] public class SedeCedentePrestatoreValidator : BaseLocalitàValidator { } } ================================================ FILE: Test/Ordinaria/SedeCessionarioCommittenteValidator.cs ================================================ using FatturaElettronica.Ordinaria.FatturaElettronicaHeader.CessionarioCommittente; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace FatturaElettronica.Test.Ordinaria { [TestClass] public class SedeCessionarioCommittenteValidator : BaseLocalitàValidator { } } ================================================ FILE: Test/Ordinaria/TerzoIntermediarioOSoggettoEmittenteValidator.cs ================================================ using FatturaElettronica.Ordinaria.FatturaElettronicaHeader.TerzoIntermediarioOSoggettoEmittente; using FluentValidation.TestHelper; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace FatturaElettronica.Test.Ordinaria { [TestClass] public class TerzoIntermediarioOSoggettoEmittenteValidator : BaseClass { [TestMethod] public void DatiAnagraficiHasDelegateChildValidator() { Validator.ShouldHaveChildValidator(x => x.DatiAnagrafici, typeof(FatturaElettronica.Validators.DatiAnagraficiTerzoIntermediarioValidator)); } } } ================================================ FILE: Test/Samples/IT01234567890_FPA02.xml ================================================ IT 01234567890 00001 FPA12 AAAAAA IT 01234567890 SOCIETA' ALPHA SRL Titolo RF01 VIALE ROMA 543 07100 SASSARI SS IT 09876543210 AMMINISTRAZIONE BETA Titolo VIA TORINO 38-B 00145 ROMA RM IT TD01 EUR 2014-12-18 123 LA FATTURA FA RIFERIMENTO AD UNA OPERAZIONE AAAA BBBBBBBBBBBBBBBBBB CCC DDDDDDDDDDDDDDD E FFFFFFFFFFFFFFFFFFFF GGGGGGGGGG HHHHHHH II LLLLLLLLLLLLLLLLL MMM NNNNN OO PPPPPPPPPPP QQQQ RRRR SSSSSSSSSSSSSS SEGUE DESCRIZIONE CAUSALE NEL CASO IN CUI NON SIANO STATI SUFFICIENTI 200 CARATTERI AAAAAAAAAAA BBBBBBBBBBBBBBBBB 1 66685 1 123abc 456def 1 123 2016-09-01 5 123abc 456def 1 456 5 123abc 456def 1 789 5 123abc 456def IT 24681012141 Trasporto spa 2012-10-22T16:46:12 1 LA DESCRIZIONE DELLA FORNITURA PUO' SUPERARE I CENTO CARATTERI CHE RAPPRESENTAVANO IL PRECEDENTE LIMITE DIMENSIONALE. TALE LIMITE NELLA NUOVA VERSIONE E' STATO PORTATO A MILLE CARATTERI 5.00 1.00 5.00 22.00 2 FORNITURE VARIE PER UFFICIO 10.00 2.00 20.00 22.00 3 TUBI RITORNO GASOLIO 2.00 Pezzo 5.00 SC -1.71 6.58 22.00 4 TUBI RITORNO GASOLIO 1.00 Pezzo 5.00 SC 10.0 4.50 22.00 22.00 36.08 7.94 D TP01 MP01 2015-01-30 36.08 ================================================ FILE: Test/Samples/IT01234567890_FPR02.xml ================================================ IT 01234567890 00001 FPR12 0000000 betagamma@pec.it IT 01234567890 SOCIETA' ALPHA SRL Titolo RF01 VIALE ROMA 543 07100 SASSARI SS 09876543210 BETA GAMMA Titolo VIA TORINO 38-B 00145 ROMA RM IT IT 01234567891 Rappresentante fiscale TD01 EUR 2014-12-18 123 LA FATTURA FA RIFERIMENTO AD UNA OPERAZIONE AAAA BBBBBBBBBBBBBBBBBB CCC DDDDDDDDDDDDDDD E FFFFFFFFFFFFFFFFFFFF GGGGGGGGGG HHHHHHH II LLLLLLLLLLLLLLLLL MMM NNNNN OO PPPPPPPPPPP QQQQ RRRR SSSSSSSSSSSSSS SEGUE DESCRIZIONE CAUSALE NEL CASO IN CUI NON SIANO STATI SUFFICIENTI 200 CARATTERI AAAAAAAAAAA BBBBBBBBBBBBBBBBB 1 66685 1 IT 24681012141 Trasporto spa 2012-10-22T16:46:12 1 LA DESCRIZIONE DELLA FORNITURA PUO' SUPERARE I CENTO CARATTERI CHE RAPPRESENTAVANO IL PRECEDENTE LIMITE DIMENSIONALE. TALE LIMITE NELLA NUOVA VERSIONE E' STATO PORTATO A MILLE CARATTERI 5.00 1.00 5.00 22.00 2 FORNITURE VARIE PER UFFICIO 10.00 2.00 20.00 22.00 3 TUBI RITORNO GASOLIO 2.00 Pezzo 5.00 SC -1.71 6.58 22.00 4 TUBI RITORNO GASOLIO 1.00 Pezzo 5.00 SC 10.0 4.50 22.00 22.00 36.08 7.94 D TP01 MP01 2015-01-30 36.08 ================================================ FILE: Test/Samples/IT01234567890_FSM10.xml ================================================ IT 01234567890 00001 FSM10 0000000 betagamma@pec.it IT 01234567890 SOCIETA' ALPHA SRL VIALE ROMA 543 07100 SASSARI SS IT RF01 IT 09876543210 BETA GAMMA VIA TORINO 38-B 00145 ROMA RM IT TD07 EUR 2019-01-01 123 LA DESCRIZIONE DELLA FORNITURA PUO' SUPERARE I CENTO CARATTERI CHE RAPPRESENTAVANO IL PRECEDENTE LIMITE DIMENSIONALE. TALE LIMITE NELLA NUOVA VERSIONE E' STATO PORTATO A MILLE CARATTERI 25.00 22.00 ================================================ FILE: Test/Samples/IT02182030391_31.Base64.CRLF.xml.p7m ================================================ MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgEFADCABgkqhkiG9w0BBwGggCSABIID 6O+7vzw/eG1sIHZlcnNpb249IjEuMCIgZW5jb2Rpbmc9InV0Zi04Ij8+DQo8cDpGYXR0dXJhRWxl dHRyb25pY2EgdmVyc2lvbmU9IkZQUjEyIiB4bWxuczpkcz0iaHR0cDovL3d3dy53My5vcmcvMjAw MC8wOS94bWxkc2lnIyIgeG1sbnM6eHNpPSJodHRwOi8vd3d3LnczLm9yZy8yMDAxL1hNTFNjaGVt YS1pbnN0YW5jZSIgeHNpOnNjaGVtYUxvY2F0aW9uPSJodHRwOi8vaXZhc2Vydml6aS5hZ2Vuemlh ZW50cmF0ZS5nb3YuaXQvZG9jcy94c2QvZmF0dHVyZS92MS4yIGZhdHR1cmFvcmRpbmFyaWFfdjEu Mi54c2QiIHhtbG5zOnA9Imh0dHA6Ly9pdmFzZXJ2aXppLmFnZW56aWFlbnRyYXRlLmdvdi5pdC9k b2NzL3hzZC9mYXR0dXJlL3YxLjIiPg0KICA8RmF0dHVyYUVsZXR0cm9uaWNhSGVhZGVyPg0KICAg IDxEYXRpVHJhc21pc3Npb25lPg0KICAgICAgPElkVHJhc21pdHRlbnRlPg0KICAgICAgICA8SWRQ YWVzZT5JVDwvSWRQYWVzZT4NCiAgICAgICAgPElkQ29kaWNlPjAyMTgyMDMwMzkxPC9JZENvZGlj ZT4NCiAgICAgIDwvSWRUcmFzbWl0dGVudGU+DQogICAgICA8UHJvZ3Jlc3Npdm9JbnZpbz4zMTwv UHJvZ3Jlc3Npdm9JbnZpbz4NCiAgICAgIDxGb3JtYXRvVHJhc21pc3Npb25lPkZQUjEyPC9Gb3Jt YXRvVHJhc21pc3Npb25lPg0KICAgICAgPENvZGljZURlc3RpbmF0YXJpbz4wMDAwMDAwPC9Db2Rp Y2VEZXN0aW5hdGFyaW8+DQogICAgICA8Q29udGF0dGlUcmFzbWl0dGVudGU+DQogICAgICAgIDxU ZWxlZm9ubz4zNDUvNTU1NDQ0PC9UZWxlZm9ubz4NCiAgICAgIDwvQ29udGF0dGlUcmFzbWl0dGVu dGU+DQogICAgICA8UEVDRGVzdGluYXRhcmlvPmNpcjIwMDBzbmNAcGVjLml0PC9QRUNEZXN0aW5h dGFyaW8+DQogICAgPC9EYXRpVHJhc21pc3Npb25lPg0KICAgIDxDZWRlbnRlUHJlc3RhdG9yZT4N CiAgICAgIDxEYXRpQW5hZ3JhZmljaT4NCiAgICAgICAgPElkRmlzY2FsZUlWQT4NCiAgICAgICAg ICA8SWRQYWVzZT5JVDwvSWRQYWVzZT4NCiAgICAgICAEggPoICAgPElkQ29kaWNlPjAyMTgyMDMw MzkxPC9JZENvZGljZT4NCiAgICAgICAgPC9JZEZpc2NhbGVJVkE+DQogICAgICAgIDxDb2RpY2VG aXNjYWxlPjAyMTgyMDMwMzkxPC9Db2RpY2VGaXNjYWxlPg0KICAgICAgICA8QW5hZ3JhZmljYT4N CiAgICAgICAgICA8RGVub21pbmF6aW9uZT5BemllbmRhIGRpIGVzZW1waW88L0Rlbm9taW5hemlv bmU+DQogICAgICAgIDwvQW5hZ3JhZmljYT4NCiAgICAgICAgPFJlZ2ltZUZpc2NhbGU+UkYwMTwv UmVnaW1lRmlzY2FsZT4NCiAgICAgIDwvRGF0aUFuYWdyYWZpY2k+DQogICAgICA8U2VkZT4NCiAg ICAgICAgPEluZGlyaXp6bz5WaWEgZGVpIFJvZGl0b3JpIDE1L3Y8L0luZGlyaXp6bz4NCiAgICAg ICAgPENBUD4xMjEwMDwvQ0FQPg0KICAgICAgICA8Q29tdW5lPlZpbGxhIGRlaSBSb2RpdG9yaTwv Q29tdW5lPg0KICAgICAgICA8UHJvdmluY2lhPlJBPC9Qcm92aW5jaWE+DQogICAgICAgIDxOYXpp b25lPklUPC9OYXppb25lPg0KICAgICAgPC9TZWRlPg0KICAgICAgPENvbnRhdHRpPg0KICAgICAg ICA8VGVsZWZvbm8+MzQ1LzU1NTQ0NDwvVGVsZWZvbm8+DQogICAgICAgIDxGYXg+MDM1LzU1NTQ0 MzwvRmF4Pg0KICAgICAgPC9Db250YXR0aT4NCiAgICA8L0NlZGVudGVQcmVzdGF0b3JlPg0KICAg IDxDZXNzaW9uYXJpb0NvbW1pdHRlbnRlPg0KICAgICAgPERhdGlBbmFncmFmaWNpPg0KICAgICAg ICA8SWRGaXNjYWxlSVZBPg0KICAgICAgICAgIDxJZFBhZXNlPklUPC9JZFBhZXNlPg0KICAgICAg ICAgIDxJZENvZGljZT4wMTE4MDY4MDM5NzwvSWRDb2RpY2U+DQogICAgICAgIDwvSWRGaXNjYWxl SVZBPg0KICAgICAgICA8QW5hZ3JhZmljYT4NCiAgICAgICAgICA8RGVub21pbmF6aW9uZT5DSVIg MjAwMCBzbmM8L0Rlbm9taW5hemlvbmU+DQogICAgICAgIDwvQW5hZ3JhZmljYT4NCiAgICAgIDwv RGF0aUFuYWdyYWZpY2k+DQogICAgICA8U2VkZT4NCiAgICAgICAgPEluZGlyaXp6bz52aWEgU2Fu c292aW5vIDQ1PASCA+gvSW5kaXJpenpvPg0KICAgICAgICA8Q0FQPjQ4MTI0PC9DQVA+DQogICAg ICAgIDxDb211bmU+UmF2ZW5uYTwvQ29tdW5lPg0KICAgICAgICA8UHJvdmluY2lhPlJBPC9Qcm92 aW5jaWE+DQogICAgICAgIDxOYXppb25lPklUPC9OYXppb25lPg0KICAgICAgPC9TZWRlPg0KICAg IDwvQ2Vzc2lvbmFyaW9Db21taXR0ZW50ZT4NCiAgPC9GYXR0dXJhRWxldHRyb25pY2FIZWFkZXI+ DQogIDxGYXR0dXJhRWxldHRyb25pY2FCb2R5Pg0KICAgIDxEYXRpR2VuZXJhbGk+DQogICAgICA8 RGF0aUdlbmVyYWxpRG9jdW1lbnRvPg0KICAgICAgICA8VGlwb0RvY3VtZW50bz5URDAxPC9UaXBv RG9jdW1lbnRvPg0KICAgICAgICA8RGl2aXNhPkVVUjwvRGl2aXNhPg0KICAgICAgICA8RGF0YT4y MDE4LTA2LTA4PC9EYXRhPg0KICAgICAgICA8TnVtZXJvPjI8L051bWVybz4NCiAgICAgICAgPElt cG9ydG9Ub3RhbGVEb2N1bWVudG8+MTIyLjAwPC9JbXBvcnRvVG90YWxlRG9jdW1lbnRvPg0KICAg ICAgICA8QXJyb3RvbmRhbWVudG8+MC4wMDwvQXJyb3RvbmRhbWVudG8+DQogICAgICA8L0RhdGlH ZW5lcmFsaURvY3VtZW50bz4NCiAgICA8L0RhdGlHZW5lcmFsaT4NCiAgICA8RGF0aUJlbmlTZXJ2 aXppPg0KICAgICAgPERldHRhZ2xpb0xpbmVlPg0KICAgICAgICA8TnVtZXJvTGluZWE+MTwvTnVt ZXJvTGluZWE+DQogICAgICAgIDxEZXNjcml6aW9uZT50ZXN0IHByb2RvdHRpPC9EZXNjcml6aW9u ZT4NCiAgICAgICAgPFF1YW50aXRhPjEuMDA8L1F1YW50aXRhPg0KICAgICAgICA8UHJlenpvVW5p dGFyaW8+MTAwLjAwPC9QcmV6em9Vbml0YXJpbz4NCiAgICAgICAgPFByZXp6b1RvdGFsZT4xMDAu MDA8L1ByZXp6b1RvdGFsZT4NCiAgICAgICAgPEFsaXF1b3RhSVZBPjIyLjAwPC9BbGlxdW90YUlW QT4NCiAgICAgIDwvRGV0dGFnbGlvTGluZWU+DQogICAgICA8RGF0aVJpZXBpbG9nbz4NCiAgICAg ICAgPEFsaXF1b3RhSVZBPjIyLjAwPC9BbGlxdW90YUlWQT4NCiAgICAgICAgBIHhPEltcG9uaWJp bGVJbXBvcnRvPjEwMC4wMDwvSW1wb25pYmlsZUltcG9ydG8+DQogICAgICAgIDxJbXBvc3RhPjIy LjAwPC9JbXBvc3RhPg0KICAgICAgICA8RXNpZ2liaWxpdGFJVkE+UzwvRXNpZ2liaWxpdGFJVkE+ DQogICAgICA8L0RhdGlSaWVwaWxvZ28+DQogICAgPC9EYXRpQmVuaVNlcnZpemk+DQogIDwvRmF0 dHVyYUVsZXR0cm9uaWNhQm9keT4NCjwvcDpGYXR0dXJhRWxldHRyb25pY2E+AAAAAAAAoIAwggci MIIGCqADAgECAgQAjv0WMA0GCSqGSIb3DQEBCwUAMIGFMQswCQYDVQQGEwJJVDEVMBMGA1UECgwM SU5GT0NFUlQgU1BBMSIwIAYDVQQLDBlDZXJ0aWZpY2F0b3JlIEFjY3JlZGl0YXRvMRQwEgYDVQQF EwswNzk0NTIxMTAwNjElMCMGA1UEAwwcSW5mb0NlcnQgRmlybWEgUXVhbGlmaWNhdGEgMjAeFw0x ODA5MDMwODAyMDBaFw0yMTA5MDMwMDAwMDBaMIGFMQswCQYDVQQGEwJJVDEQMA4GA1UEBAwHR0FS RElOSTEfMB0GA1UEBRMWVElOSVQtR1JEU0ZONjZEMTdIMTk5SzEYMBYGA1UEAwwPR0FSRElOSSBT VEVGQU5PMRcwFQYDVQQuEw4yMDE4NzExNTMwMjc2NTEQMA4GA1UEKgwHU1RFRkFOTzCCASIwDQYJ KoZIhvcNAQEBBQADggEPADCCAQoCggEBAJOvXBHkSre8SxWp0S/Qc7gb8QxPsMGGqYJaGbjk76ug wYpSD3vXC20N9aWCHk/Krgxy7uEOpFYsvlIckzgd898sGq6cphZsG7ZEPdGeQt7QuC7adslBxsWG SG0saOUb9QCm4jZHjtxLzb3mKOmtSDt8Gc6cmcF9o/KGC9p4DlMwNN8cZjrnSNi1S/tt9PBs5H0Z /3LtGinGuFh6chv7lROSECLdO5NtXnN9yLodZn8icZaNXDyhtzfaAaL8lp8xNKQAxAR6yPHHAl5k OcKtpb4b2C5EOes59Hszm0e9ApvM0LAH3QxnwtmBxg5v7D81eiWhyqlFWHePTwO9JN6vIK8CAwEA AaOCA5YwggOSMAkGA1UdEwQCMAAwJQYDVR0SBB4wHIEaZmlybWEuZGlnaXRhbGVAaW5mb2NlcnQu aXQwgecGA1UdHwSB3zCB3DAyoDCgLoYsaHR0cDovL2NybC5pbmZvY2VydC5pdC9jcmxzL2Zpcm1h Mi9DUkwyMi5jcmwwgaWggaKggZ+GgZxsZGFwOi8vbGRhcC5pbmZvY2VydC5pdC9jbiUzREluZm9D ZXJ0JTIwRmlybWElMjBRdWFsaWZpY2F0YSUyMDIlMjBDUkwyMixvdSUzRENlcnRpZmljYXRvcmUl MjBBY2NyZWRpdGF0byxvJTNESU5GT0NFUlQlMjBTUEEsYyUzRElUP2NlcnRpZmljYXRlUmV2b2Nh dGlvbkxpc3QwbgYIKwYBBQUHAQEEYjBgMCcGCCsGAQUFBzABhhtodHRwOi8vb2NzcC5zYy5pbmZv Y2VydC5pdC8wNQYIKwYBBQUHMAKGKWh0dHA6Ly9jZXJ0LmluZm9jZXJ0Lml0L2NhMi9maXJtYTIv Q0EuY3J0MG8GA1UdIARoMGYwTwYGK0wkAQEgMEUwQwYIKwYBBQUHAgEWN2h0dHA6Ly93d3cuZmly bWEuaW5mb2NlcnQuaXQvZG9jdW1lbnRhemlvbmUvbWFudWFsaS5waHAwCAYGK0wYAQECMAkGBwQA i+xAAQIwgYQGCCsGAQUFBwEDBHgwdjAIBgYEAI5GAQEwCAYGBACORgEEMAsGBgQAjkYBAwIBFDAT BgYEAI5GAQYwCQYHBACORgEGATA+BgYEAI5GAQUwNDAyFixodHRwczovL3d3dy5maXJtYS5pbmZv Y2VydC5pdC9wZGYvUEtJLURTLnBkZhMCRU4wDgYDVR0PAQH/BAQDAgZAMCgGA1UdCQQhMB8wHQYI KwYBBQUHCQExERgPMTk2NjA0MTcwMDAwMDBaMIGyBgNVHSMEgaowgaeAFJPdIfwD0BUKcq2jzNWa CZ04i53poYGLpIGIMIGFMQswCQYDVQQGEwJJVDEVMBMGA1UECgwMSU5GT0NFUlQgU1BBMSIwIAYD VQQLDBlDZXJ0aWZpY2F0b3JlIEFjY3JlZGl0YXRvMRQwEgYDVQQFEwswNzk0NTIxMTAwNjElMCMG A1UEAwwcSW5mb0NlcnQgRmlybWEgUXVhbGlmaWNhdGEgMoIBATAdBgNVHQ4EFgQUPNbGO0PcNnhl uwh5x4mA/EKDowkwDQYJKoZIhvcNAQELBQADggEBAJFxk7yprs2pRt54eCjAkFQT1vQgRbm3a38G FC3yPD/kOpm5wTwqJ02vXBJ9Ewd2BiUpkfQoRlohka09JKMETsskkpXJl80mz+3HA7eh74V4HAWb n4jAGTk/EwtrOLtBW03y0FDtwkidYmaICYbAnGqvt/2aYEhqzxbpZUE/QVQ49nSzbo/vngs+cVr5 bDr5+Khn6Z49jtqe0vEh7GSIlbwd+1rd1gf4EKCrU9Bi+3gNzX7JLn2fVZkEL9oLd7CAyQbAmxM5 EcA3SLHBpW27ErSDU52IfJDZxxcpqHnAB8wpUGzIY7YXW+tfINudZ8B7YWPs8eO5epFsRMuiE+i1 plYAADGCAl8wggJbAgEBMIGOMIGFMQswCQYDVQQGEwJJVDEVMBMGA1UECgwMSU5GT0NFUlQgU1BB MSIwIAYDVQQLDBlDZXJ0aWZpY2F0b3JlIEFjY3JlZGl0YXRvMRQwEgYDVQQFEwswNzk0NTIxMTAw NjElMCMGA1UEAwwcSW5mb0NlcnQgRmlybWEgUXVhbGlmaWNhdGEgMgIEAI79FjANBglghkgBZQME AgEFAKCBojAYBgkqhkiG9w0BCQMxCwYJKoZIhvcNAQcBMBwGCSqGSIb3DQEJBTEPFw0xODA5MDgx MzMyNDVaMC8GCSqGSIb3DQEJBDEiBCABysgtzQA23ElCqf8USCICb5LCM/xfwWRReaU662KYhzA3 BgsqhkiG9w0BCRACLzEoMCYwJDAiBCDqu+rMsnRYKeYEe1d/dicQcLGAQWgUaWC2RQWdKtZxrjAN BgkqhkiG9w0BAQEFAASCAQB6tDATVv5YYCivkdtf87I/zKNXQSdqq5BvMcuwC2MX7htjtI3q0YsP Pvo53Wc+JChuo9IvwHtpc2nQmN26RPWrcVtSGZVPhcosiL0lOcDQN79RnWHKcPcX9SZHzBP3EgF0 YnQeBvOjRoaV9Ee/CA0CirIAIp5Vv4d1GUs5a59dYaBJ6Q4az4a6xK6YbUU1qfsxwSu5Q3+LvvXD Yh8GQM0j72vylzOgV/VHnXj53Zbdg6JXHyd0DLxVdFFkkW+osCezIejhpY7OOvEamH9l88pBKG1y 9Oy+et16UJWe36p22iwHlt5dRV8K82sLpAEqFYCCA9pAa8ME8QvGlxa3oPAyAAAAAAAA ================================================ FILE: Test/Samples/IT02182030391_31.Base64.xml.p7m ================================================ MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgEFADCABgkqhkiG9w0BBwGggCSABIID6O+7vzw/eG1sIHZlcnNpb249IjEuMCIgZW5jb2Rpbmc9InV0Zi04Ij8+DQo8cDpGYXR0dXJhRWxldHRyb25pY2EgdmVyc2lvbmU9IkZQUjEyIiB4bWxuczpkcz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC8wOS94bWxkc2lnIyIgeG1sbnM6eHNpPSJodHRwOi8vd3d3LnczLm9yZy8yMDAxL1hNTFNjaGVtYS1pbnN0YW5jZSIgeHNpOnNjaGVtYUxvY2F0aW9uPSJodHRwOi8vaXZhc2Vydml6aS5hZ2VuemlhZW50cmF0ZS5nb3YuaXQvZG9jcy94c2QvZmF0dHVyZS92MS4yIGZhdHR1cmFvcmRpbmFyaWFfdjEuMi54c2QiIHhtbG5zOnA9Imh0dHA6Ly9pdmFzZXJ2aXppLmFnZW56aWFlbnRyYXRlLmdvdi5pdC9kb2NzL3hzZC9mYXR0dXJlL3YxLjIiPg0KICA8RmF0dHVyYUVsZXR0cm9uaWNhSGVhZGVyPg0KICAgIDxEYXRpVHJhc21pc3Npb25lPg0KICAgICAgPElkVHJhc21pdHRlbnRlPg0KICAgICAgICA8SWRQYWVzZT5JVDwvSWRQYWVzZT4NCiAgICAgICAgPElkQ29kaWNlPjAyMTgyMDMwMzkxPC9JZENvZGljZT4NCiAgICAgIDwvSWRUcmFzbWl0dGVudGU+DQogICAgICA8UHJvZ3Jlc3Npdm9JbnZpbz4zMTwvUHJvZ3Jlc3Npdm9JbnZpbz4NCiAgICAgIDxGb3JtYXRvVHJhc21pc3Npb25lPkZQUjEyPC9Gb3JtYXRvVHJhc21pc3Npb25lPg0KICAgICAgPENvZGljZURlc3RpbmF0YXJpbz4wMDAwMDAwPC9Db2RpY2VEZXN0aW5hdGFyaW8+DQogICAgICA8Q29udGF0dGlUcmFzbWl0dGVudGU+DQogICAgICAgIDxUZWxlZm9ubz4zNDUvNTU1NDQ0PC9UZWxlZm9ubz4NCiAgICAgIDwvQ29udGF0dGlUcmFzbWl0dGVudGU+DQogICAgICA8UEVDRGVzdGluYXRhcmlvPmNpcjIwMDBzbmNAcGVjLml0PC9QRUNEZXN0aW5hdGFyaW8+DQogICAgPC9EYXRpVHJhc21pc3Npb25lPg0KICAgIDxDZWRlbnRlUHJlc3RhdG9yZT4NCiAgICAgIDxEYXRpQW5hZ3JhZmljaT4NCiAgICAgICAgPElkRmlzY2FsZUlWQT4NCiAgICAgICAgICA8SWRQYWVzZT5JVDwvSWRQYWVzZT4NCiAgICAgICAEggPoICAgPElkQ29kaWNlPjAyMTgyMDMwMzkxPC9JZENvZGljZT4NCiAgICAgICAgPC9JZEZpc2NhbGVJVkE+DQogICAgICAgIDxDb2RpY2VGaXNjYWxlPjAyMTgyMDMwMzkxPC9Db2RpY2VGaXNjYWxlPg0KICAgICAgICA8QW5hZ3JhZmljYT4NCiAgICAgICAgICA8RGVub21pbmF6aW9uZT5BemllbmRhIGRpIGVzZW1waW88L0Rlbm9taW5hemlvbmU+DQogICAgICAgIDwvQW5hZ3JhZmljYT4NCiAgICAgICAgPFJlZ2ltZUZpc2NhbGU+UkYwMTwvUmVnaW1lRmlzY2FsZT4NCiAgICAgIDwvRGF0aUFuYWdyYWZpY2k+DQogICAgICA8U2VkZT4NCiAgICAgICAgPEluZGlyaXp6bz5WaWEgZGVpIFJvZGl0b3JpIDE1L3Y8L0luZGlyaXp6bz4NCiAgICAgICAgPENBUD4xMjEwMDwvQ0FQPg0KICAgICAgICA8Q29tdW5lPlZpbGxhIGRlaSBSb2RpdG9yaTwvQ29tdW5lPg0KICAgICAgICA8UHJvdmluY2lhPlJBPC9Qcm92aW5jaWE+DQogICAgICAgIDxOYXppb25lPklUPC9OYXppb25lPg0KICAgICAgPC9TZWRlPg0KICAgICAgPENvbnRhdHRpPg0KICAgICAgICA8VGVsZWZvbm8+MzQ1LzU1NTQ0NDwvVGVsZWZvbm8+DQogICAgICAgIDxGYXg+MDM1LzU1NTQ0MzwvRmF4Pg0KICAgICAgPC9Db250YXR0aT4NCiAgICA8L0NlZGVudGVQcmVzdGF0b3JlPg0KICAgIDxDZXNzaW9uYXJpb0NvbW1pdHRlbnRlPg0KICAgICAgPERhdGlBbmFncmFmaWNpPg0KICAgICAgICA8SWRGaXNjYWxlSVZBPg0KICAgICAgICAgIDxJZFBhZXNlPklUPC9JZFBhZXNlPg0KICAgICAgICAgIDxJZENvZGljZT4wMTE4MDY4MDM5NzwvSWRDb2RpY2U+DQogICAgICAgIDwvSWRGaXNjYWxlSVZBPg0KICAgICAgICA8QW5hZ3JhZmljYT4NCiAgICAgICAgICA8RGVub21pbmF6aW9uZT5DSVIgMjAwMCBzbmM8L0Rlbm9taW5hemlvbmU+DQogICAgICAgIDwvQW5hZ3JhZmljYT4NCiAgICAgIDwvRGF0aUFuYWdyYWZpY2k+DQogICAgICA8U2VkZT4NCiAgICAgICAgPEluZGlyaXp6bz52aWEgU2Fuc292aW5vIDQ1PASCA+gvSW5kaXJpenpvPg0KICAgICAgICA8Q0FQPjQ4MTI0PC9DQVA+DQogICAgICAgIDxDb211bmU+UmF2ZW5uYTwvQ29tdW5lPg0KICAgICAgICA8UHJvdmluY2lhPlJBPC9Qcm92aW5jaWE+DQogICAgICAgIDxOYXppb25lPklUPC9OYXppb25lPg0KICAgICAgPC9TZWRlPg0KICAgIDwvQ2Vzc2lvbmFyaW9Db21taXR0ZW50ZT4NCiAgPC9GYXR0dXJhRWxldHRyb25pY2FIZWFkZXI+DQogIDxGYXR0dXJhRWxldHRyb25pY2FCb2R5Pg0KICAgIDxEYXRpR2VuZXJhbGk+DQogICAgICA8RGF0aUdlbmVyYWxpRG9jdW1lbnRvPg0KICAgICAgICA8VGlwb0RvY3VtZW50bz5URDAxPC9UaXBvRG9jdW1lbnRvPg0KICAgICAgICA8RGl2aXNhPkVVUjwvRGl2aXNhPg0KICAgICAgICA8RGF0YT4yMDE4LTA2LTA4PC9EYXRhPg0KICAgICAgICA8TnVtZXJvPjI8L051bWVybz4NCiAgICAgICAgPEltcG9ydG9Ub3RhbGVEb2N1bWVudG8+MTIyLjAwPC9JbXBvcnRvVG90YWxlRG9jdW1lbnRvPg0KICAgICAgICA8QXJyb3RvbmRhbWVudG8+MC4wMDwvQXJyb3RvbmRhbWVudG8+DQogICAgICA8L0RhdGlHZW5lcmFsaURvY3VtZW50bz4NCiAgICA8L0RhdGlHZW5lcmFsaT4NCiAgICA8RGF0aUJlbmlTZXJ2aXppPg0KICAgICAgPERldHRhZ2xpb0xpbmVlPg0KICAgICAgICA8TnVtZXJvTGluZWE+MTwvTnVtZXJvTGluZWE+DQogICAgICAgIDxEZXNjcml6aW9uZT50ZXN0IHByb2RvdHRpPC9EZXNjcml6aW9uZT4NCiAgICAgICAgPFF1YW50aXRhPjEuMDA8L1F1YW50aXRhPg0KICAgICAgICA8UHJlenpvVW5pdGFyaW8+MTAwLjAwPC9QcmV6em9Vbml0YXJpbz4NCiAgICAgICAgPFByZXp6b1RvdGFsZT4xMDAuMDA8L1ByZXp6b1RvdGFsZT4NCiAgICAgICAgPEFsaXF1b3RhSVZBPjIyLjAwPC9BbGlxdW90YUlWQT4NCiAgICAgIDwvRGV0dGFnbGlvTGluZWU+DQogICAgICA8RGF0aVJpZXBpbG9nbz4NCiAgICAgICAgPEFsaXF1b3RhSVZBPjIyLjAwPC9BbGlxdW90YUlWQT4NCiAgICAgICAgBIHhPEltcG9uaWJpbGVJbXBvcnRvPjEwMC4wMDwvSW1wb25pYmlsZUltcG9ydG8+DQogICAgICAgIDxJbXBvc3RhPjIyLjAwPC9JbXBvc3RhPg0KICAgICAgICA8RXNpZ2liaWxpdGFJVkE+UzwvRXNpZ2liaWxpdGFJVkE+DQogICAgICA8L0RhdGlSaWVwaWxvZ28+DQogICAgPC9EYXRpQmVuaVNlcnZpemk+DQogIDwvRmF0dHVyYUVsZXR0cm9uaWNhQm9keT4NCjwvcDpGYXR0dXJhRWxldHRyb25pY2E+AAAAAAAAoIAwggciMIIGCqADAgECAgQAjv0WMA0GCSqGSIb3DQEBCwUAMIGFMQswCQYDVQQGEwJJVDEVMBMGA1UECgwMSU5GT0NFUlQgU1BBMSIwIAYDVQQLDBlDZXJ0aWZpY2F0b3JlIEFjY3JlZGl0YXRvMRQwEgYDVQQFEwswNzk0NTIxMTAwNjElMCMGA1UEAwwcSW5mb0NlcnQgRmlybWEgUXVhbGlmaWNhdGEgMjAeFw0xODA5MDMwODAyMDBaFw0yMTA5MDMwMDAwMDBaMIGFMQswCQYDVQQGEwJJVDEQMA4GA1UEBAwHR0FSRElOSTEfMB0GA1UEBRMWVElOSVQtR1JEU0ZONjZEMTdIMTk5SzEYMBYGA1UEAwwPR0FSRElOSSBTVEVGQU5PMRcwFQYDVQQuEw4yMDE4NzExNTMwMjc2NTEQMA4GA1UEKgwHU1RFRkFOTzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJOvXBHkSre8SxWp0S/Qc7gb8QxPsMGGqYJaGbjk76ugwYpSD3vXC20N9aWCHk/Krgxy7uEOpFYsvlIckzgd898sGq6cphZsG7ZEPdGeQt7QuC7adslBxsWGSG0saOUb9QCm4jZHjtxLzb3mKOmtSDt8Gc6cmcF9o/KGC9p4DlMwNN8cZjrnSNi1S/tt9PBs5H0Z/3LtGinGuFh6chv7lROSECLdO5NtXnN9yLodZn8icZaNXDyhtzfaAaL8lp8xNKQAxAR6yPHHAl5kOcKtpb4b2C5EOes59Hszm0e9ApvM0LAH3QxnwtmBxg5v7D81eiWhyqlFWHePTwO9JN6vIK8CAwEAAaOCA5YwggOSMAkGA1UdEwQCMAAwJQYDVR0SBB4wHIEaZmlybWEuZGlnaXRhbGVAaW5mb2NlcnQuaXQwgecGA1UdHwSB3zCB3DAyoDCgLoYsaHR0cDovL2NybC5pbmZvY2VydC5pdC9jcmxzL2Zpcm1hMi9DUkwyMi5jcmwwgaWggaKggZ+GgZxsZGFwOi8vbGRhcC5pbmZvY2VydC5pdC9jbiUzREluZm9DZXJ0JTIwRmlybWElMjBRdWFsaWZpY2F0YSUyMDIlMjBDUkwyMixvdSUzRENlcnRpZmljYXRvcmUlMjBBY2NyZWRpdGF0byxvJTNESU5GT0NFUlQlMjBTUEEsYyUzRElUP2NlcnRpZmljYXRlUmV2b2NhdGlvbkxpc3QwbgYIKwYBBQUHAQEEYjBgMCcGCCsGAQUFBzABhhtodHRwOi8vb2NzcC5zYy5pbmZvY2VydC5pdC8wNQYIKwYBBQUHMAKGKWh0dHA6Ly9jZXJ0LmluZm9jZXJ0Lml0L2NhMi9maXJtYTIvQ0EuY3J0MG8GA1UdIARoMGYwTwYGK0wkAQEgMEUwQwYIKwYBBQUHAgEWN2h0dHA6Ly93d3cuZmlybWEuaW5mb2NlcnQuaXQvZG9jdW1lbnRhemlvbmUvbWFudWFsaS5waHAwCAYGK0wYAQECMAkGBwQAi+xAAQIwgYQGCCsGAQUFBwEDBHgwdjAIBgYEAI5GAQEwCAYGBACORgEEMAsGBgQAjkYBAwIBFDATBgYEAI5GAQYwCQYHBACORgEGATA+BgYEAI5GAQUwNDAyFixodHRwczovL3d3dy5maXJtYS5pbmZvY2VydC5pdC9wZGYvUEtJLURTLnBkZhMCRU4wDgYDVR0PAQH/BAQDAgZAMCgGA1UdCQQhMB8wHQYIKwYBBQUHCQExERgPMTk2NjA0MTcwMDAwMDBaMIGyBgNVHSMEgaowgaeAFJPdIfwD0BUKcq2jzNWaCZ04i53poYGLpIGIMIGFMQswCQYDVQQGEwJJVDEVMBMGA1UECgwMSU5GT0NFUlQgU1BBMSIwIAYDVQQLDBlDZXJ0aWZpY2F0b3JlIEFjY3JlZGl0YXRvMRQwEgYDVQQFEwswNzk0NTIxMTAwNjElMCMGA1UEAwwcSW5mb0NlcnQgRmlybWEgUXVhbGlmaWNhdGEgMoIBATAdBgNVHQ4EFgQUPNbGO0PcNnhluwh5x4mA/EKDowkwDQYJKoZIhvcNAQELBQADggEBAJFxk7yprs2pRt54eCjAkFQT1vQgRbm3a38GFC3yPD/kOpm5wTwqJ02vXBJ9Ewd2BiUpkfQoRlohka09JKMETsskkpXJl80mz+3HA7eh74V4HAWbn4jAGTk/EwtrOLtBW03y0FDtwkidYmaICYbAnGqvt/2aYEhqzxbpZUE/QVQ49nSzbo/vngs+cVr5bDr5+Khn6Z49jtqe0vEh7GSIlbwd+1rd1gf4EKCrU9Bi+3gNzX7JLn2fVZkEL9oLd7CAyQbAmxM5EcA3SLHBpW27ErSDU52IfJDZxxcpqHnAB8wpUGzIY7YXW+tfINudZ8B7YWPs8eO5epFsRMuiE+i1plYAADGCAl8wggJbAgEBMIGOMIGFMQswCQYDVQQGEwJJVDEVMBMGA1UECgwMSU5GT0NFUlQgU1BBMSIwIAYDVQQLDBlDZXJ0aWZpY2F0b3JlIEFjY3JlZGl0YXRvMRQwEgYDVQQFEwswNzk0NTIxMTAwNjElMCMGA1UEAwwcSW5mb0NlcnQgRmlybWEgUXVhbGlmaWNhdGEgMgIEAI79FjANBglghkgBZQMEAgEFAKCBojAYBgkqhkiG9w0BCQMxCwYJKoZIhvcNAQcBMBwGCSqGSIb3DQEJBTEPFw0xODA5MDgxMzMyNDVaMC8GCSqGSIb3DQEJBDEiBCABysgtzQA23ElCqf8USCICb5LCM/xfwWRReaU662KYhzA3BgsqhkiG9w0BCRACLzEoMCYwJDAiBCDqu+rMsnRYKeYEe1d/dicQcLGAQWgUaWC2RQWdKtZxrjANBgkqhkiG9w0BAQEFAASCAQB6tDATVv5YYCivkdtf87I/zKNXQSdqq5BvMcuwC2MX7htjtI3q0YsPPvo53Wc+JChuo9IvwHtpc2nQmN26RPWrcVtSGZVPhcosiL0lOcDQN79RnWHKcPcX9SZHzBP3EgF0YnQeBvOjRoaV9Ee/CA0CirIAIp5Vv4d1GUs5a59dYaBJ6Q4az4a6xK6YbUU1qfsxwSu5Q3+LvvXDYh8GQM0j72vylzOgV/VHnXj53Zbdg6JXHyd0DLxVdFFkkW+osCezIejhpY7OOvEamH9l88pBKG1y9Oy+et16UJWe36p22iwHlt5dRV8K82sLpAEqFYCCA9pAa8ME8QvGlxa3oPAyAAAAAAAA ================================================ FILE: Test/Samples/IT02182030391_31_tampered.Base64.xml.p7m ================================================ MOKCrAYJKuKAoEjigKDDtw0KAQcCwqDigqww4oKsAgEBMQ8wDQoGCWDigKBIAWUDBAIBBSAw4oKsBgkq4oCgSOKAoMO3DQoBBwHCoOKCrCTigqwE4oCaA8Oow6/Cu8K/PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjxwOkZhdHR1cmFFbGV0dHJvbmljYSB2ZXJzaW9uZT0iRlBSMTIiIHhtbG5zOmRzPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwLzA5L3htbGRzaWcjIiB4bWxuczp4c2k9Imh0dHA6Ly93d3cudzMub3JnLzIwMDEvWE1MU2NoZW1hLWluc3RhbmNlIiB4c2k6c2NoZW1hTG9jYXRpb249Imh0dHA6Ly9pdmFzZXJ2aXppLmFnZW56aWFlbnRyYXRlLmdvdi5pdC9kb2NzL3hzZC9mYXR0dXJlL3YxLjIgZmF0dHVyYW9yZGluYXJpYV92MS4yLnhzZCIgeG1sbnM6cD0iaHR0cDovL2l2YXNlcnZpemkuYWdlbnppYWVudHJhdGUuZ292Lml0L2RvY3MveHNkL2ZhdHR1cmUvdjEuMiI+DQogIDxGYXR0dXJhRWxldHRyb25pY2FIZWFkZXI+DQogICAgPERhdGlUcmFzbWlzc2lvbmU+DQogICAgICA8SWRUcmFzbWl0dGVudGU+DQogICAgICAgIDxJZFBhZXNlPklUPC9JZFBhZXNlPg0KICAgICAgICA8SWRDb2RpY2U+MDIxODIwMzAzOTE8L0lkQ29kaWNlPg0KICAgICAgPC9JZFRyYXNtaXR0ZW50ZT4NCiAgICAgIDxQcm9ncmVzc2l2b0ludmlvPjMxPC9Qcm9ncmVzc2l2b0ludmlvPg0KICAgICAgPEZvcm1hdG9UcmFzbWlzc2lvbmU+RlBSMTI8L0Zvcm1hdG9UcmFzbWlzc2lvbmU+DQogICAgICA8Q29kaWNlRGVzdGluYXRhcmlvPjAwMDAwMDA8L0NvZGljZURlc3RpbmF0YXJpbz4NCiAgICAgIDxDb250YXR0aVRyYXNtaXR0ZW50ZT4NCiAgICAgICAgPFRlbGVmb25vPjM0NS81NDIxNTUxPC9UZWxlZm9ubz4NCiAgICAgIDwvQ29udGF0dGlUcmFzbWl0dGVudGU+DQogICAgICA8UEVDRGVzdGluYXRhcmlvPmNpcjIwMDBzbmNAcGVjLml0PC9QRUNEZXN0aW5hdGFyaW8+DQogICAgPC9EYXRpVHJhc21pc3Npb25lPg0KICAgIDxDZWRlbnRlUHJlc3RhdG9yZT4NCiAgICAgIDxEYXRpQW5hZ3JhZmljaT4NCiAgICAgICAgPElkRmlzY2FsZUlWQT4NCiAgICAgICAgICA8SWRQYWVzZT5JVDwvSWRQYWVzZT4NCiAgICAgICAE4oCaA8OoICAgPElkQ29kaWNlPjAyMTgyMDMwMzkxPC9JZENvZGljZT4NCiAgICAgICAgPC9JZEZpc2NhbGVJVkE+DQogICAgICAgIDxDb2RpY2VGaXNjYWxlPjAyMTgyMDMwMzkxPC9Db2RpY2VGaXNjYWxlPg0KICAgICAgICA8QW5hZ3JhZmljYT4NCiAgICAgICAgICA8RGVub21pbmF6aW9uZT5BemllbmRhIGRpIGVzZW1waW88L0Rlbm9taW5hemlvbmU+DQogICAgICAgIDwvQW5hZ3JhZmljYT4NCiAgICAgICAgPFJlZ2ltZUZpc2NhbGU+UkYwMTwvUmVnaW1lRmlzY2FsZT4NCiAgICAgIDwvRGF0aUFuYWdyYWZpY2k+DQogICAgICA8U2VkZT4NCiAgICAgICAgPEluZGlyaXp6bz5WaWEgZGVpIFJvZGl0b3JpIDE1L3Y8L0luZGlyaXp6bz4NCiAgICAgICAgPENBUD4xMjEwMDwvQ0FQPg0KICAgICAgICA8Q29tdW5lPlZpbGxhIGRlaSBSb2RpdG9yaTwvQ29tdW5lPg0KICAgICAgICA8UHJvdmluY2lhPlJBPC9Qcm92aW5jaWE+DQogICAgICAgIDxOYXppb25lPklUPC9OYXppb25lPg0KICAgICAgPC9TZWRlPg0KICAgICAgPENvbnRhdHRpPg0KICAgICAgICA8VGVsZWZvbm8+MzQ1LzU1NTQ0NDwvVGVsZWZvbm8+DQogICAgICAgIDxGYXg+MDM1LzU1NTQ0MzwvRmF4Pg0KICAgICAgPC9Db250YXR0aT4NCiAgICA8L0NlZGVudGVQcmVzdGF0b3JlPg0KICAgIDxDZXNzaW9uYXJpb0NvbW1pdHRlbnRlPg0KICAgICAgPERhdGlBbmFncmFmaWNpPg0KICAgICAgICA8SWRGaXNjYWxlSVZBPg0KICAgICAgICAgIDxJZFBhZXNlPklUPC9JZFBhZXNlPg0KICAgICAgICAgIDxJZENvZGljZT4wMTE4MDY4MDM5NzwvSWRDb2RpY2U+DQogICAgICAgIDwvSWRGaXNjYWxlSVZBPg0KICAgICAgICA8QW5hZ3JhZmljYT4NCiAgICAgICAgICA8RGVub21pbmF6aW9uZT5DSVIgMjAwMCBzbmM8L0Rlbm9taW5hemlvbmU+DQogICAgICAgIDwvQW5hZ3JhZmljYT4NCiAgICAgIDwvRGF0aUFuYWdyYWZpY2k+DQogICAgICA8U2VkZT4NCiAgICAgICAgPEluZGlyaXp6bz52aWEgU2Fuc292aW5vIDQ1PATigJoDw6gvSW5kaXJpenpvPg0KICAgICAgICA8Q0FQPjQ4MTI0PC9DQVA+DQogICAgICAgIDxDb211bmU+UmF2ZW5uYTwvQ29tdW5lPg0KICAgICAgICA8UHJvdmluY2lhPlJBPC9Qcm92aW5jaWE+DQogICAgICAgIDxOYXppb25lPklUPC9OYXppb25lPg0KICAgICAgPC9TZWRlPg0KICAgIDwvQ2Vzc2lvbmFyaW9Db21taXR0ZW50ZT4NCiAgPC9GYXR0dXJhRWxldHRyb25pY2FIZWFkZXI+DQogIDxGYXR0dXJhRWxldHRyb25pY2FCb2R5Pg0KICAgIDxEYXRpR2VuZXJhbGk+DQogICAgICA8RGF0aUdlbmVyYWxpRG9jdW1lbnRvPg0KICAgICAgICA8VGlwb0RvY3VtZW50bz5URDAxPC9UaXBvRG9jdW1lbnRvPg0KICAgICAgICA8RGl2aXNhPkVVUjwvRGl2aXNhPg0KICAgICAgICA8RGF0YT4yMDE4LTA2LTA4PC9EYXRhPg0KICAgICAgICA8TnVtZXJvPjI8L051bWVybz4NCiAgICAgICAgPEltcG9ydG9Ub3RhbGVEb2N1bWVudG8+MTIyLjAwPC9JbXBvcnRvVG90YWxlRG9jdW1lbnRvPg0KICAgICAgICA8QXJyb3RvbmRhbWVudG8+MC4wMDwvQXJyb3RvbmRhbWVudG8+DQogICAgICA8L0RhdGlHZW5lcmFsaURvY3VtZW50bz4NCiAgICA8L0RhdGlHZW5lcmFsaT4NCiAgICA8RGF0aUJlbmlTZXJ2aXppPg0KICAgICAgPERldHRhZ2xpb0xpbmVlPg0KICAgICAgICA8TnVtZXJvTGluZWE+MTwvTnVtZXJvTGluZWE+DQogICAgICAgIDxEZXNjcml6aW9uZT50ZXN0IHByb2RvdHRpPC9EZXNjcml6aW9uZT4NCiAgICAgICAgPFF1YW50aXRhPjEuMDA8L1F1YW50aXRhPg0KICAgICAgICA8UHJlenpvVW5pdGFyaW8+MTAwLjAwPC9QcmV6em9Vbml0YXJpbz4NCiAgICAgICAgPFByZXp6b1RvdGFsZT4xMDAuMDA8L1ByZXp6b1RvdGFsZT4NCiAgICAgICAgPEFsaXF1b3RhSVZBPjIyLjAwPC9BbGlxdW90YUlWQT4NCiAgICAgIDwvRGV0dGFnbGlvTGluZWU+DQogICAgICA8RGF0aVJpZXBpbG9nbz4NCiAgICAgICAgPEFsaXF1b3RhSVZBPjIyLjAwPC9BbGlxdW90YUlWQT4NCiAgICAgICAgBMKBw6E8SW1wb25pYmlsZUltcG9ydG8+MTAwLjAwPC9JbXBvbmliaWxlSW1wb3J0bz4NCiAgICAgICAgPEltcG9zdGE+MjIuMDA8L0ltcG9zdGE+DQogICAgICAgIDxFc2lnaWJpbGl0YUlWQT5TPC9Fc2lnaWJpbGl0YUlWQT4NCiAgICAgIDwvRGF0aVJpZXBpbG9nbz4NCiAgICA8L0RhdGlCZW5pU2Vydml6aT4NCiAgPC9GYXR0dXJhRWxldHRyb25pY2FCb2R5Pg0KPC9wOkZhdHR1cmFFbGV0dHJvbmljYT4gICAgICDCoOKCrDDigJoHIjDigJoGDQrCoAMCAQICBCDFvcO9FjANCgYJKuKAoEjigKDDtw0KAQELBSAwwoHigKYxCzAJBgNVBAYTAklUMRUwEwYDVQQNCgwMSU5GT0NFUlQgU1BBMSIwIAYDVQQLDBlDZXJ0aWZpY2F0b3JlIEFjY3JlZGl0YXRvMRQwEgYDVQQFEwswNzk0NTIxMTAwNjElMCMGA1UEAwwcSW5mb0NlcnQgRmlybWEgUXVhbGlmaWNhdGEgMjAeFw0KMTgwOTAzMDgwMjAwWhcNCjIxMDkwMzAwMDAwMFowwoHigKYxCzAJBgNVBAYTAklUMRAwDgYDVQQEDAdHQVJESU5JMR8wHQYDVQQFExZUSU5JVC1HUkRTRk42NkQxN0gxOTlLMRgwFgYDVQQDDA9HQVJESU5JIFNURUZBTk8xFzAVBgNVBC4TDjIwMTg3MTE1MzAyNzY1MRAwDgYDVQQqDAdTVEVGQU5PMOKAmgEiMA0KBgkq4oCgSOKAoMO3DQoBAQEFIAPigJoBDyAw4oCaAQ0KAuKAmgEBIOKAnMKvXBHDpErCt8K8SxXCqcORL8OQc8K4G8OxDE/CsMOB4oCgwqnigJpaGcK4w6TDr8KrwqDDgcWgUg97w5cLbQ0Kw7XCpeKAmh5Pw4rCrgxyw67DoQ7CpFYswr5SHOKAnDgdw7PDnywawq7Fk8KmFmwbwrZEPcORxb5Cw57DkMK4LsOadsOJQcOGw4XigKBIbSxow6Ubw7UgwqbDojZHxb3DnEvDjcK9w6Yow6nCrUg7fBnDjsWT4oSiw4F9wqPDsuKAoAvDmngOUzA0w58cZjrDp0jDmMK1S8O7bcO0w7Bsw6R9GcO/csOtGinDhsK4WHpyG8O74oCiE+KAmRAiw5074oCcbV5zfcOIwrodZn8iceKAk8KNXDzCocK3N8OaAcKiw7zigJPFuDE0wqQgw4QEesOIw7HDhwJeZDnDgsKtwqXCvhvDmC5EOcOrOcO0ezPigLpHwr0C4oC6w4zDkMKwB8OdDGfDgsOZwoHDhg5vw6w/NXolwqHDisKpRVh3wo9PA8K9JMOewq8gwq8CAwEgAcKj4oCaA+KAkzDigJoD4oCZMAkGA1UdEwQCMCAwJQYDVR0SBB4wHMKBGmZpcm1hLmRpZ2l0YWxlQGluZm9jZXJ0Lml0MMKBw6cGA1UdHwTCgcOfMMKBw5wwMsKgMMKgLuKAoCxodHRwOi8vY3JsLmluZm9jZXJ0Lml0L2NybHMvZmlybWEyL0NSTDIyLmNybDDCgcKlwqDCgcKiwqDCgcW44oCgwoHFk2xkYXA6Ly9sZGFwLmluZm9jZXJ0Lml0L2NuJTNESW5mb0NlcnQlMjBGaXJtYSUyMFF1YWxpZmljYXRhJTIwMiUyMENSTDIyLG91JTNEQ2VydGlmaWNhdG9yZSUyMEFjY3JlZGl0YXRvLG8lM0RJTkZPQ0VSVCUyMFNQQSxjJTNESVQ/Y2VydGlmaWNhdGVSZXZvY2F0aW9uTGlzdDBuBggrBgEFBQcBAQRiMGAwJwYIKwYBBQUHMAHigKAbaHR0cDovL29jc3Auc2MuaW5mb2NlcnQuaXQvMDUGCCsGAQUFBzAC4oCgKWh0dHA6Ly9jZXJ0LmluZm9jZXJ0Lml0L2NhMi9maXJtYTIvQ0EuY3J0MG8GA1UdIARoMGYwTwYGK0wkAQEgMEUwQwYIKwYBBQUHAgEWN2h0dHA6Ly93d3cuZmlybWEuaW5mb2NlcnQuaXQvZG9jdW1lbnRhemlvbmUvbWFudWFsaS5waHAwCAYGK0wYAQECMAkGBwQg4oC5w6xAAQIwwoHigJ4GCCsGAQUFBwEDBHgwdjAIBgYEIMW9RgEBMAgGBgQgxb1GAQQwCwYGBCDFvUYBAwIBFDATBgYEIMW9RgEGMAkGBwQgxb1GAQYBMD4GBgQgxb1GAQUwNDAyFixodHRwczovL3d3dy5maXJtYS5pbmZvY2VydC5pdC9wZGYvUEtJLURTLnBkZhMCRU4wDgYDVR0PAQHDvwQEAwIGQDAoBgNVHQkEITAfMB0GCCsGAQUFBwkBMREYDzE5NjYwNDE3MDAwMDAwWjDCgcKyBgNVHSMEwoHCqjDCgcKn4oKsFOKAnMOdIcO8A8OQFQ0KcsKtwqPDjMOVxaEJwp044oC5wp3DqcKhwoHigLnCpMKBy4YwwoHigKYxCzAJBgNVBAYTAklUMRUwEwYDVQQNCgwMSU5GT0NFUlQgU1BBMSIwIAYDVQQLDBlDZXJ0aWZpY2F0b3JlIEFjY3JlZGl0YXRvMRQwEgYDVQQFEwswNzk0NTIxMTAwNjElMCMGA1UEAwwcSW5mb0NlcnQgRmlybWEgUXVhbGlmaWNhdGEgMuKAmgEBMB0GA1UdDgQWBBQ8w5bDhjtDw5w2eGXCuwh5w4figLDigqzDvELGksKjCTANCgYJKuKAoEjigKDDtw0KAQELBSAD4oCaAQEg4oCYceKAnMK8wqnCrsONwqlGw554eCjDgMKQVBPDlsO0IEXCucK3a38GFC3Dsjw/w6Q64oSiwrnDgTwqJ03Cr1wSfRMHdgYlKeKAmMO0KEZaIeKAmMKtPSTCowROw4sk4oCZ4oCiw4nigJTDjSbDj8Otw4cDwrfCocOv4oCmeBwF4oC6xbjLhsOAGTk/EwtrOMK7QVtNw7LDkFDDrcOCSMKdYmbLhgnigKDDgMWTasKvwrfDvcWhYEhqw48Ww6llQT9BVDjDtnTCs27Cj8Ovxb4LPnFaw7lsOsO5w7jCqGfDqcW+PcW9w5rFvsOSw7Ehw6xky4bigKLCvB3Du1rDncOWB8O4EMKgwqtTw5Biw7t4DQrDjX7DiS59xbhV4oSiBC/Dmgt3wrDigqzDiQbDgOKAuhM5EcOAN0jCscOBwqVtwrsSwrTGklPCncuGfMKQw5nDhxcpwqh5w4AHw4wpUGzDiGPCthdbw6tfIMObwp1nw4B7YWPDrMOxw6PCuXrigJhsRMOLwqITw6jCtcKmViAgMeKAmgJfMOKAmgJbAgEBMMKBxb0wwoHigKYxCzAJBgNVBAYTAklUMRUwEwYDVQQNCgwMSU5GT0NFUlQgU1BBMSIwIAYDVQQLDBlDZXJ0aWZpY2F0b3JlIEFjY3JlZGl0YXRvMRQwEgYDVQQFEwswNzk0NTIxMTAwNjElMCMGA1UEAwwcSW5mb0NlcnQgRmlybWEgUXVhbGlmaWNhdGEgMgIEIMW9w70WMA0KBglg4oCgSAFlAwQCAQUgwqDCgcKiMBgGCSrigKBI4oCgw7cNCgEJAzELBgkq4oCgSOKAoMO3DQoBBwEwHAYJKuKAoEjigKDDtw0KAQkFMQ8XDQoxODA5MDgxMzMyNDVaMC8GCSrigKBI4oCgw7cNCgEJBDEiBCABw4rDiC3DjSA2w5xJQsKpw78USCICb+KAmcOCM8O8X8OBZFF5wqU6w6tiy5zigKEwNwYLKuKAoEjigKDDtw0KAQkQAi8xKDAmMCQwIgQgw6rCu8Oqw4zCsnRYKcOmBHtXf3YnEHDCseKCrEFoFGlgwrZFBcKdKsOWccKuMA0KBgkq4oCgSOKAoMO3DQoBAQEFIATigJoBIHrCtDATVsO+WGAowq/igJjDm1/Ds8KyP8OMwqNXQSdqwqvCkG8xw4vCsAtjF8OuG2PCtMKNw6rDkeKAuQ8+w7o5w51nPiQobsKjw5Ivw4B7aXNpw5DLnMOdwrpEw7XCq3FbUhnigKJP4oCmw4osy4bCvSU5w4DDkDfCv1HCnWHDinDDtxfDtSZHw4wTw7cSAXRidB4Gw7PCo0bigKDigKLDtEfCvwgNCgLFoMKyICLFvlXCv+KAoXUZSzlrxbhdYcKgScOpDhrDj+KAoMK6w4TCrsucbUU1wqnDuzHDgSvCuUN/4oC5wr7DtcODYh8GQMONI8Ova8Oy4oCUM8KgV8O1R8KdeMO5w53igJPDncaSwqJXHyd0DMK8VXRRZOKAmG/CqMKwJ8KzIcOow6HCpcW9w446w7Eay5x/ZcOzw4pBKG1yw7TDrMK+esOdelDigKLFvsOfwqp2w5osB+KAk8OeXUVfDQrDs2sLwqQBKhXigqzigJoDw5pAa8ODBMOxC8OG4oCUFsK3wqDDsDIgICAgICA= ================================================ FILE: Test/Samples/IT02182030391_32.windows-1252.xml ================================================ IT 02182030391 32 FPR12 UFYAGJK 345/555444 cir2000snc@pec.it IT 12345678901 02182030391 Azienda di esempio RF01 Via dei Roditori 15/v 12100 Villa dei Roditori RA IT 345/555444 035/555443 IT 01180680397 CIR 2000 snc viale IV Novembre 86 48122 Marina di Ravenna RI IT TD06 EUR 2017-01-27 3 SC 10.00 SC 7.00 RT02 27.55 20.00 A TC03 4.00 5.51 0.00 23.00 174.80 0.00 99/bis 2017-02-28 alfacomm cup cig 99/bis 99/bis 2017-02-28 alfacomm cup cig 99 99 2017-02-28 alfacomm cup cig 99 99 2017-02-28 alfacomm cup cig 99s 99 2017-02-28 alfacomm cup cig 99bis 1 2 12tries 2017-02-28 12triesdf 2017-02-28 IT 02182030391 AB123 88 pallet KG 10.99 2017-02-28T15:00:00 2017-02-28 1 servizio 1.00 KG 2017-02-28 2017-02-28 137.77 MG 15.00 10 SC 10.00 10 SC 15.00 10 SC 20.00 10 SC 25.00 10 23.24 22.00 SI ciao 2 articolo EAN ALFA 2.00 137.77 275.54 22.00 22.00 143.28 31.52 S TP02 MP05 2017-02-28 119.86 TD06 EUR 2017-01-27 4 SC 10.00 SC 7.00 RT02 27.55 20.00 A TC03 4.00 5.51 0.00 23.00 174.80 0.00 99/bis 2017-02-28 alfacomm cup cig 99/bis 99/bis 2017-02-28 alfacomm cup cig 99 99 2017-02-28 alfacomm cup cig 99 99 2017-02-28 alfacomm cup cig 99s 99 2017-02-28 alfacomm cup cig 99bis 1 2 12tries 2017-02-28 12triesdf 2017-02-28 IT 02182030391 AB123 88 pallet KG 10.99 2017-02-28T15:00:00 2017-02-28 1 servizio 1.00 KG 2017-02-28 2017-02-28 137.77 SC 10.00 10 SC 15.00 10 SC 20.00 10 SC 25.00 10 23.24 22.00 SI ciao 2 articolo EAN ALFA 2.00 137.77 275.54 22.00 22.00 143.28 31.52 S TP02 MP05 2017-02-28 119.86 ================================================ FILE: Test/Samples/IT02182030391_32.xml ================================================ IT 02182030391 32 FPR12 UFYAGJK 345/555444 cir2000snc@pec.it IT 12345678901 02182030391 Azienda di esempio RF01 Via dei Roditori 15/v 12100 Villa dei Roditori RA IT 345/555444 035/555443 IT 01180680397 CIR 2000 snc viale IV Novembre 86 48122 Marina di Ravenna RI IT TD06 EUR 2017-01-27 3 SC 10.00 SC 7.00 RT02 27.55 20.00 A TC03 4.00 5.51 0.00 23.00 174.80 0.00 99/bis 2017-02-28 alfacomm cup cig 99/bis 99/bis 2017-02-28 alfacomm cup cig 99 99 2017-02-28 alfacomm cup cig 99 99 2017-02-28 alfacomm cup cig 99s 99 2017-02-28 alfacomm cup cig 99bis 1 2 12tries 2017-02-28 12triesdf 2017-02-28 IT 02182030391 AB123 88 pallet KG 10.99 2017-02-28T15:00:00 2017-02-28 1 servizio 1.00 KG 2017-02-28 2017-02-28 137.77 MG 15.00 10 SC 10.00 10 SC 15.00 10 SC 20.00 10 SC 25.00 10 23.24 22.00 SI ciao 2 articolo EAN ALFA 2.00 137.77 275.54 22.00 22.00 143.28 31.52 S TP02 MP05 2017-02-28 119.86 TD06 EUR 2017-01-27 4 SC 10.00 SC 7.00 RT02 27.55 20.00 A TC03 4.00 5.51 0.00 23.00 174.80 0.00 99/bis 2017-02-28 alfacomm cup cig 99/bis 99/bis 2017-02-28 alfacomm cup cig 99 99 2017-02-28 alfacomm cup cig 99 99 2017-02-28 alfacomm cup cig 99s 99 2017-02-28 alfacomm cup cig 99bis 1 2 12tries 2017-02-28 12triesdf 2017-02-28 IT 02182030391 AB123 88 pallet KG 10.99 2017-02-28T15:00:00 2017-02-28 1 servizio 1.00 KG 2017-02-28 2017-02-28 137.77 SC 10.00 10 SC 15.00 10 SC 20.00 10 SC 25.00 10 23.24 22.00 SI ciao 2 articolo EAN ALFA 2.00 137.77 275.54 22.00 22.00 143.28 31.52 S TP02 MP05 2017-02-28 119.86 ================================================ FILE: Test/Samples/fatturaPA_v1.2.1.xsl ================================================  Gennaio Febbraio Marzo Aprile Maggio Giugno Luglio Agosto Settembre Ottobre Novembre Dicembre Mese non riconosciuto

FATTURA ELETTRONICA

Versione

Dati relativi alla trasmissione

  • Identificativo del trasmittente:
  • Progressivo di invio:
  • Formato Trasmissione:
  • Codice Amministrazione destinataria:
  • Telefono del trasmittente:
  • E-mail del trasmittente:
  • Destinatario PEC:

Dati del cedente / prestatore

Dati anagrafici

  • Identificativo fiscale ai fini IVA:
  • Codice fiscale:
  • Denominazione:
  • Nome:
  • Cognome:
  • Titolo:
  • Codice EORI:
  • Albo professionale di appartenenza:
  • Provincia di competenza dell'Albo:
  • Numero iscrizione all'Albo:
  • Data iscrizione all'Albo:
  • Regime fiscale: (ordinario) (contribuenti minimi) (nuove iniziative produttive) - Non più valido in quanto abrogato dalla legge di stabilità 2015 (agricoltura e attività connesse e pesca) (vendita sali e tabacchi) (commercio fiammiferi) (editoria) (gestione servizi telefonia pubblica) (rivendita documenti di trasporto pubblico e di sosta) (intrattenimenti, giochi e altre attività di cui alla tariffa allegata al DPR 640/72) (agenzie viaggi e turismo) (agriturismo) (vendite a domicilio) (rivendita beni usati, oggetti d’arte, d’antiquariato o da collezione) (agenzie di vendite all’asta di oggetti d’arte, antiquariato o da collezione) (IVA per cassa P.A.) (IVA per cassa - art. 32-bis, D.L. 83/2012) (Regime forfettario) (altro) (!!! codice non previsto !!!)

Dati della sede

  • Indirizzo:
  • Numero civico:
  • CAP:
  • Comune:
  • Provincia:
  • Nazione:

Dati della stabile organizzazione

  • Indirizzo:
  • Numero civico:
  • CAP:
  • Comune:
  • Provincia:
  • Nazione:

Dati di iscrizione nel registro delle imprese

  • Provincia Ufficio Registro Imprese:
  • Numero di iscrizione:
  • Capitale sociale:
  • Numero soci: (socio unico) (più soci) (!!! codice non previsto !!!)
  • Stato di liquidazione: (in liquidazione) (non in liquidazione) (!!! codice non previsto !!!)

Recapiti

  • Telefono:
  • Fax:
  • E-mail:

Riferimento amministrativo

  • Riferimento:

Dati del rappresentante fiscale del cedente / prestatore

Dati anagrafici

  • Identificativo fiscale ai fini IVA:
  • Codice fiscale:
  • Denominazione:
  • Nome:
  • Cognome:
  • Titolo onorifico:
  • Codice EORI:

Dati del cessionario / committente

Dati anagrafici

  • Identificativo fiscale ai fini IVA:
  • Codice Fiscale:
  • Denominazione:
  • Nome:
  • Cognome:
  • Titolo onorifico:
  • Codice EORI:

Dati della sede

  • Indirizzo:
  • Numero civico:
  • CAP:
  • Comune:
  • Provincia:
  • Nazione:

Stabile organizzazione del cessionario / committente

  • Indirizzo:
  • Numero civico:
  • CAP:
  • Comune:
  • Provincia:
  • Nazione:

Dati del rappresentante fiscale del cessionario / committente

  • Identificativo fiscale ai fini IVA:
  • Denominazione:
  • Nome:
  • Cognome:

Dati del terzo intermediario soggetto emittente

Dati anagrafici

  • Identificativo fiscale ai fini IVA:
  • Codice Fiscale:
  • Denominazione:
  • Nome:
  • Cognome:
  • Titolo onorifico:
  • Codice EORI:

Soggetto emittente la fattura

  • Soggetto emittente: (cessionario/committente) (terzo) (!!! codice non previsto !!!)

Numero documento nel lotto:

Versione

Dati generali del documento

  • Tipologia documento: (fattura) (acconto/anticipo su fattura) (acconto/anticipo su parcella) (nota di credito) (nota di debito) (parcella) (!!! codice non previsto !!!)
  • Valuta importi:
  • Data documento:
  • Numero documento:
  • Importo totale documento:
  • Arrotondamento su Importo totale documento:
  • Causale:
  • Art. 73 DPR 633/72:

Ritenuta

  • Tipologia ritenuta: (ritenuta persone fisiche) (ritenuta persone giuridiche) (!!! codice non previsto !!!)
  • Importo ritenuta:
  • Aliquota ritenuta (%):
  • Causale di pagamento: (decodifica come da modello 770S)

Bollo

  • Bollo virtuale:
  • Importo bollo:

Cassa previdenziale

  • Tipologia cassa previdenziale: (Cassa Nazionale Previdenza e Assistenza Avvocati e Procuratori legali) (Cassa Previdenza Dottori Commercialisti) (Cassa Previdenza e Assistenza Geometri) (Cassa Nazionale Previdenza e Assistenza Ingegneri e Architetti liberi profess.) (Cassa Nazionale del Notariato) (Cassa Nazionale Previdenza e Assistenza Ragionieri e Periti commerciali) (Ente Nazionale Assistenza Agenti e Rappresentanti di Commercio-ENASARCO) (Ente Nazionale Previdenza e Assistenza Consulenti del Lavoro-ENPACL) (Ente Nazionale Previdenza e Assistenza Medici-ENPAM) (Ente Nazionale Previdenza e Assistenza Farmacisti-ENPAF) (Ente Nazionale Previdenza e Assistenza Veterinari-ENPAV) (Ente Nazionale Previdenza e Assistenza Impiegati dell'Agricoltura-ENPAIA) (Fondo Previdenza Impiegati Imprese di Spedizione e Agenzie Marittime) (Istituto Nazionale Previdenza Giornalisti Italiani-INPGI) (Opera Nazionale Assistenza Orfani Sanitari Italiani-ONAOSI) (Cassa Autonoma Assistenza Integrativa Giornalisti Italiani-CASAGIT) (Ente Previdenza Periti Industriali e Periti Industriali Laureati-EPPI) (Ente Previdenza e Assistenza Pluricategoriale-EPAP) (Ente Nazionale Previdenza e Assistenza Biologi-ENPAB) (Ente Nazionale Previdenza e Assistenza Professione Infermieristica-ENPAPI) (Ente Nazionale Previdenza e Assistenza Psicologi-ENPAP) (INPS) (!!! codice non previsto !!!)
  • Aliquota contributo cassa (%):
  • Importo contributo cassa:
  • Imponibile previdenziale:
  • Aliquota IVA applicata:
  • Contributo cassa soggetto a ritenuta:
  • Tipologia di non imponibilità del contributo: (escluse ex art. 15) (non soggette) (non imponibili) (esenti) (regime del margine / IVA non esposta in fattura) (inversione contabile) (IVA assolta in altro stato UE) (!!! codice non previsto !!!)
  • Riferimento amministrativo / contabile:

Sconto/maggiorazione

  • Tipologia: (sconto) (maggiorazione) (!!! codice non previsto !!!)
  • Percentuale:
  • Importo:

Dati dell'ordine di acquisto

  • Numero linea di fattura a cui si riferisce: ,
  • Identificativo ordine di acquisto:
  • Data ordine di acquisto:
  • Numero linea ordine di acquisto:
  • Codice commessa/convenzione:
  • Codice Unitario Progetto (CUP):
  • Codice Identificativo Gara (CIG):

Dati del contratto

  • Numero linea di fattura a cui si riferisce: ,
  • Identificativo contratto:
  • Data contratto:
  • Numero linea contratto:
  • Codice commessa/convenzione:
  • Codice Unitario Progetto (CUP):
  • Codice Identificativo Gara (CIG):

Dati della convenzione

  • Numero linea di fattura a cui si riferisce: ,
  • Identificativo convenzione:
  • Data convenzione:
  • Numero linea convenzione:
  • Codice commessa/convenzione:
  • Codice Unitario Progetto (CUP):
  • Codice Identificativo Gara (CIG):

Dati della ricezione

  • Numero linea di fattura a cui si riferisce: ,
  • Identificativo ricezione:
  • Data ricezione:
  • Numero linea ricezione:
  • Codice commessa/convenzione:
  • Codice Unitario Progetto (CUP):
  • Codice Identificativo Gara (CIG):

Dati della fattura collegata

  • Numero linea di fattura a cui si riferisce: ,
  • Identificativo fattura collegata:
  • Data fattura collegata:
  • Numero linea fattura collegata:
  • Codice commessa/convenzione:
  • Codice Unitario Progetto (CUP):
  • Codice Identificativo Gara (CIG):

Stato avanzamento lavori

  • Numero fase avanzamento: ,

Dati del documento di trasporto

  • Numero DDT:
  • Data DDT:
  • Numero linea di fattura a cui si riferisce: ,

Dati relativi al trasporto

Dati del vettore

  • Identificativo fiscale ai fini IVA:
  • Codice Fiscale:
  • Denominazione:
  • Nome:
  • Cognome:
  • Titolo onorifico:
  • Codice EORI:
  • Numero licenza di guida:

Altri dati

  • Mezzo di trasporto:
  • Causale trasporto:
  • Numero colli trasportati:
  • Descrizione beni trasportati:
  • Unità di misura del peso merce:
  • Peso lordo:
  • Peso netto:
  • Data e ora ritiro merce:
  • Data inizio trasporto:
  • Tipologia di resa: (codifica secondo standard ICC)
  • Indirizzo di resa:
  • Numero civico indirizzo di resa:
  • CAP indirizzo di resa:
  • Comune di resa:
  • Provincia di resa:
  • Nazione di resa:

Dati relativi alla fattura principale

  • Numero fattura principale:
  • Data fattura principale:

Dati relativi alle linee di dettaglio della fornitura

Nr. linea:
  • Tipo cessione/prestazione: (sconto) (premio) (abbuono) (spesa accessoria) (!!! codice non previsto !!!)
  • Codifica articolo
    • Tipo:
    • Valore:
  • Descrizione bene/servizio:
  • Quantità:
  • Unità di misura:
  • Data inizio periodo di riferimento:
  • Data fine periodo di riferimento:
  • Valore unitario:
  • Sconto/Maggiorazione
    • Tipo: (sconto) (maggiorazione) (!!! codice non previsto !!!)
    • Percentuale (%):
    • Importo:
  • Valore totale:
  • IVA (%):
  • Soggetta a ritenuta:
  • Natura operazione: (esclusa ex art.15) (non soggetta) (non imponibile) (esente) (regime del margine / IVA non esposta in fattura) (inversione contabile) (IVA assolta in altro stato UE) (!!! codice non previsto !!!)
  • Riferimento amministrativo/contabile:
  • Altri dati gestionali
    • Tipo dato:
    • Valore testo:
    • Valore numerico:
    • Valore data:

Dati di riepilogo per aliquota IVA e natura

  • Aliquota IVA (%):
  • Natura operazioni: (escluse ex art.15) (non soggette) (non imponibili) (esenti) (regime del margine / IVA non esposta in fattura) (inversione contabile) (IVA assolta in altro stato UE) (!!! codice non previsto !!!)
  • Spese accessorie:
  • Arrotondamento:
  • Totale imponibile/importo:
  • Totale imposta:
  • Esigibilità IVA: (esigibilità immediata) (esigibilità differita) (scissione dei pagamenti) (!!! codice non previsto !!!)
  • Riferimento normativo:

Dati Veicoli ex art. 38 dl 331/1993

  • Data prima immatricolazione / iscrizione PR:
  • Totale percorso:

Dati relativi al pagamento

  • Condizioni di pagamento: (pagamento a rate) (pagamento completo) (anticipo) (!!! codice non previsto !!!)
  • Dettaglio pagamento
    • Beneficiario del pagamento:
    • Modalità: (contanti) (assegno) (assegno circolare) (contanti presso Tesoreria) (bonifico) (vaglia cambiario) (bollettino bancario) (carta di pagamento) (RID) (RID utenze) (RID veloce) (RIBA) (MAV) (quietanza erario) (giroconto su conti di contabilità speciale) (domiciliazione bancaria) (domiciliazione postale) (bollettino di c/c postale) (SEPA Direct Debit) (SEPA Direct Debit CORE) (SEPA Direct Debit B2B) (Trattenuta su somme già riscosse) (!!! codice non previsto !!!)
    • Decorrenza termini di pagamento:
    • Termini di pagamento (in giorni):
    • Data scadenza pagamento:
    • Importo:
    • Codice Ufficio Postale:
    • Cognome del quietanzante:
    • Nome del quietanzante:
    • CF del quietanzante:
    • Titolo del quietanzante:
    • Istituto finanziario:
    • Codice IBAN:
    • Codice ABI:
    • Codice CAB:
    • Codice BIC:
    • Sconto per pagamento anticipato:
    • Data limite per il pagamento anticipato:
    • Penale per ritardato pagamento:
    • Data di decorrenza della penale:
    • Codice pagamento:

Dati relativi agli allegati

  • Nome dell'allegato:
  • Algoritmo di compressione:
  • Formato:
  • Descrizione:
================================================ FILE: Test/Semplificata/AllegatiValidator.cs ================================================ using FatturaElettronica.Common; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace FatturaElettronica.Test.Semplificata { [TestClass] public class AllegatiValidator : BaseClass { [TestMethod] public void NomeAttachmentIsRequired() { AssertRequired(x => x.NomeAttachment); } [TestMethod] public void NomeAttachmentMinMaxLength() { AssertMinMaxLength(x => x.NomeAttachment, 1, 60); } [TestMethod] public void NomeAttachmentMustBeLatin1Supplement() { AssertMustBeLatin1Supplement(x => x.NomeAttachment); } [TestMethod] public void AlgoritmoCompressioneIsOptional() { AssertOptional(x => x.AlgoritmoCompressione); } [TestMethod] public void AlgoritmoCompressioneMinMaxLength() { AssertMinMaxLength(x => x.AlgoritmoCompressione, 1, 60); } [TestMethod] public void AlgoritmoCompressioneMustBeBasicLatin() { AssertMustBeBasicLatin(x => x.AlgoritmoCompressione); } [TestMethod] public void FormatoAttachmentIsOptional() { AssertOptional(x => x.FormatoAttachment); } [TestMethod] public void FormatoAttachmentMinMaxLength() { AssertMinMaxLength(x => x.FormatoAttachment, 1, 10); } [TestMethod] public void FormatoAttachmentMustBeBasicLatin() { AssertMustBeBasicLatin(x => x.FormatoAttachment); } [TestMethod] public void DescrizioneAttachmentIsOptional() { AssertOptional(x => x.DescrizioneAttachment); } [TestMethod] public void DescrizioneAttachmentMinMaxLength() { AssertMinMaxLength(x => x.DescrizioneAttachment, 1, 100); } [TestMethod] public void DescrizioneAttachmentMustBeLatin1Supplement() { AssertMustBeLatin1Supplement(x => x.DescrizioneAttachment); } [TestMethod] public void AttachmentIsRequired() { AssertRequired(x => x.Attachment); } } } ================================================ FILE: Test/Semplificata/AltriDatiIdentificativiValidator.cs ================================================ using FatturaElettronica.Semplificata.FatturaElettronicaHeader.CessionarioCommittente; using FluentValidation.TestHelper; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace FatturaElettronica.Test.Semplificata { [TestClass] public class AltriDatiIdentificativiValidator : BaseClass { [TestMethod] public void DenominazioneIsRequiredWhenNomeCognomeIsEmpty() { Challenge.Nome = null; Challenge.Cognome = null; AssertRequired(x => x.Denominazione, expectedErrorCode: "00200"); AssertMinMaxLength(x => x.Denominazione, 1, 80, expectedErrorCode: "00200"); AssertMustBeLatin1Supplement(x => x.Denominazione); } [TestMethod] public void DenominazioneMustBeEmptyWhenNomeCognoneIsNotEmpty() { Challenge.Nome = "nome"; Challenge.Denominazione = "x"; var result = Validator.TestValidate(Challenge); result.ShouldHaveValidationErrorFor(x => x.Denominazione).WithErrorCode("00200"); Challenge.Denominazione = null; result = Validator.TestValidate(Challenge); result.ShouldNotHaveValidationErrorFor(x => x.Denominazione); Challenge.Denominazione = string.Empty; result = Validator.TestValidate(Challenge); result.ShouldNotHaveValidationErrorFor(x => x.Denominazione); } [TestMethod] public void NomeIsRequiredWhenDenominazioneIsEmpty() { Challenge.Denominazione = null; AssertRequired(x => x.Nome, expectedErrorCode: "00200"); AssertMinMaxLength(x => x.Nome, 1, 60, expectedErrorCode: "00200"); AssertMustBeLatin1Supplement(x => x.Nome); } [TestMethod] public void NomeMustBeEmptyWhenDenominazioneIsNotEmpty() { Challenge.Denominazione = "denominazione"; Challenge.Nome = "x"; var result = Validator.TestValidate(Challenge); result.ShouldHaveValidationErrorFor(x => x.Nome).WithErrorCode("00200"); Challenge.Nome = null; result = Validator.TestValidate(Challenge); result.ShouldNotHaveValidationErrorFor(x => x.Nome); Challenge.Nome = string.Empty; result = Validator.TestValidate(Challenge); result.ShouldNotHaveValidationErrorFor(x => x.Nome); } [TestMethod] public void CognomeIsRequiredWhenDenominazioneIsEmpty() { Challenge.Denominazione = null; AssertRequired(x => x.Cognome, expectedErrorCode: "00200"); AssertMinMaxLength(x => x.Cognome, 1, 60, expectedErrorCode: "00200"); AssertMustBeLatin1Supplement(x => x.Cognome); } [TestMethod] public void CognomeMustBeEmptyWhenDenominazioneIsNotEmpty() { Challenge.Denominazione = "denominazione"; Challenge.Cognome = "x"; var result = Validator.TestValidate(Challenge); result.ShouldHaveValidationErrorFor(x => x.Cognome).WithErrorCode("00200"); Challenge.Cognome = null; result = Validator.TestValidate(Challenge); result.ShouldNotHaveValidationErrorFor(x => x.Cognome); Challenge.Cognome = string.Empty; result = Validator.TestValidate(Challenge); result.ShouldNotHaveValidationErrorFor(x => x.Cognome); } [TestMethod] public void SedeHasChildValidator() { Validator.ShouldHaveChildValidator(x => x.Sede, typeof(FatturaElettronica.Validators.Semplificata.SedeCessionarioCommittenteValidator)); } [TestMethod] public void StabileOrganizzazioneHasChildValidator() { Validator.ShouldHaveDelegatePropertyChildValidator(x => x.StabileOrganizzazione, typeof(FatturaElettronica.Validators.Semplificata.StabileOrganizzazioneValidator)); } } } ================================================ FILE: Test/Semplificata/CedentePrestatoreValidator.cs ================================================ using FatturaElettronica.Semplificata.FatturaElettronicaHeader.CedentePrestatore; using FatturaElettronica.Tabelle; using FluentValidation.TestHelper; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace FatturaElettronica.Test.Semplificata { [TestClass] public class CedentePrestatoreValidator : BaseClass { [TestMethod] public void IdFiscaleIVAHasChildValidator() { Validator.ShouldHaveChildValidator(x => x.IdFiscaleIVA, typeof(Validators.IdFiscaleIVAValidator)); } [TestMethod] public void CodiceFiscaleIsOptional() { AssertOptional(x => x.CodiceFiscale); } [TestMethod] public void CodiceFiscaleMustBeDigitsOrUpperCase() { AssertDigitsOrUppercase(x => x.CodiceFiscale); } [TestMethod] public void CodiceFiscaleMinMaxLength() { AssertMinMaxLength(x => x.CodiceFiscale, 11, 16, 'X', "RegularExpressionValidator"); } [TestMethod] public void DenominazioneIsRequiredWhenNomeCognomeIsEmpty() { Challenge.Nome = null; Challenge.Cognome = null; AssertRequired(x => x.Denominazione, expectedErrorCode: "00200"); AssertMinMaxLength(x => x.Denominazione, 1, 80, expectedErrorCode: "00200"); AssertMustBeLatin1Supplement(x => x.Denominazione); } [TestMethod] public void DenominazioneMustBeEmptyWhenNomeCognoneIsNotEmpty() { Challenge.Nome = "nome"; Challenge.Denominazione = "x"; var result = Validator.TestValidate(Challenge); result.ShouldHaveValidationErrorFor(x => x.Denominazione).WithErrorCode("00200"); Challenge.Denominazione = null; result = Validator.TestValidate(Challenge); result.ShouldNotHaveValidationErrorFor(x => x.Denominazione); Challenge.Denominazione = string.Empty; result = Validator.TestValidate(Challenge); result.ShouldNotHaveValidationErrorFor(x => x.Denominazione); } [TestMethod] public void NomeIsRequiredWhenDenominazioneIsEmpty() { Challenge.Denominazione = null; AssertRequired(x => x.Nome, expectedErrorCode: "00200"); AssertMinMaxLength(x => x.Nome, 1, 60, expectedErrorCode: "00200"); AssertMustBeLatin1Supplement(x => x.Nome); } [TestMethod] public void NomeMustBeEmptyWhenDenominazioneIsNotEmpty() { Challenge.Denominazione = "denominazione"; Challenge.Nome = "x"; var result = Validator.TestValidate(Challenge); result.ShouldHaveValidationErrorFor(x => x.Nome).WithErrorCode("00200"); Challenge.Nome = null; result = Validator.TestValidate(Challenge); result.ShouldNotHaveValidationErrorFor(x => x.Nome); Challenge.Nome = string.Empty; result = Validator.TestValidate(Challenge); result.ShouldNotHaveValidationErrorFor(x => x.Nome); } [TestMethod] public void CognomeIsRequiredWhenDenominazioneIsEmpty() { Challenge.Denominazione = null; AssertRequired(x => x.Cognome, expectedErrorCode: "00200"); AssertMinMaxLength(x => x.Cognome, 1, 60, expectedErrorCode: "00200"); AssertMustBeLatin1Supplement(x => x.Cognome); } [TestMethod] public void CognomeMustBeEmptyWhenDenominazioneIsNotEmpty() { Challenge.Denominazione = "denominazione"; Challenge.Cognome = "x"; var result = Validator.TestValidate(Challenge); result.ShouldHaveValidationErrorFor(x => x.Cognome).WithErrorCode("00200"); Challenge.Cognome = null; result = Validator.TestValidate(Challenge); result.ShouldNotHaveValidationErrorFor(x => x.Cognome); Challenge.Cognome = string.Empty; result = Validator.TestValidate(Challenge); result.ShouldNotHaveValidationErrorFor(x => x.Cognome); } [TestMethod] public void SedeHasChildValidator() { Validator.ShouldHaveChildValidator(x => x.Sede, typeof(FatturaElettronica.Validators.Semplificata.SedeCedentePrestatoreValidator)); } [TestMethod] public void StabileOrganizzazioneHasChildValidator() { Validator.ShouldHaveDelegatePropertyChildValidator( x => x.StabileOrganizzazione, typeof(FatturaElettronica.Validators.Semplificata.StabileOrganizzazioneValidator)); } [TestMethod] public void IscrizioneREAHasChildValidator() { Validator.ShouldHaveDelegatePropertyChildValidator(x => x.IscrizioneREA, typeof(FatturaElettronica.Validators.Semplificata.IscrizioneREAValidator)); } [TestMethod] public void RegimeFiscaleIsRequired() { AssertRequired(x => x.RegimeFiscale); } [TestMethod] public void RegimeFiscaleOnlyAcceptsTableValues() { AssertOnlyAcceptsTableValues(x => x.RegimeFiscale); } } } ================================================ FILE: Test/Semplificata/CessionarioCommittenteValidator.cs ================================================ using FatturaElettronica.Semplificata.FatturaElettronicaHeader.CessionarioCommittente; using FluentValidation.TestHelper; using Microsoft.VisualStudio.TestTools.UnitTesting; using System.Linq; using FatturaElettronica.Resources; namespace FatturaElettronica.Test.Semplificata { [TestClass] public class CessionarioCommittenteValidator : BaseClass { [TestMethod] public void IdentificativiFiscaliHasChildValidator() { Validator.ShouldHaveChildValidator(x => x.IdentificativiFiscali, typeof(FatturaElettronica.Validators.Semplificata.IdentificativiFiscaliValidator)); } [TestMethod] public void IdentificativiFiscaliCannotBeEmpty() { var r = Validator.Validate(Challenge); Assert.AreEqual(ValidatorMessages.IdentificativiFiscaliEObbligatorio, r.Errors.FirstOrDefault(x => x.PropertyName == "IdentificativiFiscali")?.ErrorMessage); } [TestMethod] public void AltriDatiIdentificativiHasChildValidator() { Validator.ShouldHaveDelegatePropertyChildValidator(x => x.AltriDatiIdentificativi, typeof(FatturaElettronica.Validators.Semplificata.AltriDatiIdentificativiValidator)); } } } ================================================ FILE: Test/Semplificata/DatiBeniServiziValidator.cs ================================================ using FatturaElettronica.Semplificata.FatturaElettronicaBody.DatiBeniServizi; using FatturaElettronica.Tabelle; using FluentValidation.TestHelper; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace FatturaElettronica.Test.Semplificata { [TestClass] public class DatiBeniServiziValidator : BaseClass { [TestMethod] public void DescrizioneIsRequired() { AssertRequired(x => x.Descrizione); } [TestMethod] public void DescrizioneMinMaxLength() { AssertMinMaxLength(x => x.Descrizione, 1, 1000); } [TestMethod] public void DescrizioneMustBeLatin1Supplement() { AssertMustBeLatin1Supplement(x => x.Descrizione); } [TestMethod] public void ImportoIsRequired() { AssertRequired(x => x.Importo); } [TestMethod] public void DatiIVAHasChildValidator() { Validator.ShouldHaveChildValidator(x => x.DatiIVA, typeof(FatturaElettronica.Validators.Semplificata.DatiIVAValidator)); } [TestMethod] public void NaturaOnlyAcceptsTableValues() { AssertOnlyAcceptsTableValues(x => x.Natura); } [TestMethod] public void NaturaValidateAgainstError00401() { Challenge.DatiIVA.Aliquota = 22m; Challenge.DatiIVA.Imposta = 0m; Challenge.Natura = "N1"; var result = Validator.TestValidate(Challenge); result.ShouldHaveValidationErrorFor(x => x.Natura).WithErrorCode("00401"); Challenge.DatiIVA.Aliquota = 0m; Challenge.DatiIVA.Imposta = 22m; Challenge.Natura = "N1"; result = Validator.TestValidate(Challenge); result.ShouldHaveValidationErrorFor(x => x.Natura).WithErrorCode("00401"); Challenge.DatiIVA.Aliquota = 0m; Challenge.DatiIVA.Imposta = 0m; result = Validator.TestValidate(Challenge); result.ShouldNotHaveValidationErrorFor(x => x.Natura); } [TestMethod] public void NaturaValidateAgainstError00400() { Challenge.DatiIVA.Aliquota = 0m; Challenge.DatiIVA.Imposta = 0m; Challenge.Natura = string.Empty; var result = Validator.TestValidate(Challenge); result.ShouldHaveValidationErrorFor(x => x.Natura).WithErrorCode("00400"); Challenge.DatiIVA.Aliquota = 0m; Challenge.DatiIVA.Imposta = 0m; Challenge.Natura = null; result = Validator.TestValidate(Challenge); result.ShouldHaveValidationErrorFor(x => x.Natura).WithErrorCode("00400"); } [TestMethod] public void RiferimentoNormativoIsOptional() { AssertOptional(x => x.RiferimentoNormativo); } [TestMethod] public void RiferimentoNormativoMinMaxLength() { AssertMinMaxLength(x => x.RiferimentoNormativo, 1, 100); } [TestMethod] public void RiferimentoNormativoMustBeBasicLatin() { AssertMustBeBasicLatin(x => x.RiferimentoNormativo); } } } ================================================ FILE: Test/Semplificata/DatiGeneraliDocumentoValidator.cs ================================================ using FatturaElettronica.Semplificata.FatturaElettronicaBody.DatiGenerali; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace FatturaElettronica.Test.Semplificata { [TestClass] public class DatiGeneraliDocumentoValidator : BaseClass { [TestMethod] public void BolloVirtualeIsOptional() { AssertOptional(x => x.BolloVirtuale, emptyStringAllowed: false); } [TestMethod] public void BolloVirtualeOnlyAcceptsSIValue() { AssertOnlyAcceptsSIValue(x => x.BolloVirtuale); } } } ================================================ FILE: Test/Semplificata/DatiIVAValidator.cs ================================================ using FatturaElettronica.Semplificata.FatturaElettronicaBody.DatiBeniServizi; using FluentValidation.TestHelper; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace FatturaElettronica.Test.Semplificata { [TestClass] public class DatiIVAValidator : BaseClass { [TestMethod] public void AliquotaOImportoRequired() { Challenge.Imposta = null; Challenge.Aliquota = null; var result = Validator.TestValidate(Challenge); result.ShouldHaveValidationErrorFor(x => x.Imposta); result.ShouldHaveValidationErrorFor(x => x.Aliquota); Challenge.Aliquota = null; Challenge.Imposta = 0m; result = Validator.TestValidate(Challenge); result.ShouldNotHaveValidationErrorFor(x => x.Imposta); result.ShouldNotHaveValidationErrorFor(x => x.Aliquota); Challenge.Aliquota = 0m; Challenge.Imposta = null; result = Validator.TestValidate(Challenge); result.ShouldNotHaveValidationErrorFor(x => x.Imposta); result.ShouldNotHaveValidationErrorFor(x => x.Aliquota); } [TestMethod] public void AliquotaShouldBeLessOrEqualTo100() { Challenge.Imposta = null; Challenge.Aliquota = 101; var result = Validator.TestValidate(Challenge); result.ShouldHaveValidationErrorFor(x => x.Aliquota); Challenge.Imposta = null; Challenge.Aliquota = 100; result = Validator.TestValidate(Challenge); result.ShouldNotHaveValidationErrorFor(x => x.Aliquota); } } } ================================================ FILE: Test/Semplificata/DatiTrasmissioneValidator.cs ================================================ using FatturaElettronica.Semplificata.FatturaElettronicaHeader.DatiTrasmissione; using FatturaElettronica.Tabelle; using FluentValidation.TestHelper; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace FatturaElettronica.Test.Semplificata { [TestClass] public class DatiTrasmissioneValidator : BaseClass { [TestMethod] public void IdTrasmittenteHasChildValidator() { Validator.ShouldHaveChildValidator(x => x.IdTrasmittente, typeof(Validators.IdTrasmittenteValidator)); } [TestMethod] public void ProgressivoInvioIsRequired() { AssertRequired(x => x.ProgressivoInvio); } [TestMethod] public void ProgressivoInvioMinMaxLength() { AssertMinMaxLength(x => x.ProgressivoInvio, 1, 10); } [TestMethod] public void ProgressivoInvioMustBeBasicLatin() { AssertMustBeBasicLatin(x => x.ProgressivoInvio); } [TestMethod] public void FormatoTrasmissioneIsRequired() { AssertRequired(x => x.FormatoTrasmissione); } [TestMethod] public void FormatoTrasmissioneOnlyAcceptsTableValues() { AssertOnlyAcceptsTableValues(x => x.FormatoTrasmissione, expectedErrorCode: "00428"); } [TestMethod] public void CodiceDestinatarioIsRequired() { AssertRequired(x => x.CodiceDestinatario); } [TestMethod] public void CodiceDestinatarioMustBeValid() { Challenge.CodiceDestinatario = "hello"; var result = Validator.TestValidate(Challenge); result.ShouldHaveValidationErrorFor(x => x.CodiceDestinatario); Challenge.CodiceDestinatario = "Subm70N"; result = Validator.TestValidate(Challenge); result.ShouldHaveValidationErrorFor(x => x.CodiceDestinatario); Challenge.CodiceDestinatario = "Sub-70N"; result = Validator.TestValidate(Challenge); result.ShouldHaveValidationErrorFor(x => x.CodiceDestinatario); Challenge.CodiceDestinatario = "SUBM70N"; result = Validator.TestValidate(Challenge); result.ShouldNotHaveValidationErrorFor(x => x.CodiceDestinatario); } [TestMethod] public void CodiceDestinatarioWhenFormatoTrasmissioneHasValueFSM10() { // Quando FormatoTrasmissione = FSM10 ProgressivioInvio.Lenght = 7. Challenge.FormatoTrasmissione = Defaults.FormatoTrasmissione.Semplificata; AssertLength(x => x.CodiceDestinatario, 7, expectedErrorCode: "00311", filler: 'X'); } [TestMethod] public void PECDestinatarioIsOptional() { AssertOptional(x => x.PECDestinatario); } [TestMethod] public void PECDestinatarioMustBeValid() { Challenge.PECDestinatario = "not really"; var result = Validator.TestValidate(Challenge); result.ShouldHaveValidationErrorFor(x => x.PECDestinatario); Challenge.PECDestinatario = "maybe@we.can"; result = Validator.TestValidate(Challenge); result.ShouldNotHaveValidationErrorFor(x => x.PECDestinatario); } } } ================================================ FILE: Test/Semplificata/FatturaCreateInstance.cs ================================================ using FatturaElettronica.Defaults; using FatturaElettronica.Semplificata; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace FatturaElettronica.Test.Semplificata { [TestClass] public class FatturaSemplificataCreateInstance { FatturaSemplificata _challenge; [TestMethod] public void CreateSemplificataInstance() { _challenge = FatturaSemplificata.CreateInstance(Instance.Semplificata); Assert.AreEqual(FormatoTrasmissione.Semplificata, _challenge.FatturaElettronicaHeader.DatiTrasmissione.FormatoTrasmissione); Assert.AreEqual("0000000", _challenge.FatturaElettronicaHeader.DatiTrasmissione.CodiceDestinatario); } } } ================================================ FILE: Test/Semplificata/FatturaElettronicaBodyValidator.cs ================================================ using System.Linq; using FatturaElettronica.Resources; using FatturaElettronica.Semplificata.FatturaElettronicaBody; using FluentValidation.TestHelper; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace FatturaElettronica.Test.Semplificata { [TestClass] public class FatturaElettronicaBodyValidator : BaseClass { [TestMethod] public void DatiGeneraliHasChildValidator() { Validator.ShouldHaveChildValidator( x => x.DatiGenerali, typeof(FatturaElettronica.Validators.Semplificata.DatiGeneraliValidator)); } [TestMethod] public void DatiBeniServiziHasChildValidator() { Validator.ShouldHaveChildValidator( x => x.DatiBeniServizi, typeof(FatturaElettronica.Validators.Semplificata.DatiBeniServiziValidator)); } [TestMethod] public void DatiBeniServiziCannotBeEmpty() { var r = Validator.Validate(Challenge); Assert.AreEqual(ValidatorMessages.DatiBeniServiziEObbligatorio, r.Errors.FirstOrDefault(x => x.PropertyName == "DatiBeniServizi")?.ErrorMessage); } [TestMethod] public void AllegatiHasChildValidator() { Validator.ShouldHaveChildValidator( x => x.Allegati, typeof(FatturaElettronica.Validators.Semplificata.AllegatiValidator)); } } } ================================================ FILE: Test/Semplificata/FatturaElettronicaHeaderValidator.cs ================================================ using System.Linq; using FatturaElettronica.Semplificata.FatturaElettronicaHeader; using FatturaElettronica.Tabelle; using FluentValidation.TestHelper; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace FatturaElettronica.Test.Semplificata { [TestClass] public class FatturaElettronicaHeaderValidator : BaseClass { [TestMethod] public void DatiTramissioneHasChildValidator() { Validator.ShouldHaveChildValidator( x => x.DatiTrasmissione, typeof(FatturaElettronica.Validators.Semplificata.DatiTrasmissioneValidator)); } [TestMethod] public void CedentePrestatoreHasChildValidator() { Validator.ShouldHaveChildValidator( x => x.CedentePrestatore, typeof(FatturaElettronica.Validators.Semplificata.CedentePrestatoreValidator)); } [TestMethod] public void CessionarioCommittenteHasChildValidator() { Validator.ShouldHaveChildValidator( x => x.CessionarioCommittente, typeof(FatturaElettronica.Validators.Semplificata.CessionarioCommittenteValidator)); } [TestMethod] public void SoggettoEmittenteIsOptional() { AssertOptional(x => x.SoggettoEmittente); } [TestMethod] public void SoggettoEmittenteOnlyAcceptsTableValues() { AssertOnlyAcceptsTableValues(x => x.SoggettoEmittente); } [TestMethod] public void HeaderValidateAgainstError00476() { Challenge.CessionarioCommittente.IdentificativiFiscali.IdFiscaleIVA.IdPaese = "FR"; Challenge.CedentePrestatore.IdFiscaleIVA.IdPaese = "FR"; var result = Validator.Validate(Challenge); Assert.IsNotNull(result.Errors.FirstOrDefault(x => x.ErrorCode == "00476")); Challenge.CessionarioCommittente.IdentificativiFiscali.IdFiscaleIVA.IdPaese = "IT"; Challenge.CedentePrestatore.IdFiscaleIVA.IdPaese = "FR"; result = Validator.Validate(Challenge); Assert.IsNull(result.Errors.FirstOrDefault(x => x.ErrorCode == "00476")); Challenge.CessionarioCommittente.IdentificativiFiscali.IdFiscaleIVA.IdPaese = "FT"; Challenge.CedentePrestatore.IdFiscaleIVA.IdPaese = "IT"; result = Validator.Validate(Challenge); Assert.IsNull(result.Errors.FirstOrDefault(x => x.ErrorCode == "00476")); Challenge.CedentePrestatore.IdFiscaleIVA.IdPaese = "IT"; Challenge.CessionarioCommittente.IdentificativiFiscali.IdFiscaleIVA.IdPaese = null; result = Validator.Validate(Challenge); Assert.IsNull(result.Errors.FirstOrDefault(x => x.ErrorCode == "00476")); } } } ================================================ FILE: Test/Semplificata/FatturaSemplificataValidator.cs ================================================ using System.Linq; using FatturaElettronica.Common; using FatturaElettronica.Extensions; using FatturaElettronica.Semplificata; using FatturaElettronica.Semplificata.FatturaElettronicaBody; using FluentValidation.TestHelper; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace FatturaElettronica.Test.Semplificata { [TestClass] public class FatturaSemplificataValidator : BaseClass { [TestInitialize] public new void Init() { Validator = new(); Challenge = new(); } [TestMethod] public void FatturaElettronicaHeaderHasChildValidator() { Validator.ShouldHaveChildValidator( x => x.FatturaElettronicaHeader, typeof(FatturaElettronica.Validators.Semplificata.FatturaElettronicaHeaderValidator)); } [TestMethod] public void FatturaElettronicaBodyHasChildValidator() { Validator.ShouldHaveChildValidator( x => x.FatturaElettronicaBody, typeof(FatturaElettronica.Validators.Semplificata.FatturaElettronicaBodyValidator)); } [TestMethod] public void FatturaValidateAgainstError00471() { var tipiDocumento = new[] { "TD07" }; var cedente = Challenge.FatturaElettronicaHeader.CedentePrestatore; var cessionario = Challenge.FatturaElettronicaHeader.CessionarioCommittente; var id123 = new IdFiscaleIVA { IdPaese = "IT", IdCodice = "123" }; var id456 = new IdFiscaleIVA { IdPaese = "IT", IdCodice = "456" }; foreach (var tipoDocumento in tipiDocumento) { var body = new FatturaElettronicaBody(); body.DatiGenerali.DatiGeneraliDocumento.TipoDocumento = tipoDocumento; Challenge.FatturaElettronicaBody.Add(body); cedente.IdFiscaleIVA = id123; cessionario.IdentificativiFiscali.IdFiscaleIVA = id123; var result = Challenge.Validate(); Assert.IsNotNull(result.Errors.FirstOrDefault(x => x.ErrorCode == "00471")); cedente.IdFiscaleIVA = id456; result = Challenge.Validate(); Assert.IsNull(result.Errors.FirstOrDefault(x => x.ErrorCode == "00471")); cedente.IdFiscaleIVA = new(); cessionario.IdentificativiFiscali.IdFiscaleIVA = new(); result = Challenge.Validate(); Assert.IsNotNull(result.Errors.FirstOrDefault(x => x.ErrorCode == "00471")); } } } } ================================================ FILE: Test/Semplificata/IdentificativiFiscaliValidator.cs ================================================ using System.Linq; using FatturaElettronica.Semplificata.FatturaElettronicaHeader.CessionarioCommittente; using FluentValidation.TestHelper; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace FatturaElettronica.Test.Semplificata { [TestClass] public class IdentificativiFiscaliValidator : BaseClass { [TestMethod] public void IdFiscaleIVAHasChildValidator() { Validator.ShouldHaveDelegatePropertyChildValidator(x => x.IdFiscaleIVA, typeof(Validators.IdFiscaleIVAValidator)); } [TestMethod] public void CodiceFiscaleIsOptional() { Challenge.IdFiscaleIVA.IdCodice = "x"; AssertOptional(x => x.CodiceFiscale); } [TestMethod] public void CodiceFiscaleMustBeDigitsOrUpperCase() { AssertDigitsOrUppercase(x => x.CodiceFiscale); } [TestMethod] public void CodiceFiscaleMinMaxLength() { AssertMinMaxLength(x => x.CodiceFiscale, 11, 16, 'X', "RegularExpressionValidator"); } [TestMethod] public void CodiceFiscaleMustBeInUpperCase() { AssertMinMaxLength(x => x.CodiceFiscale, 11, 16, 'X', "RegularExpressionValidator"); } [TestMethod] public void IdFiscaleIVAIsOptional() { Challenge.CodiceFiscale = "x"; Assert.IsTrue(Challenge.IdFiscaleIVA.IsEmpty()); var r = Validator.Validate(Challenge); Assert.IsNull(r.Errors.FirstOrDefault(x => x.PropertyName == "IdFiscaleIVA")); } [TestMethod] public void CodiceFiscaleOrIdFiscaleIVAMustHaveValue() { Assert.IsTrue(string.IsNullOrEmpty(Challenge.CodiceFiscale)); Assert.IsTrue(Challenge.IdFiscaleIVA.IsEmpty()); var result = Validator.TestValidate(Challenge); result.ShouldHaveValidationErrorFor(x => x.CodiceFiscale).WithErrorCode("00417"); } } } ================================================ FILE: Test/Semplificata/XMLDeSerialize.cs ================================================ using System.IO; using System.Xml; using FatturaElettronica.Defaults; using FatturaElettronica.Extensions; using FatturaElettronica.Semplificata; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace FatturaElettronica.Test.Semplificata { [TestClass] public class XmlDeSerialize { [TestMethod] public void SerializeFatturaSemplificataHeader() { SerializeAndAssertRootElementAttributes(FatturaSemplificata.CreateInstance(Instance.Semplificata)); } [TestMethod] public void DeserializeAndThenSerializeOfficialSample() { DeserializeAndThenSerialize("Samples/IT01234567890_FSM10.xml"); } private void DeserializeAndThenSerialize(string filename) { var f = Deserialize(filename); Assert.IsTrue(f.Validate().IsValid); ValidateInvoice(f); // Serialize it back to disk, to another file using (var w = XmlWriter.Create("challenge.xml", new() {Indent = true})) { f.WriteXml(w); } // Deserialize the new file and validate it var f2 = Deserialize("challenge.xml"); Assert.IsTrue(f2.Validate().IsValid); ValidateInvoice(f2); File.Delete("challenge.xml"); } private FatturaSemplificata Deserialize(string fileName) { var f = FatturaSemplificata.CreateInstance(Instance.Semplificata); using (var r = XmlReader.Create(fileName, new() {IgnoreWhitespace = true})) { f.ReadXml(r); } return f; } private void ValidateInvoice(FatturaSemplificata f) { var header = f.FatturaElettronicaHeader; // DatiTrasmissione Assert.AreEqual("00001", header.DatiTrasmissione.ProgressivoInvio); Assert.AreEqual("0000000", header.DatiTrasmissione.CodiceDestinatario); Assert.AreEqual("IT", header.DatiTrasmissione.IdTrasmittente.IdPaese); Assert.AreEqual("01234567890", header.DatiTrasmissione.IdTrasmittente.IdCodice); Assert.AreEqual("betagamma@pec.it", header.DatiTrasmissione.PECDestinatario); // CedentePrestatore Assert.AreEqual("IT", header.CedentePrestatore.IdFiscaleIVA.IdPaese); Assert.AreEqual("01234567890", header.CedentePrestatore.IdFiscaleIVA.IdCodice); Assert.AreEqual("SOCIETA' ALPHA SRL", header.CedentePrestatore.Denominazione); Assert.AreEqual("RF01", header.CedentePrestatore.RegimeFiscale); Assert.AreEqual("VIALE ROMA 543", header.CedentePrestatore.Sede.Indirizzo); Assert.AreEqual("07100", header.CedentePrestatore.Sede.CAP); Assert.AreEqual("SASSARI", header.CedentePrestatore.Sede.Comune); Assert.AreEqual("IT", header.CedentePrestatore.Sede.Nazione); // CessionarioCommittente Assert.AreEqual("09876543210", header.CessionarioCommittente.IdentificativiFiscali.IdFiscaleIVA.IdCodice); Assert.AreEqual("IT", header.CessionarioCommittente.IdentificativiFiscali.IdFiscaleIVA.IdPaese); Assert.AreEqual("BETA GAMMA", header.CessionarioCommittente.AltriDatiIdentificativi.Denominazione); Assert.AreEqual("VIA TORINO 38-B", header.CessionarioCommittente.AltriDatiIdentificativi.Sede.Indirizzo); Assert.AreEqual("00145", header.CessionarioCommittente.AltriDatiIdentificativi.Sede.CAP); Assert.AreEqual("ROMA", header.CessionarioCommittente.AltriDatiIdentificativi.Sede.Comune); Assert.AreEqual("RM", header.CessionarioCommittente.AltriDatiIdentificativi.Sede.Provincia); Assert.AreEqual("IT", header.CessionarioCommittente.AltriDatiIdentificativi.Sede.Nazione); var body = f.FatturaElettronicaBody[0]; // DatiGeneraliDocumento Assert.AreEqual("TD07", body.DatiGenerali.DatiGeneraliDocumento.TipoDocumento); Assert.AreEqual("EUR", body.DatiGenerali.DatiGeneraliDocumento.Divisa); Assert.AreEqual(new(2019, 01, 01), body.DatiGenerali.DatiGeneraliDocumento.Data); Assert.AreEqual("123", body.DatiGenerali.DatiGeneraliDocumento.Numero); // DatiBeniServizi Assert.AreEqual( "LA DESCRIZIONE DELLA FORNITURA PUO' SUPERARE I CENTO CARATTERI CHE RAPPRESENTAVANO IL PRECEDENTE LIMITE DIMENSIONALE. TALE LIMITE NELLA NUOVA VERSIONE E' STATO PORTATO A MILLE CARATTERI", body.DatiBeniServizi[0].Descrizione); Assert.AreEqual(25m, body.DatiBeniServizi[0].Importo); Assert.AreEqual(22m, body.DatiBeniServizi[0].DatiIVA.Aliquota); Assert.AreEqual(null, body.DatiBeniServizi[0].Natura); Assert.AreEqual(null, body.DatiBeniServizi[0].RiferimentoNormativo); } private void SerializeAndAssertRootElementAttributes(FatturaBase f) { using (var w = XmlWriter.Create("test", new() {Indent = true})) { f.WriteXml(w); } using (var r = XmlReader.Create("test")) { while (r.Read()) { if (r.NodeType == XmlNodeType.Element) { if (r.Prefix == RootElement.Prefix && r.LocalName == "FatturaElettronicaSemplificata") { Assert.AreEqual( ((FatturaSemplificata) f).FatturaElettronicaHeader.DatiTrasmissione.FormatoTrasmissione, r.GetAttribute("versione")); Assert.AreEqual("http://ivaservizi.agenziaentrate.gov.it/docs/xsd/fatture/v1.0", r.NamespaceURI); foreach (var a in RootElement.ExtraAttributes) { Assert.AreEqual(a.value, r.GetAttribute($"{a.Prefix}:{a.LocalName}")); } break; } } } } File.Delete("test"); } } } ================================================ FILE: Test/TestHelpers.cs ================================================ using System; using System.Linq; using System.Linq.Expressions; using FluentValidation; using FluentValidation.Internal; using FluentValidation.TestHelper; using FluentValidation.Validators; namespace FatturaElettronica.Test { public static class TestHelpers { public static void ShouldHaveDelegatePropertyChildValidator(this IValidator validator, Expression> expression, Type propertyValidatorType) { var descriptor = validator.CreateDescriptor(); var expressionMemberName = expression.GetMember().Name; var matchingValidators = descriptor.GetValidatorsForMember(expressionMemberName).ToArray(); var propertyValidatorTypes = matchingValidators .Select(v => ((ChildValidatorAdaptor)v.Validator).ValidatorType); if (propertyValidatorTypes.All(x => x != propertyValidatorType)) { throw new ValidationTestException( $"Expected property '{expressionMemberName}' to have a property validator of type '{propertyValidatorType.Name}.'"); } } } } ================================================ FILE: Test/XMLDeSerialize.cs ================================================ using System; using System.IO; using System.Net.NetworkInformation; using System.Xml; using FatturaElettronica.Defaults; using FatturaElettronica.Extensions; using FatturaElettronica.Ordinaria; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace FatturaElettronica.Test { [TestClass] public class XMLDeSerialize { [TestMethod] public void SerializePrivatiHeader() { var f = FatturaOrdinaria.CreateInstance(Instance.Privati); Assert.IsNull(f.SistemaEmittente); SerializeAndAssertRootElementAttributes(f); f.SistemaEmittente = "sistema emittente"; SerializeAndAssertRootElementAttributes(f); } [TestMethod] public void SerializePubblicaAmministrazioneHeader() { var f = FatturaOrdinaria.CreateInstance(Instance.PubblicaAmministrazione); Assert.IsNull(f.SistemaEmittente); SerializeAndAssertRootElementAttributes(f); f.SistemaEmittente = "sistema emittente"; SerializeAndAssertRootElementAttributes(f); } [TestMethod] public void DeserializeAndThenSerializeOfficialPASample() { // Deserialize from an official example file // (downloaded from http://www.fatturapa.gov.it/export/fatturazione/it/normativa/f-2.htm) DeserializeAndThenSerialize("Samples/IT01234567890_FPA02.xml", FormatoTrasmissione.PubblicaAmministrazione); } [TestMethod] public void DeserializeAndThenSerializeOfficialPRSample() { // Deserialize from an official example file // (downloaded from http://www.fatturapa.gov.it/export/fatturazione/it/normativa/f-2.htm) DeserializeAndThenSerialize("Samples/IT01234567890_FPR02.xml", FormatoTrasmissione.Privati); } [TestMethod] public void DeserializeShouldRewindStreams() { using var signedStream = new FileStream("Samples/IT02182030391_31.xml.p7m", FileMode.Open, FileAccess.Read); signedStream.Position = 283; //Assumption is reading would fail if the stream were not rewound var invoice = FatturaBase.CreateInstanceFromXml(signedStream, false); Assert.IsTrue(invoice.Validate().IsValid && invoice.GetFormatoTrasmissione() == FormatoTrasmissione.Privati); using var baseEncodedStream = new FileStream("Samples/IT02182030391_31.Base64.xml.p7m", FileMode.Open, FileAccess.Read); baseEncodedStream.Position = 283;//Assumption is reading would fail if the stream were not rewound var baseEncodedInvoice = FatturaBase.CreateInstanceFromXml(baseEncodedStream, false); Assert.IsTrue(baseEncodedInvoice.Validate().IsValid && baseEncodedInvoice.GetFormatoTrasmissione() == FormatoTrasmissione.Privati); } [TestMethod] public void DeserializeAnyType() { var f = DeserializeAny("Samples/IT01234567890_FPA02.xml"); Assert.IsTrue(f.Validate().IsValid && f.GetFormatoTrasmissione() == FormatoTrasmissione.PubblicaAmministrazione); Assert.AreEqual("abc", f.SistemaEmittente); f = DeserializeAny("Samples/IT01234567890_FPR02.xml"); Assert.IsTrue(f.Validate().IsValid && f.GetFormatoTrasmissione() == FormatoTrasmissione.Privati); Assert.AreEqual("abc", f.SistemaEmittente); f = DeserializeAny("Samples/IT01234567890_FSM10.xml"); Assert.IsTrue(f.Validate().IsValid && f.GetFormatoTrasmissione() == FormatoTrasmissione.Semplificata); Assert.AreEqual("abc", f.SistemaEmittente); f = DeserializeAny("Samples/IT02182030391_31.xml.p7m"); Assert.IsTrue(f.Validate().IsValid && f.GetFormatoTrasmissione() == FormatoTrasmissione.Privati); f = DeserializeAny("Samples/IT02182030391_31.Base64.xml.p7m"); Assert.IsTrue(f.Validate().IsValid && f.GetFormatoTrasmissione() == FormatoTrasmissione.Privati); } private void DeserializeAndThenSerialize(string filename, string expectedFormat) { var f = Deserialize(filename); Assert.IsTrue(f.Validate().IsValid); ValidateInvoice(f, expectedFormat); // Serialize it back to disk, to another file using (var w = XmlWriter.Create("challenge.xml", new() {Indent = true})) { f.WriteXml(w); } // Deserialize the new file and validate it var f2 = Deserialize("challenge.xml"); Assert.IsTrue(f2.Validate().IsValid); ValidateInvoice(f2, expectedFormat); File.Delete("challenge.xml"); } private FatturaOrdinaria Deserialize(string fileName) { var f = FatturaOrdinaria.CreateInstance(Instance.Privati); using (var r = XmlReader.Create(fileName, new() {IgnoreWhitespace = true})) { f.ReadXml(r); } return f; } [TestMethod] public void DeserializeWindows1252EncodedXml() { var f = DeserializeAny("Samples/IT02182030391_32.windows-1252.xml"); Assert.AreEqual(FormatoTrasmissione.Privati, f.GetFormatoTrasmissione()); } private FatturaBase DeserializeAny(string fileName) { using var fileStream = new FileStream(fileName, FileMode.Open, FileAccess.Read); return FatturaBase.CreateInstanceFromXml(fileStream); } private void ValidateInvoice(FatturaOrdinaria f, string expectedFormat) { var header = f.FatturaElettronicaHeader; // DatiTrasmissione Assert.AreEqual("00001", header.DatiTrasmissione.ProgressivoInvio); Assert.AreEqual((expectedFormat == FormatoTrasmissione.Privati) ? "0000000" : "AAAAAA", header.DatiTrasmissione.CodiceDestinatario); Assert.AreEqual("IT", header.DatiTrasmissione.IdTrasmittente.IdPaese); Assert.AreEqual("01234567890", header.DatiTrasmissione.IdTrasmittente.IdCodice); Assert.AreEqual((expectedFormat == FormatoTrasmissione.Privati) ? "betagamma@pec.it" : null, header.DatiTrasmissione.PECDestinatario); // CedentePrestatore Assert.AreEqual("IT", header.CedentePrestatore.DatiAnagrafici.IdFiscaleIVA.IdPaese); Assert.AreEqual("01234567890", header.CedentePrestatore.DatiAnagrafici.IdFiscaleIVA.IdCodice); Assert.AreEqual("SOCIETA' ALPHA SRL", header.CedentePrestatore.DatiAnagrafici.Anagrafica.Denominazione); Assert.AreEqual("Titolo", header.CedentePrestatore.DatiAnagrafici.Anagrafica.Titolo); Assert.AreEqual("RF01", header.CedentePrestatore.DatiAnagrafici.RegimeFiscale); Assert.AreEqual("VIALE ROMA 543", header.CedentePrestatore.Sede.Indirizzo); Assert.AreEqual("07100", header.CedentePrestatore.Sede.CAP); Assert.AreEqual("SASSARI", header.CedentePrestatore.Sede.Comune); Assert.AreEqual("IT", header.CedentePrestatore.Sede.Nazione); // CessionarioCommittente Assert.AreEqual("09876543210", header.CessionarioCommittente.DatiAnagrafici.CodiceFiscale); Assert.AreEqual((expectedFormat == FormatoTrasmissione.Privati) ? "BETA GAMMA" : "AMMINISTRAZIONE BETA", header.CessionarioCommittente.DatiAnagrafici.Anagrafica.Denominazione); Assert.AreEqual("Titolo", header.CessionarioCommittente.DatiAnagrafici.Anagrafica.Titolo); Assert.AreEqual("VIA TORINO 38-B", header.CessionarioCommittente.Sede.Indirizzo); Assert.AreEqual("00145", header.CessionarioCommittente.Sede.CAP); Assert.AreEqual("ROMA", header.CessionarioCommittente.Sede.Comune); Assert.AreEqual("RM", header.CessionarioCommittente.Sede.Provincia); Assert.AreEqual("IT", header.CessionarioCommittente.Sede.Nazione); var body = f.FatturaElettronicaBody[0]; // DatiGeneraliDocumento Assert.AreEqual("TD01", body.DatiGenerali.DatiGeneraliDocumento.TipoDocumento); Assert.AreEqual("EUR", body.DatiGenerali.DatiGeneraliDocumento.Divisa); Assert.AreEqual(new(2014, 12, 18), body.DatiGenerali.DatiGeneraliDocumento.Data); Assert.AreEqual("123", body.DatiGenerali.DatiGeneraliDocumento.Numero); Assert.AreEqual( "LA FATTURA FA RIFERIMENTO AD UNA OPERAZIONE AAAA BBBBBBBBBBBBBBBBBB CCC DDDDDDDDDDDDDDD E FFFFFFFFFFFFFFFFFFFF GGGGGGGGGG HHHHHHH II LLLLLLLLLLLLLLLLL MMM NNNNN OO PPPPPPPPPPP QQQQ RRRR SSSSSSSSSSSSSS", body.DatiGenerali.DatiGeneraliDocumento.Causale[0]); Assert.AreEqual( "SEGUE DESCRIZIONE CAUSALE NEL CASO IN CUI NON SIANO STATI SUFFICIENTI 200 CARATTERI AAAAAAAAAAA BBBBBBBBBBBBBBBBB", body.DatiGenerali.DatiGeneraliDocumento.Causale[1]); // DatiOrdineAcquisto Assert.AreEqual(1, body.DatiGenerali.DatiOrdineAcquisto[0].RiferimentoNumeroLinea[0]); Assert.AreEqual("66685", body.DatiGenerali.DatiOrdineAcquisto[0].IdDocumento); Assert.AreEqual("1", body.DatiGenerali.DatiOrdineAcquisto[0].NumItem); if (expectedFormat == FormatoTrasmissione.PubblicaAmministrazione) { Assert.AreEqual("123abc", body.DatiGenerali.DatiOrdineAcquisto[0].CodiceCUP); Assert.AreEqual("456def", body.DatiGenerali.DatiOrdineAcquisto[0].CodiceCIG); // DatiContratto Assert.AreEqual(1, body.DatiGenerali.DatiContratto[0].RiferimentoNumeroLinea[0]); Assert.AreEqual("123", body.DatiGenerali.DatiContratto[0].IdDocumento); Assert.AreEqual(new(2016, 9, 1), body.DatiGenerali.DatiContratto[0].Data.Value); Assert.AreEqual("5", body.DatiGenerali.DatiContratto[0].NumItem); Assert.AreEqual("123abc", body.DatiGenerali.DatiContratto[0].CodiceCUP); Assert.AreEqual("456def", body.DatiGenerali.DatiContratto[0].CodiceCIG); // DatiConvenzione Assert.AreEqual(1, body.DatiGenerali.DatiConvenzione[0].RiferimentoNumeroLinea[0]); Assert.AreEqual("456", body.DatiGenerali.DatiConvenzione[0].IdDocumento); Assert.AreEqual("5", body.DatiGenerali.DatiConvenzione[0].NumItem); Assert.AreEqual("123abc", body.DatiGenerali.DatiConvenzione[0].CodiceCUP); Assert.AreEqual("456def", body.DatiGenerali.DatiConvenzione[0].CodiceCIG); // DatiRicezione Assert.AreEqual(1, body.DatiGenerali.DatiRicezione[0].RiferimentoNumeroLinea[0]); Assert.AreEqual("789", body.DatiGenerali.DatiRicezione[0].IdDocumento); Assert.AreEqual("5", body.DatiGenerali.DatiRicezione[0].NumItem); Assert.AreEqual("123abc", body.DatiGenerali.DatiRicezione[0].CodiceCUP); Assert.AreEqual("456def", body.DatiGenerali.DatiRicezione[0].CodiceCIG); } // DatiAnagraficiVettore Assert.AreEqual("IT", body.DatiGenerali.DatiTrasporto.DatiAnagraficiVettore.IdFiscaleIVA.IdPaese); Assert.AreEqual("24681012141", body.DatiGenerali.DatiTrasporto.DatiAnagraficiVettore.IdFiscaleIVA.IdCodice); Assert.AreEqual("Trasporto spa", body.DatiGenerali.DatiTrasporto.DatiAnagraficiVettore.Anagrafica.Denominazione); // DataOraConsegna Assert.AreEqual(new DateTime(2012, 10, 22, 16, 46, 12), body.DatiGenerali.DatiTrasporto.DataOraConsegna); // DatiBeniServizi Assert.AreEqual(1, body.DatiBeniServizi.DettaglioLinee[0].NumeroLinea); Assert.AreEqual( "LA DESCRIZIONE DELLA FORNITURA PUO' SUPERARE I CENTO CARATTERI CHE RAPPRESENTAVANO IL PRECEDENTE LIMITE DIMENSIONALE. TALE LIMITE NELLA NUOVA VERSIONE E' STATO PORTATO A MILLE CARATTERI", body.DatiBeniServizi.DettaglioLinee[0].Descrizione); Assert.AreEqual(5m, body.DatiBeniServizi.DettaglioLinee[0].Quantita); Assert.AreEqual(1m, body.DatiBeniServizi.DettaglioLinee[0].PrezzoUnitario); Assert.AreEqual(5m, body.DatiBeniServizi.DettaglioLinee[0].PrezzoTotale); Assert.AreEqual(22m, body.DatiBeniServizi.DettaglioLinee[0].AliquotaIVA); Assert.AreEqual(2, body.DatiBeniServizi.DettaglioLinee[1].NumeroLinea); Assert.AreEqual("FORNITURE VARIE PER UFFICIO", body.DatiBeniServizi.DettaglioLinee[1].Descrizione); Assert.AreEqual(10m, body.DatiBeniServizi.DettaglioLinee[1].Quantita); Assert.AreEqual(2m, body.DatiBeniServizi.DettaglioLinee[1].PrezzoUnitario); Assert.AreEqual(20m, body.DatiBeniServizi.DettaglioLinee[1].PrezzoTotale); Assert.AreEqual(22m, body.DatiBeniServizi.DettaglioLinee[1].AliquotaIVA); Assert.AreEqual(3, body.DatiBeniServizi.DettaglioLinee[2].NumeroLinea); Assert.AreEqual("TUBI RITORNO GASOLIO", body.DatiBeniServizi.DettaglioLinee[2].Descrizione); Assert.AreEqual(2m, body.DatiBeniServizi.DettaglioLinee[2].Quantita); Assert.AreEqual(5m, body.DatiBeniServizi.DettaglioLinee[2].PrezzoUnitario); Assert.AreEqual(6.58m, body.DatiBeniServizi.DettaglioLinee[2].PrezzoTotale); Assert.AreEqual(22m, body.DatiBeniServizi.DettaglioLinee[2].AliquotaIVA); Assert.AreEqual("SC", body.DatiBeniServizi.DettaglioLinee[2].ScontoMaggiorazione[0].Tipo); Assert.AreEqual(-1.71m, body.DatiBeniServizi.DettaglioLinee[2].ScontoMaggiorazione[0].Importo); Assert.AreEqual("TUBI RITORNO GASOLIO", body.DatiBeniServizi.DettaglioLinee[2].Descrizione); Assert.AreEqual(1m, body.DatiBeniServizi.DettaglioLinee[3].Quantita); Assert.AreEqual(5m, body.DatiBeniServizi.DettaglioLinee[3].PrezzoUnitario); Assert.AreEqual(4.5m, body.DatiBeniServizi.DettaglioLinee[3].PrezzoTotale); Assert.AreEqual(22m, body.DatiBeniServizi.DettaglioLinee[3].AliquotaIVA); Assert.AreEqual("SC", body.DatiBeniServizi.DettaglioLinee[3].ScontoMaggiorazione[0].Tipo); Assert.AreEqual(10.0m, body.DatiBeniServizi.DettaglioLinee[3].ScontoMaggiorazione[0].Percentuale); // DatiRiepilogo Assert.AreEqual(22m, body.DatiBeniServizi.DatiRiepilogo[0].AliquotaIVA); Assert.AreEqual(36.08m, body.DatiBeniServizi.DatiRiepilogo[0].ImponibileImporto); Assert.AreEqual(7.94m, body.DatiBeniServizi.DatiRiepilogo[0].Imposta); Assert.AreEqual("D", body.DatiBeniServizi.DatiRiepilogo[0].EsigibilitaIVA); // DatiPagamento Assert.AreEqual("TP01", body.DatiPagamento[0].CondizioniPagamento); Assert.AreEqual("MP01", body.DatiPagamento[0].DettaglioPagamento[0].ModalitaPagamento); Assert.AreEqual(new(2015, 01, 30), body.DatiPagamento[0].DettaglioPagamento[0].DataScadenzaPagamento.Value); Assert.AreEqual(36.08m, body.DatiPagamento[0].DettaglioPagamento[0].ImportoPagamento); } private void SerializeAndAssertRootElementAttributes(FatturaBase f) { using (var w = XmlWriter.Create("test", new() {Indent = true})) { f.WriteXml(w); } using (var r = XmlReader.Create("test")) { while (r.Read()) { if (r.NodeType != XmlNodeType.Element) continue; if (r.Prefix != RootElement.Prefix || r.LocalName != "FatturaElettronica") continue; Assert.AreEqual( ((FatturaOrdinaria) f).FatturaElettronicaHeader.DatiTrasmissione.FormatoTrasmissione, r.GetAttribute("versione")); Assert.AreEqual(f.SistemaEmittente, r.GetAttribute("SistemaEmittente")); Assert.AreEqual("http://ivaservizi.agenziaentrate.gov.it/docs/xsd/fatture/v1.2", r.NamespaceURI); foreach (var a in RootElement.ExtraAttributes) { Assert.AreEqual(a.value, r.GetAttribute($"{a.Prefix}:{a.LocalName}")); } break; } } File.Delete("test"); } } } ================================================ FILE: Validators/AllegatiValidator.cs ================================================ using FluentValidation; using FatturaElettronica.Common; namespace FatturaElettronica.Validators { public class AllegatiValidator : AbstractValidator { public AllegatiValidator() { RuleFor(x => x.NomeAttachment) .NotEmpty() .Latin1SupplementValidator() .Length(1, 60); RuleFor(x => x.AlgoritmoCompressione) .Length(1, 60) .BasicLatinValidator() .When(x => !string.IsNullOrEmpty(x.AlgoritmoCompressione)); RuleFor(x => x.FormatoAttachment) .Length(1, 10) .BasicLatinValidator() .When(x => !string.IsNullOrEmpty(x.FormatoAttachment)); RuleFor(x => x.DescrizioneAttachment) .Length(1, 100) .Latin1SupplementValidator() .When(x => !string.IsNullOrEmpty(x.DescrizioneAttachment)); RuleFor(x => x.Attachment) .NotEmpty(); } } } ================================================ FILE: Validators/AltriDatiGestionaliValidator.cs ================================================ using FatturaElettronica.Extensions; using FluentValidation; using FatturaElettronica.Ordinaria.FatturaElettronicaBody.DatiBeniServizi; namespace FatturaElettronica.Validators { public class AltriDatiGestionaliValidator : AbstractValidator { public AltriDatiGestionaliValidator() { RuleFor(x => x.TipoDato) .NotEmpty() .BasicLatinValidator() .Length(1, 10); RuleFor(x => x.RiferimentoTesto) .Length(1, 60) .Latin1SupplementValidator() .When(x => !string.IsNullOrEmpty(x.RiferimentoTesto)); RuleFor(x => x.RiferimentoNumero) .ScalePrecision8DecimalType(); } } } ================================================ FILE: Validators/AnagraficaValidator.cs ================================================ using FluentValidation; using FatturaElettronica.Common; namespace FatturaElettronica.Validators { public class AnagraficaValidator : DenominazioneNomeCognomeValidator { public AnagraficaValidator() { RuleFor(x => x.Titolo) .Length(2, 10) .BasicLatinValidator() .When(x => !string.IsNullOrEmpty(x.Titolo)); RuleFor(x => x.CodEORI) .Length(13, 17) .When(x => !string.IsNullOrEmpty(x.CodEORI)); } } } ================================================ FILE: Validators/CausaleValidator.cs ================================================ using FluentValidation; namespace FatturaElettronica.Validators { public class CausaleValidator : AbstractValidator { public CausaleValidator(int min, int max) { RuleFor(x => x) .NotEmpty() .Length(min, max) .Latin1SupplementValidator(); } } } ================================================ FILE: Validators/CedentePrestatoreValidator.cs ================================================ using FatturaElettronica.Ordinaria.FatturaElettronicaHeader.CedentePrestatore; using FluentValidation; namespace FatturaElettronica.Validators { public class CedentePrestatoreValidator : AbstractValidator { public CedentePrestatoreValidator() { RuleFor(x => x.DatiAnagrafici) .SetValidator(new DatiAnagraficiCedentePrestatoreValidator()); RuleFor(x => x.Sede) .SetValidator(new SedeCedentePrestatoreValidator()); RuleFor(x => x.StabileOrganizzazione) .SetValidator(new StabileOrganizzazioneValidator()) .When(x => x.StabileOrganizzazione != null && !x.StabileOrganizzazione.IsEmpty()); RuleFor(x => x.IscrizioneREA) .SetValidator(new IscrizioneREAValidator()) .When(x => x.IscrizioneREA != null && !x.IscrizioneREA.IsEmpty()); RuleFor(x => x.Contatti) .SetValidator(new ContattiValidator()) .When(x => x.Contatti != null && !x.Contatti.IsEmpty()); RuleFor(x => x.RiferimentoAmministrazione) .BasicLatinValidator() .Length(1, 20); } } } ================================================ FILE: Validators/CessionarioCommittenteValidator.cs ================================================ using FatturaElettronica.Ordinaria.FatturaElettronicaHeader.CessionarioCommittente; using FluentValidation; namespace FatturaElettronica.Validators { public class CessionarioCommittenteValidator : AbstractValidator { public CessionarioCommittenteValidator() { RuleFor(x => x.DatiAnagrafici) .SetValidator(new DatiAnagraficiCessionarioCommittenteValidator()); RuleFor(x => x.Sede) .SetValidator(new SedeCessionarioCommittenteValidator()); RuleFor(x => x.StabileOrganizzazione) .SetValidator(new StabileOrganizzazioneValidator()) .When(x => x.StabileOrganizzazione != null && !x.StabileOrganizzazione.IsEmpty()); RuleFor(x => x.RappresentanteFiscale) .SetValidator(new RappresentanteFiscaleCessionarioCommittenteValidator()) .When(x => x.RappresentanteFiscale != null && !x.RappresentanteFiscale.IsEmpty()); } } } ================================================ FILE: Validators/CodiceArticoloValidator.cs ================================================ using FluentValidation; using FatturaElettronica.Ordinaria.FatturaElettronicaBody.DatiBeniServizi; namespace FatturaElettronica.Validators { public class CodiceArticoloValidator : AbstractValidator { public CodiceArticoloValidator() { RuleFor(x => x.CodiceTipo) .NotEmpty() .BasicLatinValidator() .Length(1, 35); RuleFor(x => x.CodiceValore) .NotEmpty() .Latin1SupplementValidator() .Length(1, 35); } } } ================================================ FILE: Validators/Constants.cs ================================================ namespace FatturaElettronica.Validators; public class Constants { // Vedi 'EmailType' in https://www.agenziaentrate.gov.it/portale/documents/20143/4631413/Schema_VFPR12.xsd public static string EmailRegex = "^([!#-'*+/0-9=?A-Z^-~\\-]+(\\.[!#-'*+/0-9=?A-Z^-~\\-]+)*|\"([\\[\\]!#\\-[^\\-~ \\t]|(\\\\[\\t \\-~]))+\")@([!#-'*+/0-9=?A-Z^-~\\-]+(\\.[!#-'*+/0-9=?A-Z^-~\\-]+)*|\\[[\\t \\-Z^-~]*\\])$"; } ================================================ FILE: Validators/ContattiTrasmittenteValidator.cs ================================================ using FatturaElettronica.Ordinaria.FatturaElettronicaHeader.DatiTrasmissione; using FluentValidation; namespace FatturaElettronica.Validators { public class ContattiTrasmittenteValidator : AbstractValidator { public ContattiTrasmittenteValidator() { RuleFor(dt => dt.Telefono) .Length(5, 12) .When(x => !string.IsNullOrEmpty(x.Telefono)); RuleFor(dt => dt.Email) .Length(7, 256) .Matches(Constants.EmailRegex) .When(x => !string.IsNullOrEmpty(x.Email)); } } } ================================================ FILE: Validators/ContattiValidator.cs ================================================ using FatturaElettronica.Ordinaria.FatturaElettronicaHeader.CedentePrestatore; using FluentValidation; namespace FatturaElettronica.Validators { public class ContattiValidator : AbstractValidator { public ContattiValidator() { RuleFor(x => x.Telefono) .Length(5, 12) .When(x => !string.IsNullOrEmpty(x.Telefono)); RuleFor(x => x.Fax) .Length(5, 12) .When(x => !string.IsNullOrEmpty(x.Fax)); RuleFor(x => x.Email) .Length(7, 256) .Matches(Constants.EmailRegex) .When(x => !string.IsNullOrEmpty(x.Email)); } } } ================================================ FILE: Validators/DatiAnagraficiCedentePrestatoreValidator.cs ================================================ using FatturaElettronica.Tabelle; using FluentValidation; using FatturaElettronica.Ordinaria.FatturaElettronicaHeader.CedentePrestatore; namespace FatturaElettronica.Validators { public class DatiAnagraficiCedentePrestatoreValidator : AbstractValidator { public DatiAnagraficiCedentePrestatoreValidator() { RuleFor(x => x.IdFiscaleIVA) .SetValidator(new IdFiscaleIVAValidator()); RuleFor(x => x.CodiceFiscale) .Matches("^[A-Z0-9]{11,16}$") .When(x => !string.IsNullOrEmpty(x.CodiceFiscale)); RuleFor(x => x.Anagrafica) .SetValidator(new AnagraficaValidator()); RuleFor(x => x.AlboProfessionale) .Length(1, 60) .Latin1SupplementValidator() .When(x => !string.IsNullOrEmpty(x.AlboProfessionale)); RuleFor(x => x.ProvinciaAlbo) .Matches(@"^[A-Z]{2}$") .When(x => !string.IsNullOrEmpty(x.ProvinciaAlbo)); RuleFor(x => x.NumeroIscrizioneAlbo) .Length(1, 60) .BasicLatinValidator() .When(x => !string.IsNullOrEmpty(x.NumeroIscrizioneAlbo)); RuleFor(x => x.RegimeFiscale) .NotEmpty() .SetValidator(new IsValidValidator()); } } } ================================================ FILE: Validators/DatiAnagraficiCessionarioCommittenteValidator.cs ================================================ using FluentValidation; using FatturaElettronica.Ordinaria.FatturaElettronicaHeader.CessionarioCommittente; using FatturaElettronica.Resources; namespace FatturaElettronica.Validators { public class DatiAnagraficiCessionarioCommittenteValidator : AbstractValidator { public DatiAnagraficiCessionarioCommittenteValidator() { RuleFor(x => x.IdFiscaleIVA) .SetValidator(new IdFiscaleIVAValidator()) .When(x => x.IdFiscaleIVA != null && !x.IdFiscaleIVA.IsEmpty()); RuleFor(x => x.CodiceFiscale) .Matches("^[A-Z0-9]{11,16}$") .When(x => !string.IsNullOrEmpty(x.CodiceFiscale)); RuleFor(x => x.Anagrafica) .SetValidator(new AnagraficaValidator()); RuleFor(x => x.CodiceFiscale) .Must((challenge, _) => !(string.IsNullOrEmpty(challenge.CodiceFiscale) && challenge.IdFiscaleIVA.IsEmpty())) .WithMessage(ValidatorMessages.E00417) .WithErrorCode("00417"); RuleFor(x => x.IdFiscaleIVA) .Must((challenge, _) => !(string.IsNullOrEmpty(challenge.CodiceFiscale) && challenge.IdFiscaleIVA.IsEmpty())) .WithMessage(ValidatorMessages.E00417) .WithErrorCode("00417"); } } } ================================================ FILE: Validators/DatiAnagraficiRappresentanteFiscaleValidator.cs ================================================ using FatturaElettronica.Common; using FluentValidation; namespace FatturaElettronica.Validators { public class DatiAnagraficiRappresentanteFiscaleValidator : AbstractValidator { public DatiAnagraficiRappresentanteFiscaleValidator() { RuleFor(x => x.IdFiscaleIVA) .SetValidator(new IdFiscaleIVAValidator()); RuleFor(x => x.CodiceFiscale) .Matches("^[A-Z0-9]{11,16}$") .When(x => !string.IsNullOrEmpty(x.CodiceFiscale)); RuleFor(x => x.Anagrafica) .SetValidator(new AnagraficaValidator()); } } } ================================================ FILE: Validators/DatiAnagraficiTerzoIntermediarioValidator.cs ================================================ using FluentValidation; using FatturaElettronica.Common; namespace FatturaElettronica.Validators { public class DatiAnagraficiTerzoIntermediarioValidator : AbstractValidator { public DatiAnagraficiTerzoIntermediarioValidator() { RuleFor(x => x.IdFiscaleIVA) .SetValidator(new IdFiscaleIVAValidator()) .When(x => x.IdFiscaleIVA != null && !x.IdFiscaleIVA.IsEmpty()); RuleFor(x => x.CodiceFiscale) .Matches("^[A-Z0-9]{11,16}$") .When(x => !string.IsNullOrEmpty(x.CodiceFiscale)); RuleFor(x => x.Anagrafica) .SetValidator(new AnagraficaValidator()); } } } ================================================ FILE: Validators/DatiAnagraficiVettoreValidator.cs ================================================ using FatturaElettronica.Ordinaria.FatturaElettronicaBody.DatiGenerali; using FluentValidation; namespace FatturaElettronica.Validators { public class DatiAnagraficiVettoreValidator : AbstractValidator { public DatiAnagraficiVettoreValidator() { RuleFor(x => x.IdFiscaleIVA) .SetValidator(new IdFiscaleIVAValidator()); RuleFor(x => x.CodiceFiscale) .Matches("^[A-Z0-9]{11,16}$") .When(x => !string.IsNullOrEmpty(x.CodiceFiscale)); RuleFor(x => x.Anagrafica) .SetValidator(new AnagraficaValidator()); RuleFor(x => x.NumeroLicenzaGuida) .Length(1, 20) .BasicLatinValidator() .When(x => !string.IsNullOrEmpty(x.NumeroLicenzaGuida)); } } } ================================================ FILE: Validators/DatiBeniServiziValidator.cs ================================================ using FatturaElettronica.Ordinaria.FatturaElettronicaBody.DatiBeniServizi; using FluentValidation; namespace FatturaElettronica.Validators { public class DatiBeniServiziValidator : AbstractValidator { public DatiBeniServiziValidator() { RuleForEach(x => x.DettaglioLinee) .SetValidator(new DettaglioLineeValidator()); RuleFor(x => x.DettaglioLinee) .NotEmpty(); RuleForEach(x => x.DatiRiepilogo) .SetValidator(new DatiRiepilogoValidator()); RuleFor(x => x.DatiRiepilogo) .NotEmpty(); } } } ================================================ FILE: Validators/DatiBolloValidator.cs ================================================ using FatturaElettronica.Extensions; using FluentValidation; using FatturaElettronica.Ordinaria.FatturaElettronicaBody.DatiGenerali; namespace FatturaElettronica.Validators { public class DatiBolloValidator : AbstractValidator { public DatiBolloValidator() { RuleFor(x => x.BolloVirtuale) .NotEmpty() .Equal("SI"); RuleFor(x => x.ImportoBollo) .ScalePrecision2DecimalType(); } } } ================================================ FILE: Validators/DatiCassaPrevidenzialeValidator.cs ================================================ using FatturaElettronica.Extensions; using FluentValidation; using FatturaElettronica.Ordinaria.FatturaElettronicaBody.DatiGenerali; using FatturaElettronica.Tabelle; namespace FatturaElettronica.Validators { public class DatiCassaPrevidenzialeValidator : AbstractValidator { public DatiCassaPrevidenzialeValidator() { RuleFor(x => x.TipoCassa) .NotEmpty() .SetValidator(new IsValidValidator()); RuleFor(x => x.AlCassa) .NotNull(); RuleFor(x => x.ImportoContributoCassa) .NotNull(); RuleFor(x => x.AliquotaIVA) .NotNull(); RuleFor(x => x.Ritenuta) .Equal("SI") .When(x => !string.IsNullOrEmpty(x.Ritenuta)); RuleFor(x => x.Natura) .NotEmpty() .When(x => x.AliquotaIVA == 0).WithErrorCode("00413"); RuleFor(x => x.Natura) .SetValidator(new IsValidValidator()) .When(x => x.AliquotaIVA == 0); RuleFor(x => x.Natura) .Empty() .When(x => x.AliquotaIVA != 0).WithErrorCode("00414"); RuleFor(x => x.RiferimentoAmministrazione) .Length(1, 20) .BasicLatinValidator() .When(x => !string.IsNullOrEmpty(x.RiferimentoAmministrazione)); RuleFor(x => x.ImportoContributoCassa) .ScalePrecision2DecimalType(); RuleFor(x => x.ImponibileCassa) .ScalePrecision2DecimalType(); } } } ================================================ FILE: Validators/DatiContrattoValidator.cs ================================================ namespace FatturaElettronica.Validators { public class DatiContrattoValidator : DatiDocumentoValidator { } } ================================================ FILE: Validators/DatiConvenzioneValidator.cs ================================================ namespace FatturaElettronica.Validators { public class DatiConvenzioneValidator : DatiDocumentoValidator { } } ================================================ FILE: Validators/DatiDDTValidator.cs ================================================ using FluentValidation; using FatturaElettronica.Ordinaria.FatturaElettronicaBody.DatiGenerali; using FatturaElettronica.Resources; namespace FatturaElettronica.Validators { public class DatiDDTValidator : AbstractValidator { public DatiDDTValidator() { RuleFor(x => x.NumeroDDT) .NotEmpty() .BasicLatinValidator() .Length(1, 20); RuleForEach(x => x.RiferimentoNumeroLinea) .InclusiveBetween(1, 9999) .WithMessage(string.Format(ValidatorMessages.ValidNumberRange_X_Y, 1, 9999)); } } } ================================================ FILE: Validators/DatiDocumentoValidator.cs ================================================ using FatturaElettronica.Common; using FatturaElettronica.Resources; using FluentValidation; namespace FatturaElettronica.Validators { public class DatiDocumentoValidator : AbstractValidator { protected DatiDocumentoValidator() { RuleFor(x => x.IdDocumento) .NotEmpty() .BasicLatinValidator() .Length(1, 20); RuleFor(x => x.NumItem) .Length(1, 20) .BasicLatinValidator() .When(x => !string.IsNullOrEmpty(x.NumItem)); RuleFor(x => x.CodiceCommessaConvenzione) .Length(1, 100) .Latin1SupplementValidator() .When(x => !string.IsNullOrEmpty(x.CodiceCommessaConvenzione)); RuleFor(x => x.CodiceCUP) .Length(1, 15) .BasicLatinValidator() .When(x => !string.IsNullOrEmpty(x.CodiceCUP)); RuleFor(x => x.CodiceCIG) .Length(1, 15) .BasicLatinValidator() .When(x => !string.IsNullOrEmpty(x.CodiceCIG)); RuleForEach(x => x.RiferimentoNumeroLinea) .InclusiveBetween(1, 9999) .WithMessage(string.Format(ValidatorMessages.ValidNumberRange_X_Y, 1, 9999)); } } } ================================================ FILE: Validators/DatiFattureCollegateValidator.cs ================================================ namespace FatturaElettronica.Validators { public class DatiFattureCollegateValidator : DatiDocumentoValidator { } } ================================================ FILE: Validators/DatiGeneraliDocumentoValidator.cs ================================================ using FluentValidation; using FatturaElettronica.Ordinaria.FatturaElettronicaBody.DatiGenerali; using System.Linq; using FatturaElettronica.Extensions; using FatturaElettronica.Resources; using Divisa = FatturaElettronica.Tabelle.Divisa; using TipoDocumento = FatturaElettronica.Tabelle.TipoDocumento; namespace FatturaElettronica.Validators { public class DatiGeneraliDocumentoValidator : AbstractValidator { public DatiGeneraliDocumentoValidator() { RuleFor(x => x.TipoDocumento) .NotEmpty() .SetValidator(new IsValidValidator()); RuleFor(x => x.Divisa) .NotEmpty() .SetValidator(new IsValidValidator()); RuleFor(x => x.Numero) .NotEmpty() .BasicLatinValidator() .Length(1, 20); RuleFor(x => x.Numero) .Matches(@"\d") .WithMessage(ValidatorMessages.E00425) .WithErrorCode("00425"); RuleForEach(x => x.DatiRitenuta) .SetValidator(new DatiRitenutaValidator()); RuleFor(x => x.DatiBollo) .SetValidator(new DatiBolloValidator()) .When(x => x.DatiBollo != null && !x.DatiBollo.IsEmpty()); RuleForEach(x => x.DatiCassaPrevidenziale) .SetValidator(new DatiCassaPrevidenzialeValidator()); RuleFor(x => x.DatiCassaPrevidenziale) .Must((datiGeneraliDocumento, datiCassa) => { return (datiCassa.Count(a => a.Ritenuta == "SI") <= 0) || datiGeneraliDocumento.DatiRitenuta.Count > 0; }) .WithMessage(ValidatorMessages.E00415) .WithErrorCode("00415"); RuleForEach(x => x.ScontoMaggiorazione) .SetValidator(new ScontoMaggiorazioneValidator()); RuleForEach(x => x.Causale) .SetValidator(new CausaleValidator(1, 200)); RuleFor(x => x.Art73) .Equal("SI") .When(x => !string.IsNullOrEmpty(x.Art73)); RuleFor(x => x.ImportoTotaleDocumento) .PrecisionScale(13, 2, false); RuleFor(x => x.Arrotondamento) .PrecisionScale(13, 2, false); } } } ================================================ FILE: Validators/DatiGeneraliValidator.cs ================================================ using System.Linq; using FluentValidation; using FatturaElettronica.Ordinaria.FatturaElettronicaBody.DatiGenerali; using FatturaElettronica.Resources; namespace FatturaElettronica.Validators { public class DatiGeneraliValidator : AbstractValidator { public DatiGeneraliValidator() { RuleFor(x => x.DatiGeneraliDocumento) .SetValidator(new DatiGeneraliDocumentoValidator()); RuleFor(x => x.DatiGeneraliDocumento.Data) .Must((datigenerali, data) => { return datigenerali.DatiFattureCollegate.All(fc => !(data < fc.Data)); }) .WithMessage(ValidatorMessages.E00418) .WithErrorCode("00418"); RuleForEach(x => x.DatiOrdineAcquisto) .SetValidator(new DatiOrdineAcquistoValidator()); RuleForEach(x => x.DatiContratto) .SetValidator(new DatiContrattoValidator()); RuleForEach(x => x.DatiConvenzione) .SetValidator(new DatiConvenzioneValidator()); RuleForEach(x => x.DatiRicezione) .SetValidator(new DatiRicezioneValidator()); RuleForEach(x => x.DatiFattureCollegate) .SetValidator(new DatiFattureCollegateValidator()); RuleForEach(x => x.DatiDDT) .SetValidator(new DatiDDTValidator()); RuleFor(x => x.DatiTrasporto) .SetValidator(new DatiTrasportoValidator()) .When(x => x.DatiTrasporto != null && !x.DatiTrasporto.IsEmpty()); RuleFor(x => x.FatturaPrincipale) .SetValidator(new FatturaPrincipaleValidator()) .When(x => x.FatturaPrincipale != null && !x.FatturaPrincipale.IsEmpty()); RuleForEach(x => x.DatiSAL) .SetValidator(new DatiSALValidator()); } } } ================================================ FILE: Validators/DatiOrdineAcquistoValidator.cs ================================================ namespace FatturaElettronica.Validators { public class DatiOrdineAcquistoValidator : DatiDocumentoValidator { } } ================================================ FILE: Validators/DatiPagamentoValidator.cs ================================================ using FluentValidation; using FatturaElettronica.Ordinaria.FatturaElettronicaBody.DatiPagamento; using FatturaElettronica.Tabelle; namespace FatturaElettronica.Validators { public class DatiPagamentoValidator : AbstractValidator { public DatiPagamentoValidator() { RuleFor(x => x.CondizioniPagamento) .NotEmpty() .SetValidator(new IsValidValidator()); RuleForEach(x => x.DettaglioPagamento) .SetValidator(new DettaglioPagamentoValidator()); RuleFor(x => x.DettaglioPagamento) .NotEmpty(); } } } ================================================ FILE: Validators/DatiRicezioneValidator.cs ================================================ namespace FatturaElettronica.Validators { public class DatiRicezioneValidator : DatiDocumentoValidator { } } ================================================ FILE: Validators/DatiRiepilogoValidator.cs ================================================ using FluentValidation; using FatturaElettronica.Ordinaria.FatturaElettronicaBody.DatiBeniServizi; using System; using FatturaElettronica.Extensions; using FatturaElettronica.Resources; using EsigibilitaIVA = FatturaElettronica.Tabelle.EsigibilitaIVA; using Natura = FatturaElettronica.Tabelle.Natura; namespace FatturaElettronica.Validators { public class DatiRiepilogoValidator : AbstractValidator { public DatiRiepilogoValidator() { RuleFor(x => x.Natura) .SetValidator(new IsValidValidator()) .When(x => !string.IsNullOrEmpty(x.Natura)); RuleFor(x => x.Natura) .Must(natura => !string.IsNullOrEmpty(natura)) .When(x => x.AliquotaIVA == 0) .WithMessage(ValidatorMessages.E00429) .WithErrorCode("00429"); RuleFor(x => x.Natura) .Must(natura => natura == null || !natura.StartsWith("N6")) .When(x => x.EsigibilitaIVA == "S") .WithMessage(ValidatorMessages.E00420) .WithErrorCode("00420"); RuleFor(x => x.Imposta) .Must((challenge, _) => ImpostaValidateAgainstError00421(challenge)) .WithErrorCode("00421"); RuleFor(x => x.EsigibilitaIVA) .SetValidator(new IsValidValidator()) .When(x => !string.IsNullOrEmpty(x.EsigibilitaIVA)); RuleFor(x => x.RiferimentoNormativo) .Length(1, 100) .Latin1SupplementValidator() .When(x => !string.IsNullOrEmpty(x.RiferimentoNormativo)); RuleFor(x => x.SpeseAccessorie) .ScalePrecision2DecimalType(); RuleFor(x => x.ImponibileImporto) .ScalePrecision2DecimalType(); RuleFor(x => x.Imposta) .ScalePrecision2DecimalType(); RuleFor(x => x.Arrotondamento) .ScalePrecision8DecimalType(); } private static bool ImpostaValidateAgainstError00421(DatiRiepilogo datiRiepilogo) { return (Math.Abs(datiRiepilogo.Imposta - decimal.Parse(((datiRiepilogo.AliquotaIVA * datiRiepilogo.ImponibileImporto) / 100) .ToString("0.00"))) <= 0.019m); } } } ================================================ FILE: Validators/DatiRitenutaValidator.cs ================================================ using FatturaElettronica.Extensions; using FluentValidation; using FatturaElettronica.Ordinaria.FatturaElettronicaBody.DatiGenerali; using FatturaElettronica.Tabelle; namespace FatturaElettronica.Validators { public class DatiRitenutaValidator : AbstractValidator { public DatiRitenutaValidator() { RuleFor(x => x.TipoRitenuta) .NotEmpty() .SetValidator(new IsValidValidator()); RuleFor(x => x.CausalePagamento) .NotEmpty() .SetValidator(new IsValidValidator()); RuleFor(x => x.ImportoRitenuta) .ScalePrecision2DecimalType(); } } } ================================================ FILE: Validators/DatiSALValidator.cs ================================================ using FatturaElettronica.Ordinaria.FatturaElettronicaBody.DatiGenerali; using FatturaElettronica.Resources; using FluentValidation; namespace FatturaElettronica.Validators; public class DatiSALValidator : AbstractValidator { public DatiSALValidator() { RuleFor(x => x.RiferimentoFase) .InclusiveBetween(1, 999) .WithMessage(string.Format(ValidatorMessages.ValidNumberRange_X_Y, 1, 999)); } } ================================================ FILE: Validators/DatiTrasmissioneValidator.cs ================================================ using FatturaElettronica.Ordinaria.FatturaElettronicaHeader.DatiTrasmissione; using FatturaElettronica.Tabelle; using FluentValidation; namespace FatturaElettronica.Validators { public class DatiTrasmissioneValidator : AbstractValidator { public DatiTrasmissioneValidator() { RuleFor(dt => dt.IdTrasmittente) .SetValidator(new IdTrasmittenteValidator()); RuleFor(dt => dt.ProgressivoInvio) .NotEmpty() .BasicLatinValidator() .Length(1, 10); RuleFor(dt => dt.FormatoTrasmissione) .NotEmpty() .SetValidator(new IsValidValidator()) .WithErrorCode("00428"); RuleFor(dt => dt.CodiceDestinatario) .NotEmpty(); RuleFor(dt => dt.CodiceDestinatario) .Matches(@"^[A-Z0-9]+$") .When(x => !string.IsNullOrEmpty(x.CodiceDestinatario)); RuleFor(dt => dt.CodiceDestinatario) .Length(6) .When(dt => dt.FormatoTrasmissione == Defaults.FormatoTrasmissione.PubblicaAmministrazione) .WithErrorCode("00427"); RuleFor(dt => dt.CodiceDestinatario) .Length(7) .When(dt => dt.FormatoTrasmissione == Defaults.FormatoTrasmissione.Privati) .WithErrorCode("00427"); RuleFor(dt => dt.ContattiTrasmittente) .SetValidator(new ContattiTrasmittenteValidator()) .When(x => x.ContattiTrasmittente != null && !x.ContattiTrasmittente.IsEmpty()); RuleFor(dt => dt.PECDestinatario) .Length(7, 256) .Matches(Constants.EmailRegex) .When(x => !string.IsNullOrEmpty(x.PECDestinatario)); } } } ================================================ FILE: Validators/DatiTrasportoValidator.cs ================================================ using FluentValidation; using FatturaElettronica.Ordinaria.FatturaElettronicaBody.DatiGenerali; using FatturaElettronica.Resources; using TipoResa = FatturaElettronica.Tabelle.TipoResa; namespace FatturaElettronica.Validators { public class DatiTrasportoValidator : AbstractValidator { public DatiTrasportoValidator() { RuleFor(x => x.DatiAnagraficiVettore) .SetValidator(new DatiAnagraficiVettoreValidator()) .When(x => x.DatiAnagraficiVettore != null && !x.DatiAnagraficiVettore.IsEmpty()); RuleFor(x => x.MezzoTrasporto) .Length(1, 80) .Latin1SupplementValidator() .When(x => !string.IsNullOrEmpty(x.MezzoTrasporto)); RuleFor(x => x.CausaleTrasporto) .Length(1, 100) .Latin1SupplementValidator() .When(x => !string.IsNullOrEmpty(x.CausaleTrasporto)); RuleFor(x => x.Descrizione) .Length(1, 100) .Latin1SupplementValidator() .When(x => !string.IsNullOrEmpty(x.Descrizione)); RuleFor(x => x.UnitaMisuraPeso) .Length(1, 10) .BasicLatinValidator() .When(x => !string.IsNullOrEmpty(x.UnitaMisuraPeso)); RuleFor(x => x.TipoResa) .SetValidator(new IsValidValidator()) .When(x => !string.IsNullOrEmpty(x.TipoResa)); RuleFor(x => x.IndirizzoResa) .SetValidator(new IndirizzoResaValidator()) .When(x => x.IndirizzoResa != null && !x.IndirizzoResa.IsEmpty()); RuleFor(x => x.PesoLordo) .LessThanOrEqualTo(9999.99m); RuleFor(x => x.PesoNetto) .LessThanOrEqualTo(9999.99m); RuleFor(x=>x.NumeroColli) .InclusiveBetween(1,9999) .WithMessage(string.Format(ValidatorMessages.ValidNumberRange_X_Y, 1, 9999)); } } } ================================================ FILE: Validators/DatiVeicoliValidator.cs ================================================ using FluentValidation; using FatturaElettronica.Ordinaria.FatturaElettronicaBody.DatiVeicoli; namespace FatturaElettronica.Validators { public class DatiVeicoliValidator : AbstractValidator { public DatiVeicoliValidator() { RuleFor(x => x.Data) .NotNull(); RuleFor(x => x.TotalePercorso) .NotEmpty() .BasicLatinValidator() .Length(1, 15); } } } ================================================ FILE: Validators/DenominazioneNomeCognomeValidator.cs ================================================ using FluentValidation; using FatturaElettronica.Common; namespace FatturaElettronica.Validators { public abstract class DenominazioneNomeCognomeValidator : AbstractValidator where T : DenominazioneNomeCognome { protected DenominazioneNomeCognomeValidator() { const string expectedErrorCode = "00200"; RuleFor(x => x.Denominazione) .NotEmpty() .WithErrorCode(expectedErrorCode) .Length(1, 80) .WithErrorCode(expectedErrorCode) .Latin1SupplementValidator() .When(x => string.IsNullOrEmpty(x.CognomeNome)); RuleFor(x => x.Denominazione) .Empty() .WithErrorCode(expectedErrorCode) .When(x => !string.IsNullOrEmpty(x.CognomeNome)); RuleFor(x => x.Nome) .NotEmpty() .WithErrorCode(expectedErrorCode) .Length(1, 60) .WithErrorCode(expectedErrorCode) .Latin1SupplementValidator() .When(x => string.IsNullOrEmpty(x.Denominazione)); RuleFor(x => x.Nome) .Empty() .WithErrorCode(expectedErrorCode) .When(x => !string.IsNullOrEmpty(x.Denominazione)); RuleFor(x => x.Cognome) .NotEmpty() .WithErrorCode(expectedErrorCode) .Length(1, 60) .WithErrorCode(expectedErrorCode) .Latin1SupplementValidator() .When(x => string.IsNullOrEmpty(x.Denominazione)); RuleFor(x => x.Cognome) .Empty() .WithErrorCode(expectedErrorCode) .When(x => !string.IsNullOrEmpty(x.Denominazione)); } } } ================================================ FILE: Validators/DettaglioLineeValidator.cs ================================================ using System; using FatturaElettronica.Extensions; using FatturaElettronica.Ordinaria.FatturaElettronicaBody.DatiBeniServizi; using FatturaElettronica.Resources; using FluentValidation; using Natura = FatturaElettronica.Tabelle.Natura; using TipoCessionePrestazione = FatturaElettronica.Tabelle.TipoCessionePrestazione; namespace FatturaElettronica.Validators { public class DettaglioLineeValidator : AbstractValidator { public DettaglioLineeValidator() { RuleFor(x => x.NumeroLinea) .InclusiveBetween(1, 9999) .WithMessage(string.Format(ValidatorMessages.ValidNumberRange_X_Y, 1, 9999)); RuleFor(x => x.TipoCessionePrestazione) .SetValidator(new IsValidValidator()) .When(x => !string.IsNullOrEmpty(x.TipoCessionePrestazione)); RuleForEach(x => x.CodiceArticolo) .SetValidator(new CodiceArticoloValidator()); RuleFor(x => x.Descrizione) .NotEmpty() .Length(1, 1000) .Latin1SupplementValidator(); RuleFor(x => x.UnitaMisura) .Length(1, 10) .BasicLatinValidator() .When(x => !string.IsNullOrEmpty(x.UnitaMisura)); RuleForEach(x => x.ScontoMaggiorazione) .SetValidator(new ScontoMaggiorazioneValidator()); RuleFor(x => x.PrezzoTotale) .Must((dettaglioLinee, _) => PrezzoTotaleValidateAgainstError00423(dettaglioLinee)) .WithMessage(ValidatorMessages.E00423) .WithErrorCode("00423"); RuleFor(x => x.Ritenuta) .Equal("SI") .When(x => !string.IsNullOrEmpty(x.Ritenuta)); RuleFor(x => x.Natura) .SetValidator(new IsValidValidator()) .When(x => !string.IsNullOrEmpty(x.Natura)); RuleFor(x => x.Natura) .Must(natura => !string.IsNullOrEmpty(natura)) .When(x => x.AliquotaIVA == 0) .WithMessage(ValidatorMessages.E00400) .WithErrorCode("00400"); RuleFor(x => x.RiferimentoAmministrazione) .Length(1, 20) .BasicLatinValidator() .When(x => !string.IsNullOrEmpty(x.RiferimentoAmministrazione)); RuleForEach(x => x.AltriDatiGestionali) .SetValidator(new AltriDatiGestionaliValidator()); RuleFor(x => x.Quantita) .GreaterThanOrEqualTo(0); RuleFor(x => x.PrezzoUnitario) .ScalePrecision8DecimalType(); RuleFor(x => x.PrezzoTotale) .ScalePrecision8DecimalType(); RuleFor(x => x.AliquotaIVA) .LessThanOrEqualTo(100); } private static bool PrezzoTotaleValidateAgainstError00423(DettaglioLinee challenge) { var prezzo = Math.Round(challenge.PrezzoUnitario, 8, MidpointRounding.AwayFromZero); foreach (var sconto in challenge.ScontoMaggiorazione) { if (sconto.Importo == null && sconto.Percentuale == null) continue; var importo = (decimal)(sconto.Importo != null ? Math.Abs((decimal)sconto.Importo) : sconto.Percentuale != null ? prezzo * sconto.Percentuale / 100 : prezzo); if (sconto.Tipo == "SC") prezzo -= importo; else prezzo += importo; } return Math.Abs(Math.Round(challenge.PrezzoTotale, 2, MidpointRounding.AwayFromZero) - prezzo * (challenge.Quantita ?? 1)) <= 0.019m; } } } ================================================ FILE: Validators/DettaglioPagamentoValidator.cs ================================================ using FatturaElettronica.Extensions; using FluentValidation; using FatturaElettronica.Ordinaria.FatturaElettronicaBody.DatiPagamento; using FatturaElettronica.Resources; using ModalitaPagamento = FatturaElettronica.Tabelle.ModalitaPagamento; namespace FatturaElettronica.Validators { public class DettaglioPagamentoValidator : AbstractValidator { public DettaglioPagamentoValidator() { RuleFor(x => x.Beneficiario) .Length(1, 200) .Latin1SupplementValidator() .When(x => !string.IsNullOrEmpty(x.Beneficiario)); RuleFor(x => x.ModalitaPagamento) .NotEmpty() .SetValidator(new IsValidValidator()); RuleFor(x => x.CodUfficioPostale) .Length(1, 20) .BasicLatinValidator() .When(x => !string.IsNullOrEmpty(x.CodUfficioPostale)); RuleFor(x => x.CognomeQuietanzante) .Length(1, 60) .Latin1SupplementValidator() .When(x => !string.IsNullOrEmpty(x.CognomeQuietanzante)); RuleFor(x => x.NomeQuietanzante) .Length(1, 60) .Latin1SupplementValidator() .When(x => !string.IsNullOrEmpty(x.NomeQuietanzante)); RuleFor(x => x.CFQuietanzante) .Length(1, 16) .When(x => !string.IsNullOrEmpty(x.CFQuietanzante)); RuleFor(x => x.TitoloQuietanzante) .Length(2, 10) .BasicLatinValidator() .When(x => !string.IsNullOrEmpty(x.TitoloQuietanzante)); RuleFor(x => x.IstitutoFinanziario) .Length(1, 80) .Latin1SupplementValidator() .When(x => !string.IsNullOrEmpty(x.IstitutoFinanziario)); RuleFor(x => x.IBAN) .Matches(@"^[a-zA-Z]{2}[0-9]{2}[a-zA-Z0-9]{11,30}$") .When(x => !string.IsNullOrEmpty(x.IBAN)); RuleFor(x => x.ABI) .Length(5) .When(x => !string.IsNullOrEmpty(x.ABI)); RuleFor(x => x.CAB) .Length(5) .When(x => !string.IsNullOrEmpty(x.CAB)); RuleFor(x => x.BIC) .Length(8, 11) .When(x => !string.IsNullOrEmpty(x.BIC)); RuleFor(x => x.CodicePagamento) .Length(1, 60) .BasicLatinValidator() .When(x => !string.IsNullOrEmpty(x.CodicePagamento)); RuleFor(x => x.ScontoPagamentoAnticipato) .ScalePrecision2DecimalType(); RuleFor(x => x.PenalitaPagamentiRitardati) .ScalePrecision2DecimalType(); RuleFor(x => x.ImportoPagamento) .ScalePrecision2DecimalType(); RuleFor(x => x.GiorniTerminiPagamento) .InclusiveBetween(0, 999) .WithMessage(string.Format(ValidatorMessages.ValidNumberRange_X_Y, 1, 999)); } } } ================================================ FILE: Validators/FatturaElettronicaBodyValidator.cs ================================================ using System; using System.Collections.Generic; using System.Linq; using FatturaElettronica.Ordinaria.FatturaElettronicaBody; using FatturaElettronica.Resources; using FluentValidation; namespace FatturaElettronica.Validators { public class FatturaElettronicaBodyValidator : AbstractValidator { public FatturaElettronicaBodyValidator() { RuleFor(x => x.DatiGenerali) .SetValidator(new DatiGeneraliValidator()); RuleFor(x => x.DatiBeniServizi) .SetValidator(new DatiBeniServiziValidator()); RuleFor(x => x.DatiBeniServizi) .Must(x => !x.IsEmpty()).WithMessage(ValidatorMessages.DatiBeniServiziEObbligatorio); RuleFor(x => x.DatiGenerali.DatiGeneraliDocumento.DatiRitenuta) .Must((body, _) => DatiRitenutaAgainstDettaglioLinee(body)) .When(x => x.DatiGenerali.DatiGeneraliDocumento.DatiRitenuta.Count == 0) .WithMessage(ValidatorMessages.E00411) .WithErrorCode("00411"); RuleFor(x => x.DatiBeniServizi.DatiRiepilogo) .Must((body, _) => DatiRiepilogoValidateAgainstError00422(body)) .WithMessage(ValidatorMessages.E00422) .WithErrorCode("00422"); RuleFor(x => x.DatiBeniServizi.DatiRiepilogo) .Must((body, _) => DatiRiepilogoValidateAgainstError00419(body)) .WithMessage(ValidatorMessages.E00419) .WithErrorCode("00419"); RuleFor(x => x.DatiGenerali.DatiGeneraliDocumento.TipoDocumento) .Must((body, _) => body.DatiBeniServizi.DettaglioLinee.All(linea => linea.AliquotaIVA != 0)) .When(x => x.DatiGenerali.DatiGeneraliDocumento.TipoDocumento == "TD21") .WithMessage(ValidatorMessages.E00474) .WithErrorCode("00474"); RuleFor(x => x.DatiVeicoli) .SetValidator(new DatiVeicoliValidator()) .When(x => x.DatiVeicoli != null && !x.DatiVeicoli.IsEmpty()); RuleForEach(x => x.DatiPagamento) .SetValidator(new DatiPagamentoValidator()); RuleForEach(x => x.Allegati) .SetValidator(new AllegatiValidator()); } private static bool DatiRitenutaAgainstDettaglioLinee(FatturaElettronicaBody body) { return body.DatiBeniServizi.DettaglioLinee.All(linea => linea.Ritenuta != "SI"); } private static bool DatiRiepilogoValidateAgainstError00422(FatturaElettronicaBody body) { var totals = new Dictionary(); foreach (var r in body.DatiBeniServizi.DatiRiepilogo) { if (!totals.ContainsKey(r.AliquotaIVA)) totals.Add(r.AliquotaIVA, new()); totals[r.AliquotaIVA].ImponibileImporto += r.ImponibileImporto; totals[r.AliquotaIVA].Arrotondamento += r.Arrotondamento ?? 0; } foreach (var l in body.DatiBeniServizi.DettaglioLinee) { if (!totals.ContainsKey(l.AliquotaIVA)) totals.Add(l.AliquotaIVA, new()); totals[l.AliquotaIVA].PrezzoTotale += l.PrezzoTotale; } foreach (var c in body.DatiGenerali.DatiGeneraliDocumento.DatiCassaPrevidenziale) { if (!totals.ContainsKey(c.AliquotaIVA)) totals.Add(c.AliquotaIVA, new()); totals[c.AliquotaIVA].ImportoContrCassa += c.ImportoContributoCassa; } return totals.Values.All(t => Math.Abs(t.ImponibileImporto - (t.PrezzoTotale + t.ImportoContrCassa + t.Arrotondamento)) < 1); } private static bool DatiRiepilogoValidateAgainstError00419(FatturaElettronicaBody body) { var hash = new HashSet(); foreach (var cp in body.DatiGenerali.DatiGeneraliDocumento.DatiCassaPrevidenziale.Where(cp => !hash.Contains(cp.AliquotaIVA))) hash.Add(cp.AliquotaIVA); foreach (var l in body.DatiBeniServizi.DettaglioLinee.Where(l => !hash.Contains(l.AliquotaIVA))) hash.Add(l.AliquotaIVA); return body.DatiBeniServizi.DatiRiepilogo.Count >= hash.Count; } private class Totals { public decimal ImponibileImporto; public decimal PrezzoTotale; public decimal Arrotondamento; public decimal ImportoContrCassa; } } } ================================================ FILE: Validators/FatturaElettronicaHeaderValidator.cs ================================================ using FatturaElettronica.Ordinaria.FatturaElettronicaHeader; using FatturaElettronica.Resources; using FluentValidation; using SoggettoEmittente = FatturaElettronica.Tabelle.SoggettoEmittente; namespace FatturaElettronica.Validators { public class FatturaElettronicaHeaderValidator : AbstractValidator { public FatturaElettronicaHeaderValidator() { RuleFor(x => x.DatiTrasmissione) .SetValidator(new DatiTrasmissioneValidator()); RuleFor(x => x.CedentePrestatore) .SetValidator(new CedentePrestatoreValidator()); RuleFor(x => x.Rappresentante) .SetValidator(new RappresentanteFiscaleValidator()) .When(x => x.Rappresentante != null && !x.Rappresentante.IsEmpty()); RuleFor(x => x.CessionarioCommittente) .SetValidator(new CessionarioCommittenteValidator()); RuleFor(x => x.TerzoIntermediarioOSoggettoEmittente) .SetValidator(new TerzoIntermediarioOSoggettoEmittenteValidator()) .When(x => x.TerzoIntermediarioOSoggettoEmittente != null && !x.TerzoIntermediarioOSoggettoEmittente.IsEmpty()); RuleFor(x => x.SoggettoEmittente) .SetValidator(new IsValidValidator()) .When(x => !string.IsNullOrEmpty(x.SoggettoEmittente)); RuleFor(x => x.CessionarioCommittente.DatiAnagrafici.IdFiscaleIVA.IdPaese) .Must(idPaese => idPaese != "IT") .When(x => x.DatiTrasmissione.CodiceDestinatario == "XXXXXXX") .WithErrorCode("00313"); RuleFor(x => x) .Must((header, _) => HeaderValidateAgainstError00476(header)) .WithMessage(ValidatorMessages.E00476) .WithErrorCode("00476"); } private static bool HeaderValidateAgainstError00476(FatturaElettronicaHeader header) { var idCedente = header.CedentePrestatore.DatiAnagrafici.IdFiscaleIVA.IdPaese; var idCommittente = header.CessionarioCommittente.DatiAnagrafici.IdFiscaleIVA is null || header.CessionarioCommittente.DatiAnagrafici.IdFiscaleIVA.IsEmpty() ? "" : header.CessionarioCommittente.DatiAnagrafici.IdFiscaleIVA.IdPaese; return idCedente == "IT" || idCommittente is "IT" or ""; } } } ================================================ FILE: Validators/FatturaOrdinariaValidator.cs ================================================ using System; using System.Linq; using FatturaElettronica.Ordinaria; using FatturaElettronica.Ordinaria.FatturaElettronicaBody; using FatturaElettronica.Resources; using FluentValidation; namespace FatturaElettronica.Validators { public class FatturaOrdinariaValidator : AbstractValidator { public FatturaOrdinariaValidator() { RuleFor(x => x.FatturaElettronicaHeader) .SetValidator(new FatturaElettronicaHeaderValidator()); RuleFor(x => x) .Must((fattura, _) => FatturaValidateAgainstError00475(fattura)) .WithMessage(ValidatorMessages.E00475) .WithErrorCode("00475"); RuleFor(x => x) .Must((fattura, _) => FatturaValidateAgainstError00471(fattura)) .WithMessage(ValidatorMessages.E00471) .WithErrorCode("00471"); RuleFor(x => x) .Must((fattura, _) => FatturaValidateAgainstError00472(fattura)) .WithMessage(ValidatorMessages.E00472) .WithErrorCode("00472"); RuleFor(x => x) .Must((fattura, _) => FatturaValidateAgainstError00473(fattura)) .WithMessage(ValidatorMessages.E00473) .WithErrorCode("00473"); RuleForEach(x => x.FatturaElettronicaBody) .SetValidator(new FatturaElettronicaBodyValidator()); RuleForEach(x => x.FatturaElettronicaBody) .Must((_, body) => BodyValidateAgainstError00443(body)) .WithMessage(ValidatorMessages.E00443) .WithErrorCode("00443"); RuleForEach(x => x.FatturaElettronicaBody) .Must((_, body) => BodyValidateAgainstError00444(body)) .WithMessage(ValidatorMessages.E00444) .WithErrorCode("00444"); RuleForEach(x => x.FatturaElettronicaBody) .Must((_, body) => BodyValidateAgainstError00401(body)) .WithMessage(ValidatorMessages.E00401) .WithErrorCode("00401"); RuleForEach(x => x.FatturaElettronicaBody) .Must((_, body) => BodyValidateAgainstError00430(body)) .WithMessage(ValidatorMessages.E00430) .WithErrorCode("00430"); } private static bool FatturaValidateAgainstError00475(FatturaOrdinaria fatturaOrdinaria) { var tipiDocumento = new[] { "TD16", "TD17", "TD18", "TD19", "TD20", "TD22", "TD23" }; if (!fatturaOrdinaria.FatturaElettronicaBody.Any(x => tipiDocumento.Contains(x.DatiGenerali.DatiGeneraliDocumento.TipoDocumento))) return true; var idFiscaleIva = fatturaOrdinaria.FatturaElettronicaHeader.CessionarioCommittente.DatiAnagrafici .IdFiscaleIVA; return idFiscaleIva != null && !idFiscaleIva.IsEmpty(); } private static bool FatturaValidateAgainstError00473(FatturaOrdinaria fatturaOrdinaria) { var cedente = fatturaOrdinaria.FatturaElettronicaHeader.CedentePrestatore.DatiAnagrafici; if (cedente.IdFiscaleIVA.IdPaese != "IT") return true; var tipiDocumento = new[] { "TD17", "TD18", "TD19", "TD28" }; var success = fatturaOrdinaria.FatturaElettronicaBody.All(x => !tipiDocumento.Contains(x.DatiGenerali.DatiGeneraliDocumento.TipoDocumento)); return success; } private static bool FatturaValidateAgainstError00472(FatturaOrdinaria fatturaOrdinaria) { var bodies = fatturaOrdinaria.FatturaElettronicaBody.Where(x => x.DatiGenerali.DatiGeneraliDocumento.TipoDocumento is "TD21" or "TD27"); if (!bodies.Any()) return true; var cedente = fatturaOrdinaria.FatturaElettronicaHeader.CedentePrestatore.DatiAnagrafici; var cessionario = fatturaOrdinaria.FatturaElettronicaHeader.CessionarioCommittente.DatiAnagrafici; if (cessionario.IdFiscaleIVA.IsEmpty() && cessionario.CodiceFiscale == cedente.CodiceFiscale) // Vedi https://github.com/FatturaElettronica/FatturaElettronica.NET/issues/388 return true; if (string.IsNullOrEmpty(cessionario.CodiceFiscale) && cedente.IdFiscaleIVA?.ToString() == cessionario.IdFiscaleIVA?.ToString()) return true; return cedente.IdFiscaleIVA?.ToString() == cessionario.IdFiscaleIVA?.ToString() && cedente.CodiceFiscale == cessionario.CodiceFiscale; } private static bool FatturaValidateAgainstError00471(FatturaOrdinaria fatturaOrdinaria) { var cedente = fatturaOrdinaria.FatturaElettronicaHeader.CedentePrestatore.DatiAnagrafici.IdFiscaleIVA .ToString(); var cessionario = fatturaOrdinaria.FatturaElettronicaHeader.CessionarioCommittente.DatiAnagrafici .IdFiscaleIVA.ToString(); var tipiDocumento = new[] { "TD01", "TD02", "TD03", "TD06", "TD16", "TD17", "TD18", "TD19", "TD20", "TD24", "TD25", "TD28" }; return cedente != cessionario || fatturaOrdinaria.FatturaElettronicaBody.All(x => !tipiDocumento.Contains(x.DatiGenerali.DatiGeneraliDocumento.TipoDocumento)); } private static bool BodyValidateAgainstError00444(FatturaElettronicaBody body) { var cassaPrevidenziale = body.DatiGenerali.DatiGeneraliDocumento.DatiCassaPrevidenziale; var dettaglioLinee = body.DatiBeniServizi.DettaglioLinee; var nature = dettaglioLinee.Select(x => x.Natura) .Concat(cassaPrevidenziale.Select(x => x.Natura)) .ToArray(); var riepilogo = body.DatiBeniServizi.DatiRiepilogo.Select(x => x.Natura); return nature.All(natura => riepilogo.Contains(natura)) && riepilogo.All(natura => nature.Contains(natura)); } private static bool BodyValidateAgainstError00443(FatturaElettronicaBody body) { var cassaPrevidenziale = body.DatiGenerali.DatiGeneraliDocumento.DatiCassaPrevidenziale; var dettaglioLinee = body.DatiBeniServizi.DettaglioLinee; var aliquote = dettaglioLinee.Select(x => x.AliquotaIVA) .Concat(cassaPrevidenziale.Select(x => x.AliquotaIVA)) .ToArray(); var riepilogo = body.DatiBeniServizi.DatiRiepilogo.Select(x => x.AliquotaIVA); return aliquote.All(aliquota => riepilogo.Contains(aliquota)) && riepilogo.All(aliquota => aliquote.Contains(aliquota)); } private bool BodyValidateAgainstError00401(FatturaElettronicaBody body) { if (body.DatiGenerali.DatiGeneraliDocumento.TipoDocumento == "TD16") { return true; } return body.DatiBeniServizi.DettaglioLinee.All(x => x.AliquotaIVA > 0 && string.IsNullOrEmpty(x.Natura) || x.AliquotaIVA == 0 && !string.IsNullOrEmpty(x.Natura)); } private bool BodyValidateAgainstError00430(FatturaElettronicaBody body) { if (body.DatiGenerali.DatiGeneraliDocumento.TipoDocumento == "TD16") { return true; } return body.DatiBeniServizi.DatiRiepilogo.All(x => x.AliquotaIVA > 0 && string.IsNullOrEmpty(x.Natura) || x.AliquotaIVA == 0 && !string.IsNullOrEmpty(x.Natura)); } } } ================================================ FILE: Validators/FatturaPrincipaleValidator.cs ================================================ using FluentValidation; using FatturaElettronica.Ordinaria.FatturaElettronicaBody.DatiGenerali; namespace FatturaElettronica.Validators { public class FatturaPrincipaleValidator : AbstractValidator { public FatturaPrincipaleValidator() { RuleFor(x => x.NumeroFatturaPrincipale) .NotEmpty() .BasicLatinValidator() .Length(1, 20); RuleFor(x => x.DataFatturaPrincipale) .NotNull(); } } } ================================================ FILE: Validators/IdFiscaleIVAValidator.cs ================================================ using FatturaElettronica.Common; using FatturaElettronica.Tabelle; using FluentValidation; namespace FatturaElettronica.Validators { public class IdFiscaleIVAValidator : AbstractValidator { public IdFiscaleIVAValidator() { RuleFor(id => id.IdPaese) .NotEmpty() .SetValidator(new IsValidValidator()); RuleFor(id => id.IdCodice) .NotEmpty() .Length(1, 28); } } } ================================================ FILE: Validators/IdTrasmittenteValidator.cs ================================================ namespace FatturaElettronica.Validators { public class IdTrasmittenteValidator : IdFiscaleIVAValidator { } } ================================================ FILE: Validators/IndirizzoResaValidator.cs ================================================ using FatturaElettronica.Ordinaria.FatturaElettronicaBody.DatiGenerali; namespace FatturaElettronica.Validators { public class IndirizzoResaValidator : LocalitàBaseValidator { } } ================================================ FILE: Validators/IsValidValidator.cs ================================================ using System; using System.Collections.Generic; using FatturaElettronica.Resources; using FatturaElettronica.Tabelle; using FluentValidation; using FluentValidation.Validators; namespace FatturaElettronica.Validators { public class IsValidValidator : PropertyValidator where TTabella : Tabella, new() { private static readonly Lazy DomainObjectLazy = new(() => new()); protected override string GetDefaultMessageTemplate(string errorCode) { return ValidatorMessages.PropertyName_valoriAccettati_AcceptedValues; } public override bool IsValid(ValidationContext context, TProperty value) { context.MessageFormatter.AppendArgument("AcceptedValues", string.Format(string.Join(", ", Domain))); if (value is string codice) return Domain.Contains(codice); return false; } private static HashSet Domain { get { return DomainObjectLazy.Value.Codici; } } public override string Name => "IsValidValidator"; } } ================================================ FILE: Validators/IscrizioneREAValidator.cs ================================================ using FatturaElettronica.Ordinaria.FatturaElettronicaHeader.CedentePrestatore; using FatturaElettronica.Tabelle; using FluentValidation; namespace FatturaElettronica.Validators { public class IscrizioneREAValidator : AbstractValidator { public IscrizioneREAValidator() { RuleFor(x => x.Ufficio) .NotEmpty() .Matches(@"^[A-Z]{2}$"); RuleFor(x => x.NumeroREA) .NotEmpty() .BasicLatinValidator() .Length(1, 20); RuleFor(x => x.SocioUnico) .SetValidator(new IsValidValidator()) .When(x => !string.IsNullOrEmpty(x.SocioUnico)); RuleFor(x => x.StatoLiquidazione) .NotEmpty() .SetValidator(new IsValidValidator()); } } } ================================================ FILE: Validators/LatinValidators.cs ================================================ using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; using FatturaElettronica.Resources; using FluentValidation; using FluentValidation.Validators; namespace FatturaElettronica.Validators { public abstract class LatinBaseValidator : PropertyValidator { private readonly Charsets _charset; protected LatinBaseValidator(Charsets charset) { _charset = charset; } protected override string GetDefaultMessageTemplate(string errorCode) { var unicodeLatinSupplement = _charset == Charsets.BasicLatin ? "Unicode Basic Latin" : "Unicode Latin-1 Supplement"; return string.Format(ValidatorMessages.TestoContententeCaratteriNonValidi, unicodeLatinSupplement); } public override bool IsValid(ValidationContext context, TProperty value) { if (value == null || value.ToString() == string.Empty) return true; var challenge = _charset switch { Charsets.BasicLatin => @"^[\p{IsBasicLatin}]+$", Charsets.Latin1Supplement => @"^[\p{IsBasicLatin}\p{IsLatin-1Supplement}]+$", _ => string.Empty }; var invalidLetters = new HashSet(); foreach (var letter in value.ToString()) { var upperLimit = _charset switch { Charsets.BasicLatin => 0x7F, Charsets.Latin1Supplement => 0xFF, _ => throw new ArgumentOutOfRangeException() }; if (letter > upperLimit) invalidLetters.Add(letter); } context.MessageFormatter.AppendArgument("NonLatinCode", new string(invalidLetters.ToArray())); return Regex.Match(value.ToString(), challenge).Success; } public override string Name => "LatinBaseValidator"; } public class BasicLatinValidator : LatinBaseValidator { public BasicLatinValidator() : base(Charsets.BasicLatin) { } } public class Latin1SupplementValidator : LatinBaseValidator { public Latin1SupplementValidator() : base(Charsets.Latin1Supplement) { } } public enum Charsets { BasicLatin, Latin1Supplement } public static class MyValidatorExtensions { public static IRuleBuilderOptions BasicLatinValidator( this IRuleBuilder ruleBuilder) { return ruleBuilder.SetValidator(new BasicLatinValidator()); } public static IRuleBuilderOptions Latin1SupplementValidator( this IRuleBuilder ruleBuilder) { return ruleBuilder.SetValidator(new Latin1SupplementValidator()); } } } ================================================ FILE: Validators/LocalitàBaseValidator.cs ================================================ using FatturaElettronica.Tabelle; using FluentValidation; namespace FatturaElettronica.Validators { public abstract class LocalitàBaseValidator : AbstractValidator where T : Common.Località { protected LocalitàBaseValidator() { RuleFor(x => x.Indirizzo) .NotEmpty() .Length(1, 60) .Latin1SupplementValidator(); RuleFor(x => x.NumeroCivico) .Length(1, 8) .When(x => !string.IsNullOrEmpty(x.NumeroCivico)); RuleFor(x => x.CAP) .NotEmpty() .Length(5) .Matches(@"^[0-9]+$"); RuleFor(x => x.Comune) .NotEmpty() .Length(1, 60) .Latin1SupplementValidator(); RuleFor(x => x.Provincia) .Matches(@"^[A-Z]{2}$") .When(x => !string.IsNullOrEmpty(x.Provincia)); RuleFor(id => id.Nazione) .NotEmpty() .SetValidator(new IsValidValidator()); } } } ================================================ FILE: Validators/RappresentanteFiscaleCessionarioCommittenteValidator.cs ================================================ using FatturaElettronica.Ordinaria.FatturaElettronicaHeader.CessionarioCommittente; namespace FatturaElettronica.Validators { public class RappresentanteFiscaleCessionarioCommittenteValidator : DenominazioneNomeCognomeValidator< RappresentanteFiscaleCessionarioCommittente> { public RappresentanteFiscaleCessionarioCommittenteValidator() { RuleFor(x => x.IdFiscaleIVA) .SetValidator(new IdFiscaleIVAValidator()); } } } ================================================ FILE: Validators/RappresentanteFiscaleValidator.cs ================================================ using FatturaElettronica.Ordinaria.FatturaElettronicaHeader.RappresentanteFiscale; using FluentValidation; namespace FatturaElettronica.Validators { public class RappresentanteFiscaleValidator : AbstractValidator { public RappresentanteFiscaleValidator() { RuleFor(x => x.DatiAnagrafici) .SetValidator(new DatiAnagraficiRappresentanteFiscaleValidator()); } } } ================================================ FILE: Validators/RegimeFiscaleValidator.cs ================================================ namespace FatturaElettronica.Validators { // public class RegimeFiscaleValidator : IsValidValidator where T : RegimeFiscale, new() // { // protected override ValidationFailure CreateValidationError(PropertyValidatorContext context) // { // var err = base.CreateValidationError(context); // if (context.PropertyValue != null && context.PropertyValue.ToString() == "RF03") // err.ErrorCode = "00459"; // // return err; // } // } } ================================================ FILE: Validators/ScontoMaggiorazioneValidator.cs ================================================ using FluentValidation; using FatturaElettronica.Extensions; using FatturaElettronica.Resources; using ScontoMaggiorazione = FatturaElettronica.Common.ScontoMaggiorazione; namespace FatturaElettronica.Validators { public class ScontoMaggiorazioneValidator : AbstractValidator { public ScontoMaggiorazioneValidator() { RuleFor(x => x.Tipo) .NotEmpty() .SetValidator(new IsValidValidator()); RuleFor(x => x.Tipo) .Must((challenge, _) => challenge.Importo != null || challenge.Percentuale != null) .WithMessage(ValidatorMessages.E00437) .WithErrorCode("00437"); RuleFor(x => x.Importo) .ScalePrecision8DecimalType(); RuleFor(x => x.Percentuale) .ScalePrecisionPercentualeDecimalType(); } } } ================================================ FILE: Validators/SedeCedentePrestatoreValidator.cs ================================================ namespace FatturaElettronica.Validators { using Ordinaria.FatturaElettronicaHeader.CedentePrestatore; public class SedeCedentePrestatoreValidator : LocalitàBaseValidator { } } ================================================ FILE: Validators/SedeCessionarioCommittenteValidator.cs ================================================ namespace FatturaElettronica.Validators { using Ordinaria.FatturaElettronicaHeader.CessionarioCommittente; public class SedeCessionarioCommittenteValidator : LocalitàBaseValidator { } } ================================================ FILE: Validators/Semplificata/AllegatiValidator.cs ================================================ using FluentValidation; using FatturaElettronica.Common; namespace FatturaElettronica.Validators.Semplificata { public class AllegatiValidator : AbstractValidator { public AllegatiValidator() { RuleFor(x => x.NomeAttachment) .NotEmpty() .Latin1SupplementValidator() .Length(1, 60); RuleFor(x => x.AlgoritmoCompressione) .Length(1, 60) .BasicLatinValidator() .When(x => !string.IsNullOrEmpty(x.AlgoritmoCompressione)); RuleFor(x => x.FormatoAttachment) .Length(1, 10) .BasicLatinValidator() .When(x => !string.IsNullOrEmpty(x.FormatoAttachment)); RuleFor(x => x.DescrizioneAttachment) .Length(1, 100) .Latin1SupplementValidator() .When(x => !string.IsNullOrEmpty(x.DescrizioneAttachment)); RuleFor(x => x.Attachment) .NotEmpty(); } } } ================================================ FILE: Validators/Semplificata/AltriDatiIdentificativiValidator.cs ================================================ using FatturaElettronica.Semplificata.FatturaElettronicaHeader.CessionarioCommittente; using FluentValidation; namespace FatturaElettronica.Validators.Semplificata { public class AltriDatiIdentificativiValidator : AbstractValidator { private const string ExpectedErrorCode = "00200"; public AltriDatiIdentificativiValidator() { RuleFor(x => x.Denominazione) .NotEmpty() .WithErrorCode(ExpectedErrorCode) .Length(1, 80) .WithErrorCode(ExpectedErrorCode) .Latin1SupplementValidator() .When(x => string.IsNullOrEmpty(x.CognomeNome)); RuleFor(x => x.Denominazione) .Empty() .WithErrorCode(ExpectedErrorCode) .When(x => !string.IsNullOrEmpty(x.CognomeNome)); RuleFor(x => x.Nome) .NotEmpty() .WithErrorCode(ExpectedErrorCode) .Length(1, 60) .WithErrorCode(ExpectedErrorCode) .Latin1SupplementValidator() .When(x => string.IsNullOrEmpty(x.Denominazione)); RuleFor(x => x.Nome) .Empty() .WithErrorCode(ExpectedErrorCode) .When(x => !string.IsNullOrEmpty(x.Denominazione)); RuleFor(x => x.Cognome) .NotEmpty() .WithErrorCode(ExpectedErrorCode) .Length(1, 60) .WithErrorCode(ExpectedErrorCode) .Latin1SupplementValidator() .When(x => string.IsNullOrEmpty(x.Denominazione)); RuleFor(x => x.Cognome) .Empty() .WithErrorCode(ExpectedErrorCode) .When(x => !string.IsNullOrEmpty(x.Denominazione)); RuleFor(x => x.Sede) .SetValidator(new SedeCessionarioCommittenteValidator()); RuleFor(x => x.StabileOrganizzazione) .SetValidator(new StabileOrganizzazioneValidator()) .When(x => x.StabileOrganizzazione != null && !x.StabileOrganizzazione.IsEmpty()); RuleFor(x => x.RappresentanteFiscale) .SetValidator(new RappresentanteFiscaleCessionarioCommittenteValidator()) .When(x => x.RappresentanteFiscale != null && !x.RappresentanteFiscale.IsEmpty()); } } } ================================================ FILE: Validators/Semplificata/CedentePrestatoreValidator.cs ================================================ using FatturaElettronica.Semplificata.FatturaElettronicaHeader.CedentePrestatore; using FatturaElettronica.Tabelle; using FluentValidation; namespace FatturaElettronica.Validators.Semplificata { public class CedentePrestatoreValidator : AbstractValidator { private const string ExpectedErrorCode = "00200"; public CedentePrestatoreValidator() { RuleFor(x => x.IdFiscaleIVA) .SetValidator(new IdFiscaleIVAValidator()); RuleFor(x => x.CodiceFiscale) .Matches("^[A-Z0-9]{11,16}$") .When(x => !string.IsNullOrEmpty(x.CodiceFiscale)); RuleFor(x => x.Denominazione) .NotEmpty() .WithErrorCode(ExpectedErrorCode) .Length(1, 80) .WithErrorCode(ExpectedErrorCode) .Latin1SupplementValidator() .When(x => string.IsNullOrEmpty(x.CognomeNome)); RuleFor(x => x.Denominazione) .Empty() .WithErrorCode(ExpectedErrorCode) .When(x => !string.IsNullOrEmpty(x.CognomeNome)); RuleFor(x => x.Nome) .NotEmpty() .WithErrorCode(ExpectedErrorCode) .Length(1, 60) .WithErrorCode(ExpectedErrorCode) .Latin1SupplementValidator() .When(x => string.IsNullOrEmpty(x.Denominazione)); RuleFor(x => x.Nome) .Empty() .WithErrorCode(ExpectedErrorCode) .When(x => !string.IsNullOrEmpty(x.Denominazione)); RuleFor(x => x.Cognome) .NotEmpty() .WithErrorCode(ExpectedErrorCode) .Length(1, 60) .WithErrorCode(ExpectedErrorCode) .Latin1SupplementValidator() .When(x => string.IsNullOrEmpty(x.Denominazione)); RuleFor(x => x.Cognome) .Empty() .WithErrorCode(ExpectedErrorCode) .When(x => !string.IsNullOrEmpty(x.Denominazione)); RuleFor(x => x.Sede) .SetValidator(new SedeCedentePrestatoreValidator()); RuleFor(x => x.StabileOrganizzazione) .SetValidator(new StabileOrganizzazioneValidator()) .When(x => x.StabileOrganizzazione != null && !x.StabileOrganizzazione.IsEmpty()); RuleFor(x => x.IscrizioneREA) .SetValidator(new IscrizioneREAValidator()) .When(x => x.IscrizioneREA != null && !x.IscrizioneREA.IsEmpty()); RuleFor(x => x.RegimeFiscale) .NotEmpty() .SetValidator(new IsValidValidator()); } } } ================================================ FILE: Validators/Semplificata/CessionarioCommittenteValidator.cs ================================================ using FatturaElettronica.Resources; using FatturaElettronica.Semplificata.FatturaElettronicaHeader.CessionarioCommittente; using FluentValidation; namespace FatturaElettronica.Validators.Semplificata { public class CessionarioCommittenteValidator : AbstractValidator { public CessionarioCommittenteValidator() { RuleFor(x => x.IdentificativiFiscali) .SetValidator(new IdentificativiFiscaliValidator()); RuleFor(x => x.IdentificativiFiscali) .Must(x => !x.IsEmpty()).WithMessage(ValidatorMessages.IdentificativiFiscaliEObbligatorio); RuleFor(x => x.AltriDatiIdentificativi) .SetValidator(new AltriDatiIdentificativiValidator()) .When(x => x.AltriDatiIdentificativi != null && !x.AltriDatiIdentificativi.IsEmpty()); } } } ================================================ FILE: Validators/Semplificata/DatiBeniServiziValidator.cs ================================================ using FatturaElettronica.Resources; using FatturaElettronica.Semplificata.FatturaElettronicaBody.DatiBeniServizi; using FluentValidation; using NaturaSemplificata = FatturaElettronica.Tabelle.NaturaSemplificata; namespace FatturaElettronica.Validators.Semplificata { public class DatiBeniServiziValidator : AbstractValidator { public DatiBeniServiziValidator() { RuleFor(x => x.Descrizione) .NotEmpty() .Length(1, 1000) .Latin1SupplementValidator(); RuleFor(x => x.Importo) .NotEmpty(); RuleFor(x => x.DatiIVA) .SetValidator(new DatiIVAValidator()); RuleFor(x => x.Natura) .Must(natura => !string.IsNullOrEmpty(natura)) .When(x => x.DatiIVA.Aliquota == 0m && x.DatiIVA.Imposta == 0m) .WithMessage(ValidatorMessages.E00400_S) .WithErrorCode("00400"); RuleFor(x => x.Natura) .Must(string.IsNullOrEmpty) .When(x => x.DatiIVA.Aliquota > 0m || x.DatiIVA.Imposta > 0m) .WithMessage(ValidatorMessages.E00401_S) .WithErrorCode("00401"); RuleFor(x => x.Natura) .SetValidator(new IsValidValidator()) .When(x => x.Natura != null); RuleFor(x => x.RiferimentoNormativo) .Length(1, 100) .BasicLatinValidator() .When(x => !string.IsNullOrEmpty(x.RiferimentoNormativo)); } } } ================================================ FILE: Validators/Semplificata/DatiFatturaRettificataValidator.cs ================================================ using FatturaElettronica.Semplificata.FatturaElettronicaBody.DatiGenerali; using FluentValidation; namespace FatturaElettronica.Validators.Semplificata { public class DatiFatturaRettificataValidator : AbstractValidator { public DatiFatturaRettificataValidator() { RuleFor(x => x.NumeroFR) .NotEmpty() .BasicLatinValidator() .Length(1, 20); RuleFor(x => x.DataFR) .NotEmpty(); RuleFor(x => x.ElementiRettificati) .NotEmpty() .BasicLatinValidator() .Length(1, 1000); } } } ================================================ FILE: Validators/Semplificata/DatiGeneraliDocumentoValidator.cs ================================================ using FatturaElettronica.Resources; using FatturaElettronica.Semplificata.FatturaElettronicaBody.DatiGenerali; using FluentValidation; using Divisa = FatturaElettronica.Tabelle.Divisa; using TipoDocumentoSemplificata = FatturaElettronica.Tabelle.TipoDocumentoSemplificata; namespace FatturaElettronica.Validators.Semplificata { public class DatiGeneraliDocumentoValidator : AbstractValidator { public DatiGeneraliDocumentoValidator() { RuleFor(x => x.TipoDocumento) .NotEmpty() .SetValidator(new IsValidValidator()); RuleFor(x => x.Divisa) .NotEmpty() .SetValidator(new IsValidValidator()); RuleFor(x => x.Numero) .NotEmpty() .BasicLatinValidator() .Length(1, 20); RuleFor(x => x.Numero) .Matches(@"\d") .WithMessage(ValidatorMessages.E00425) .WithErrorCode("00425"); RuleFor(x => x.BolloVirtuale) .Equal("SI") .When(x => x.BolloVirtuale != null); } } } ================================================ FILE: Validators/Semplificata/DatiGeneraliValidator.cs ================================================ using FatturaElettronica.Resources; using FatturaElettronica.Semplificata.FatturaElettronicaBody.DatiGenerali; using FluentValidation; namespace FatturaElettronica.Validators.Semplificata { public class DatiGeneraliValidator : AbstractValidator { public DatiGeneraliValidator() { RuleFor(x => x.DatiGeneraliDocumento) .SetValidator(new DatiGeneraliDocumentoValidator()); RuleFor(x => x.DatiFatturaRettificata) .SetValidator(new DatiFatturaRettificataValidator()) .When(x => x.DatiFatturaRettificata != null && !x.DatiFatturaRettificata.IsEmpty()); RuleFor(x => x.DatiFatturaRettificata.DataFR) .Must((datigenerali, data) => datigenerali.DatiGeneraliDocumento.Data >= data) .WithMessage(ValidatorMessages.E00418_S) .WithErrorCode("00418") .When(x => !x.DatiFatturaRettificata.IsEmpty()); } } } ================================================ FILE: Validators/Semplificata/DatiIVAValidator.cs ================================================ using FatturaElettronica.Semplificata.FatturaElettronicaBody.DatiBeniServizi; using FluentValidation; namespace FatturaElettronica.Validators.Semplificata { public class DatiIVAValidator : AbstractValidator { public DatiIVAValidator() { RuleFor(x => x.Imposta) .NotNull() .When(x => x.Aliquota == null); RuleFor(x => x.Aliquota) .NotNull() .LessThanOrEqualTo(100) .When(x => x.Imposta == null); } } } ================================================ FILE: Validators/Semplificata/DatiTrasmissioneValidator.cs ================================================ using FatturaElettronica.Semplificata.FatturaElettronicaHeader.DatiTrasmissione; using FatturaElettronica.Tabelle; using FluentValidation; namespace FatturaElettronica.Validators.Semplificata { public class DatiTrasmissioneValidator : AbstractValidator { public DatiTrasmissioneValidator() { RuleFor(dt => dt.IdTrasmittente) .SetValidator(new IdTrasmittenteValidator()); RuleFor(dt => dt.ProgressivoInvio) .NotEmpty() .BasicLatinValidator() .Length(1, 10); RuleFor(dt => dt.FormatoTrasmissione) .NotEmpty() .SetValidator(new IsValidValidator()) .WithErrorCode("00428"); RuleFor(dt => dt.CodiceDestinatario) .NotEmpty(); RuleFor(dt => dt.CodiceDestinatario) .Matches(@"^[A-Z0-9]+$") .When(x => !string.IsNullOrEmpty(x.CodiceDestinatario)); RuleFor(dt => dt.CodiceDestinatario) .Length(7) .When(dt => dt.FormatoTrasmissione == Defaults.FormatoTrasmissione.Semplificata) .WithErrorCode("00311"); RuleFor(dt => dt.PECDestinatario) .Matches(Constants.EmailRegex) .When(x => !string.IsNullOrEmpty(x.PECDestinatario)); } } } ================================================ FILE: Validators/Semplificata/DenominazioneNomeCognomeValidator.cs ================================================ using FluentValidation; using FatturaElettronica.Common; namespace FatturaElettronica.Validators.Semplificata { public abstract class DenominazioneNomeCognomeValidator : AbstractValidator where T : DenominazioneNomeCognome { protected DenominazioneNomeCognomeValidator() { const string expectedErrorCode = "00200"; RuleFor(x => x.Denominazione) .NotEmpty() .WithErrorCode(expectedErrorCode) .Length(1, 80) .WithErrorCode(expectedErrorCode) .Latin1SupplementValidator() .When(x => string.IsNullOrEmpty(x.CognomeNome)); RuleFor(x => x.Denominazione) .Empty() .WithErrorCode(expectedErrorCode) .When(x => !string.IsNullOrEmpty(x.CognomeNome)); RuleFor(x => x.Nome) .NotEmpty() .WithErrorCode(expectedErrorCode) .Length(1, 60) .WithErrorCode(expectedErrorCode) .Latin1SupplementValidator() .When(x => string.IsNullOrEmpty(x.Denominazione)); RuleFor(x => x.Nome) .Empty() .WithErrorCode(expectedErrorCode) .When(x => !string.IsNullOrEmpty(x.Denominazione)); RuleFor(x => x.Cognome) .NotEmpty() .WithErrorCode(expectedErrorCode) .Length(1, 60) .WithErrorCode(expectedErrorCode) .Latin1SupplementValidator() .When(x => string.IsNullOrEmpty(x.Denominazione)); RuleFor(x => x.Cognome) .Empty() .WithErrorCode(expectedErrorCode) .When(x => !string.IsNullOrEmpty(x.Denominazione)); } } } ================================================ FILE: Validators/Semplificata/FatturaElettronicaBodyValidator.cs ================================================ using System.Collections.Generic; using System.Linq; using FatturaElettronica.Resources; using FatturaElettronica.Semplificata; using FatturaElettronica.Semplificata.FatturaElettronicaBody; using FatturaElettronica.Semplificata.FatturaElettronicaBody.DatiBeniServizi; using FatturaElettronica.Semplificata.FatturaElettronicaHeader; using FluentValidation; namespace FatturaElettronica.Validators.Semplificata { public class FatturaElettronicaBodyValidator : AbstractValidator { public FatturaElettronicaBodyValidator() { RuleFor(x => x.DatiGenerali) .SetValidator(new DatiGeneraliValidator()); RuleForEach(x => x.DatiBeniServizi) .SetValidator(new DatiBeniServiziValidator()); RuleFor(x => x.DatiBeniServizi) .NotEmpty().WithMessage(ValidatorMessages.DatiBeniServiziEObbligatorio); RuleForEach(x => x.Allegati) .SetValidator(new AllegatiValidator()); } } } ================================================ FILE: Validators/Semplificata/FatturaElettronicaHeaderValidator.cs ================================================ using FatturaElettronica.Resources; using FatturaElettronica.Semplificata.FatturaElettronicaHeader; using FluentValidation; using SoggettoEmittente = FatturaElettronica.Tabelle.SoggettoEmittente; namespace FatturaElettronica.Validators.Semplificata { public class FatturaElettronicaHeaderValidator : AbstractValidator { public FatturaElettronicaHeaderValidator() { RuleFor(x => x.DatiTrasmissione) .SetValidator(new DatiTrasmissioneValidator()); RuleFor(x => x.CedentePrestatore) .SetValidator(new CedentePrestatoreValidator()); RuleFor(x => x.CessionarioCommittente) .SetValidator(new CessionarioCommittenteValidator()); RuleFor(x => x.SoggettoEmittente) .SetValidator(new IsValidValidator()) .When(x => !string.IsNullOrEmpty(x.SoggettoEmittente)); RuleFor(x => x) .Must((header, _) => HeaderValidateAgainstError00476(header)) .WithMessage(ValidatorMessages.E00476) .WithErrorCode("00476"); } private static bool HeaderValidateAgainstError00476(FatturaElettronicaHeader header) { var idCedente = header.CedentePrestatore.IdFiscaleIVA.IdPaese; var idCommittente = header.CessionarioCommittente.IdentificativiFiscali.IdFiscaleIVA is null || header.CessionarioCommittente.IdentificativiFiscali.IdFiscaleIVA.IsEmpty() ? "" : header.CessionarioCommittente.IdentificativiFiscali.IdFiscaleIVA.IdPaese; return idCedente == "IT" || idCommittente is "IT" or ""; } } } ================================================ FILE: Validators/Semplificata/FatturaSemplificataValidator.cs ================================================ using System.Linq; using FatturaElettronica.Resources; using FatturaElettronica.Semplificata; using FluentValidation; namespace FatturaElettronica.Validators.Semplificata { public class FatturaSemplificataValidator : AbstractValidator { public FatturaSemplificataValidator() { RuleFor(dt => dt.FatturaElettronicaHeader) .SetValidator(new FatturaElettronicaHeaderValidator()); RuleForEach(dt => dt.FatturaElettronicaBody) .SetValidator(new FatturaElettronicaBodyValidator()); RuleFor(x => x) .Must((fattura, _) => ImportoTotaleValidateAgainstError00460(fattura)) .WithMessage(ValidatorMessages.E00460) .WithErrorCode("00460"); RuleFor(x => x) .Must((fattura, _) => FatturaValidateAgainstError00471(fattura)) .WithMessage(ValidatorMessages.E00471_S) .WithErrorCode("00471"); } private static bool FatturaValidateAgainstError00471(FatturaSemplificata fatturaSemplificata) { var cedente = fatturaSemplificata.FatturaElettronicaHeader.CedentePrestatore.IdFiscaleIVA.ToString(); var cessionario = fatturaSemplificata.FatturaElettronicaHeader.CessionarioCommittente.IdentificativiFiscali.IdFiscaleIVA .ToString(); return cedente != cessionario || fatturaSemplificata.FatturaElettronicaBody.All(x => x.DatiGenerali.DatiGeneraliDocumento.TipoDocumento != "TD07"); } private static bool ImportoTotaleValidateAgainstError00460(FatturaSemplificata fatturaSemplificata) { var regimeFiscale = fatturaSemplificata.FatturaElettronicaHeader.CedentePrestatore.RegimeFiscale; if (regimeFiscale == RegimeFiscale.RF19 || regimeFiscale == RegimeFiscale.RF20) return true; return fatturaSemplificata.FatturaElettronicaBody.All(body => { var importoTotale = body.DatiBeniServizi.Sum(x => x.Importo); if (importoTotale > 400) return !body.DatiGenerali.DatiFatturaRettificata.IsEmpty(); return true; }); } } } ================================================ FILE: Validators/Semplificata/IdentificativiFiscaliValidator.cs ================================================ using FatturaElettronica.Resources; using FatturaElettronica.Semplificata.FatturaElettronicaHeader.CessionarioCommittente; using FluentValidation; namespace FatturaElettronica.Validators.Semplificata { public class IdentificativiFiscaliValidator : AbstractValidator { public IdentificativiFiscaliValidator() { RuleFor(x => x.IdFiscaleIVA) .SetValidator(new IdFiscaleIVAValidator()) .When(x => x.IdFiscaleIVA != null && !x.IdFiscaleIVA.IsEmpty()); RuleFor(x => x.CodiceFiscale) .Matches("^[A-Z0-9]{11,16}$") .When(x => !string.IsNullOrEmpty(x.CodiceFiscale)); RuleFor(x => x.CodiceFiscale) .Must((challenge, _) => !(string.IsNullOrEmpty(challenge.CodiceFiscale) && challenge.IdFiscaleIVA.IsEmpty())) .WithMessage(ValidatorMessages.E00417_S) .WithErrorCode("00417"); RuleFor(x => x.IdFiscaleIVA) .Must((challenge, _) => !(string.IsNullOrEmpty(challenge.CodiceFiscale) && challenge.IdFiscaleIVA.IsEmpty())) .WithMessage(ValidatorMessages.E00417_S) .WithErrorCode("00417"); } } } ================================================ FILE: Validators/Semplificata/IscrizioneREAValidator.cs ================================================ using FatturaElettronica.Semplificata.FatturaElettronicaHeader.CedentePrestatore; using FatturaElettronica.Tabelle; using FluentValidation; namespace FatturaElettronica.Validators.Semplificata { public class IscrizioneREAValidator : AbstractValidator { public IscrizioneREAValidator() { RuleFor(x => x.Ufficio) .NotEmpty() .Matches(@"^[A-Z]{2}$"); RuleFor(x => x.NumeroREA) .NotEmpty() .BasicLatinValidator() .Length(1, 20); RuleFor(x => x.SocioUnico) .SetValidator(new IsValidValidator()) .When(x => x.SocioUnico != null && !string.IsNullOrEmpty(x.SocioUnico)); RuleFor(x => x.StatoLiquidazione) .NotEmpty() .SetValidator(new IsValidValidator()); } } } ================================================ FILE: Validators/Semplificata/RappresentanteFiscaleCessionarioCommittenteValidator.cs ================================================ using FatturaElettronica.Semplificata.FatturaElettronicaHeader.CessionarioCommittente; namespace FatturaElettronica.Validators.Semplificata { public class RappresentanteFiscaleCessionarioCommittenteValidator : DenominazioneNomeCognomeValidator< RappresentanteFiscaleCessionarioCommittente> { public RappresentanteFiscaleCessionarioCommittenteValidator() { RuleFor(x => x.IdFiscaleIVA) .SetValidator(new IdFiscaleIVAValidator()); } } } ================================================ FILE: Validators/Semplificata/SedeCedentePrestatoreValidator.cs ================================================ using FatturaElettronica.Semplificata.FatturaElettronicaHeader.CedentePrestatore; namespace FatturaElettronica.Validators.Semplificata { public class SedeCedentePrestatoreValidator : LocalitàBaseValidator { } } ================================================ FILE: Validators/Semplificata/SedeCessionarioCommittenteValidator.cs ================================================ using FatturaElettronica.Semplificata.FatturaElettronicaHeader.CessionarioCommittente; namespace FatturaElettronica.Validators.Semplificata { public class SedeCessionarioCommittenteValidator : LocalitàBaseValidator { } } ================================================ FILE: Validators/Semplificata/StabileOrganizzazioneValidator.cs ================================================ namespace FatturaElettronica.Validators.Semplificata { public class StabileOrganizzazioneValidator : LocalitàBaseValidator { } } ================================================ FILE: Validators/StabileOrganizzazioneValidator.cs ================================================ namespace FatturaElettronica.Validators { public class StabileOrganizzazioneValidator : LocalitàBaseValidator { } } ================================================ FILE: Validators/TerzoIntermediarioOSoggettoEmittenteValidator.cs ================================================ using FatturaElettronica.Ordinaria.FatturaElettronicaHeader.TerzoIntermediarioOSoggettoEmittente; using FluentValidation; namespace FatturaElettronica.Validators { public class TerzoIntermediarioOSoggettoEmittenteValidator : AbstractValidator { public TerzoIntermediarioOSoggettoEmittenteValidator() { RuleFor(x => x.DatiAnagrafici) .SetValidator(new DatiAnagraficiTerzoIntermediarioValidator()); } } } ================================================ FILE: docs/authors.md ================================================ [!include[](<../AUTHORS.md>)] ================================================ FILE: docs/changelog.md ================================================ [!include[](<../CHANGES.md>)] ================================================ FILE: docs/extensions.md ================================================ # Extensions Il namespace `FatturaElettronica.Extensions` mette a disposizione una serie di extension method che aggiungono funzionalità o semplificano il lavoro quotidiano con le fatture elettroniche. ### XML - `ReadXml(string filePath)`: deserializza da file XML; - `ReadXml(Stream stream)`: deserializza da stream; - `ReadXmlSigned(string filePath)`: deserializza da XML firmato con algoritmo CADES (.p7m). Supporta anche file codificati Base64; - `ReadXmlSigned(Stream stream)`: deserializza da stream firmato con algoritmo CADES (.p7m). Supporta anche file codificati Base64; - `ReadXmlSignedBase64(string filePath)`: consigliato quando si sa in anticipo che il file è codificato Base64; - `WriteXml(string filePath)`: serializza su file XML non firmato; - `WriteXmlSigned(string pfxFile, string pfxPassword, string p7mFilePath)`: serializza su file XML, firmando con algoritmo CADES (.p7m); ### HTML - `WriteHtml(string outPath, string xslPath)`: crea un HTML con rappresentazione della fattura, usando un foglio di stile; ### JSON - `FromJson(string json)`: deserializza da JSON; ### Altro - `FatturaElettronicaFileNameGenerator`: classe per la generazione di nomi file conformi allo standard fattura elettronica. > [!note] > A partire dalla v3 di FatturaElettronica le Extensions sono incluse nel package principale e non più rilasciate come package a parte. ================================================ FILE: docs/faq.md ================================================ # Domande frequenti ## Quali lingue sono supportate? Al momento [Italiano e Tedesco](https://github.com/FatturaElettronica/FatturaElettronica.NET/tree/master/Resources). Vuoi aggiungere la tua lingua? [Apri una pull request](https://github.com/FatturaElettronica/FatturaElettronica.NET/pulls). ## Non si installa su NET Framework 3.5 Questo progetto è NetStandard 2.0. Supporta NET Framework v4.6.1 o superiori. ## Non si installa su NET Framework 4.5 Questo progetto è NetStandard 2.0. Supporta NET Framework v4.6.1 o superiori. ## Verrà mai aggiunto il supporto per Net Framework 3.5? No. ## Verrà mai aggiunto il supporto per Net Framework 4.5? Versioni precedenti alla 3.0 supportano NET45, ma sono probabilmente obsolete. Non pensiamo di tornare a supportare NET45 in futuro. ## Che fine ha fatto FatturaElettronica.Extensions? È stato incorporato nel package FatturaElettronica a partire dalla versione 3. ## Che fine ha fatto il FatturaElettronica.Core? È stato incorporato nel package FatturaElettronica a partire dalla versione 3. ================================================ FILE: docs/index.md ================================================ [!include[](<../README.md>)] ================================================ FILE: docs/toc.md ================================================ # [Introduzione](index.md) # [Guida all'uso](tutorial.md) # [Estensioni](extensions.md) # [Domande frequenti](faq.md) # [Cronologia](changelog.md) # [API Reference](/docs/api/FatturaElettronica) # [Autori](authors.md) ================================================ FILE: docs/tutorial.md ================================================ # Guida all'uso Sono supportate sie fatture ordinarie che seplificate. Qui viene usata una `FatturaOrdinaria`, ma gli esempi sono validi quasi sempre anche per una instanza di `FatturaSemplificata`. ## Instanziare la fattura ```cs var fattura = new FatturaOrdinaria(); // In alternativa usare CreateInstance() per ottenere una istanza già tipizzata. // Questa chiamata restituisce fattura con CodiceDestinatario = "0000000" // FormatoTrasmissione = "FPR12": fattura = FatturaOrdinaria.CreateInstance(Instance.Privati); ``` ## Caricare la fattura da XML ```cs // Lettura da file XML var readerSettings = new XmlReaderSettings { IgnoreWhitespace = true, IgnoreComments = true, IgnoreProcessingInstructions = true }; using (var r = XmlReader.Create("IT01234567890_12345.xml", readerSettings)) { fattura.ReadXml(r); } ``` In alternativa `CreateInstanceFromXml` restituisce una istanza di `FatturaOrdinaria` o `FatturaSemplificata` a seconda dei contenuti del file: ``` using var stream = new FileStream("IT02182030391_31.xml.p7m", FileMode.Open, FileAccess.Read); var fattura = FatturaBase.CreateInstanceFromXml(stream); Console.WriteLine(fattura.GetFormatoTrasmissione()); // "FSM10" ``` `CreateInstanceFromXml` supporta sia file XML puri (*.xml*) che firmati digitalmente (*.p7m*), eventualmente anche codificati Base64. Questa comodità ha un costo, ovvero un leggero impatto sulle prestazioni in quanto è necessaria una pre-scasione dello stream per determinarne il formato e la tipologia di fattura. ## Consultare la fattura ```cs // Ogni file di fattura contiene un array di elementi FatturaElettronicaBody. Console.WriteLine($"Numero documenti: {fattura.FatturaElettronicaBody.Count}."); // Iterazione documenti presenti nel file. Console.WriteLine("Documenti inclusi nel file FatturaPA:"); foreach (var doc in fattura.FatturaElettronicaBody) { var datiDocumento = doc.DatiGenerali.DatiGeneraliDocumento; Console.WriteLine($"Numero: {datiDocumento.Numero}"); Console.WriteLine($"Data: {datiDocumento.Data.ToShortDateString()}"); Console.WriteLine($"Importo totale: {datiDocumento.ImportoTotaleDocumento}"); Console.WriteLine(); } ``` ## Convalidare la fattura ```cs // Convalida del documento. var validator = new FatturaOrdinariaValidator(); var result = validator.Validate(fattura); Console.WriteLine(result.IsValid); // Introspezione errori di convalida. foreach (var error in result.Errors) { Console.WriteLine(error.PropertyName); Console.WriteLine(error.ErrorMessage); // ErrorCode conterrà il codice errore (es: "00423"). Console.WriteLine(error.ErrorCode); } // Per brevità è possibile usare un extension method. result = fattura.Validate(); Console.WriteLine(result.IsValid); // Sono disponibili validatori per ogni classe esposta da FatturaElettronica. var anagrafica = new DatiAnagraficiCedentePrestatore(); var anagraficaValidator = new DatiAnagraficiCedentePrestatoreValidator(); Console.WriteLine(anagraficaValidator.Validate(anagrafica).IsValid); // Oppure, come già visto: Console.WriteLine(anagrafica.Validate().IsValid); ``` ## Modificare e aggiungere elementi alla fattura ```cs // Modifica proprietà Header. var header = fattura.FatturaElettronicaHeader; header.CedentePrestatore.DatiAnagrafici.Anagrafica.Denominazione = "Bianchi Srl"; // Modifica proprietà Body var body = fattura.FatturaElettronicaBody[0]; body.DatiGenerali.DatiGeneraliDocumento.Numero = "12345"; // Aggiunta di un nuovo elemento Body. body = new FatturaElettronicaBody(); body.DatiGenerali.DatiGeneraliDocumento.Numero = "99"; fattura.FatturaElettronicaBody.Add(body); ``` ## Salvare la fattura su XML ```cs // Serializzazione XML var writerSettings = new XmlWriterSettings { Indent = true }; using (var w = XmlWriter.Create("IT01234567890_FPA01.xml", writerSettings)) { fattura.WriteXml(w); } ``` ## Scrittura e lettura da JSON ```cs // Serializzazione JSON. var json = fattura.ToJson(JsonOptions.Indented); Console.WriteLine(json); // Deserializzazione da JSON. var fatturaFromJson = new FatturaOrdinaria(); fatturaFromJson.FromJson(new JsonTextReader(new StringReader(json))); ``` ## Esempio completo ```cs using FatturaElettronica.Ordinaria; using FatturaElettronica.Common; using FatturaElettronica.Defaults; using FatturaElettronica.Validators; using FatturaElettronica.Ordinaria.FatturaElettronicaBody; using FatturaElettronica.Ordinaria.FatturaElettronicaHeader.CedentePrestatore; using System; using System.Xml; using System.IO; using Newtonsoft.Json; using FatturaElettronica; namespace DemoApp { class Program { static void Main(string[] args) { var fattura = new FatturaOrdinaria(); // In alternativa usare CreateInstance() per ottenere una istanza già tipizzata. // Questa chiamata restituisce fattura con CodiceDestinatario = "0000000" // FormatoTrasmissione = "FPR12": fattura = FatturaOrdinaria.CreateInstance(Instance.Privati); // Lettura da file XML var readerSettings = new XmlReaderSettings { IgnoreWhitespace = true, IgnoreComments = true, IgnoreProcessingInstructions = true }; using (var r = XmlReader.Create("IT01234567890_12345.xml", readerSettings)) { fattura.ReadXml(r); } // Ogni file di fattura contiene un array di elementi FatturaElettronicaBody. Console.WriteLine($"Numero documenti: {fattura.FatturaElettronicaBody.Count}."); // Iterazione documenti presenti nel file. Console.WriteLine("Documenti inclusi nel file FatturaPA:"); foreach (var doc in fattura.FatturaElettronicaBody) { var datiDocumento = doc.DatiGenerali.DatiGeneraliDocumento; Console.WriteLine($"Numero: {datiDocumento.Numero}"); Console.WriteLine($"Data: {datiDocumento.Data.ToShortDateString()}"); Console.WriteLine($"Importo totale: {datiDocumento.ImportoTotaleDocumento}"); Console.WriteLine(); } // Convalida del documento. var validator = new FatturaOrdinariaValidator(); var result = validator.Validate(fattura); Console.WriteLine(result.IsValid); // Introspezione errori di convalida. foreach (var error in result.Errors) { Console.WriteLine(error.PropertyName); Console.WriteLine(error.ErrorMessage); // ErrorCode conterrà il codice errore (es: "00423"). Console.WriteLine(error.ErrorCode); } // Per brevità è possibile usare un extension method. result = fattura.Validate(); Console.WriteLine(result.IsValid); // Sono disponibili validatori per ogni classe esposta da FatturaElettronica. var anagrafica = new DatiAnagraficiCedentePrestatore(); var anagraficaValidator = new DatiAnagraficiCedentePrestatoreValidator(); Console.WriteLine(anagraficaValidator.Validate(anagrafica).IsValid); // Oppure, come già visto: Console.WriteLine(anagrafica.Validate().IsValid); // Modifica proprietà Header. var header = fattura.FatturaElettronicaHeader; header.CedentePrestatore.DatiAnagrafici.Anagrafica.Denominazione = "Bianchi Srl"; // Modifica proprietà Body var body = fattura.FatturaElettronicaBody[0]; body.DatiGenerali.DatiGeneraliDocumento.Numero = "12345"; // Aggiunta di un nuovo elemento Body. body = new FatturaElettronicaBody(); body.DatiGenerali.DatiGeneraliDocumento.Numero = "99"; fattura.FatturaElettronicaBody.Add(body); // Serializzazione XML var writerSettings = new XmlWriterSettings { Indent = true }; using (var w = XmlWriter.Create("IT01234567890_FPA01.xml", writerSettings)) { fattura.WriteXml(w); } // Serializzazione JSON. var json = fattura.ToJson(JsonOptions.Indented); Console.WriteLine(json); // Deserializzazione da JSON. var fatturaFromJson = new FatturaOrdinaria(); fatturaFromJson.FromJson(new JsonTextReader(new StringReader(json))); } } } ``` ## Limitazioni In convalida non sono supportati gli errori di tipo `3xx` in quanto risultato dei riscontri fatti da PA sui propri server. In lettura di file firmati, non è possibile leggere con successo file la cui firma digitale o il contenuto siano stati alterati, e si riceverà un SignatureException, indipendentemente dall'impostazione del parametro validate nei metodi ReadXMLSigned e CreateInstanceFromXml