Skip to content

Commit

Permalink
Backport official 'v3.4.6' into net_35
Browse files Browse the repository at this point in the history
  • Loading branch information
workgroupengineering committed Oct 29, 2022
2 parents 8195270 + c50ed89 commit 3f64040
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 1 deletion.
9 changes: 9 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@

## Stable

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
-------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@ private static bool FatturaValidateAgainstError00472(FatturaOrdinaria fatturaOrd
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;

return cedente.IdFiscaleIVA?.ToString() == cessionario.IdFiscaleIVA?.ToString() &&
cedente.CodiceFiscale == cessionario.CodiceFiscale;
}
Expand Down
2 changes: 1 addition & 1 deletion src/PackageInfo.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project DefaultTargets="Build"
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Version>3.4.5</Version>
<Version>3.4.6</Version>
<PackageId>FatturaElettronica.NET35</PackageId>
<PackageIcon>fattura_elettronica.png</PackageIcon>
<RepositoryType>git</RepositoryType>
Expand Down
5 changes: 5 additions & 0 deletions src/Test/Ordinaria/FatturaValidator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ public void FatturaValidateAgainstError00472()
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;

Expand All @@ -124,6 +128,7 @@ public void FatturaValidateAgainstError00472()

body.DatiGenerali.DatiGeneraliDocumento.TipoDocumento = "TD01";
Assert.IsNull(Challenge.Validate().Errors.FirstOrDefault(x => x.ErrorCode == "00472"));

}
}

Expand Down

0 comments on commit 3f64040

Please sign in to comment.