Skip to content

Commit

Permalink
Merge pull request #10 from es-wolters-kluwer/features/InvoiceAdditio…
Browse files Browse the repository at this point in the history
…nalData

InvoiceAdditionalData v 2.14.0
  • Loading branch information
es-wolters-kluwer authored Dec 14, 2021
2 parents 4944452 + f02c391 commit 3887e0d
Show file tree
Hide file tree
Showing 22 changed files with 596 additions and 8 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,14 @@ jobs:

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore --framework net6.0

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<TargetFrameworks>netstandard2.0;netstandard2.1;net451;net461;net471;net48;net5.0;netcoreapp3.1;net6.0</TargetFrameworks>
<AssemblyName>a3innuva.TAA.Migration.SDK.Extensions</AssemblyName>
<RootNamespace>a3innuva.TAA.Migration.SDK.Extensions</RootNamespace>
<Version>2.13.0</Version>
<Version>2.14.0</Version>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Product>a3innuva.Importia.SDK</Product>
<PackageId>a3innuva.Importia.SDK.Extensions</PackageId>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
namespace a3innuva.TAA.Migration.SDK.Implementations
{
using a3innuva.TAA.Migration.SDK.Interfaces;
using System;

public class InputInvoiceAdditionalData : IInputInvoiceAdditionalData
{
public string Description { get; set; }
public DateTime RegistryDate { get; set; }
public string DuaDocumentId { get; set; }
public bool InvoicesInSpecialRegime { get; set; }
public decimal TaxableIncomeAtCost { get; set; }
public string InitialNumberOfDocument { get; set; }
public string LastNumberOfDocument { get; set; }
public TypeOfDocumentAdditionalDataEnum TypeOfDocument { get; set; }
public FundamentalAdditionalDataEnum Fundamental { get; set; }
public Guid Id { get; set; }
public int Line { get; set; }
public string Source { get; set; }

public string Identity() => string.Empty;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
namespace a3innuva.TAA.Migration.SDK.Implementations
{
using a3innuva.TAA.Migration.SDK.Interfaces;
using System;

public class OutputInvoiceAdditionalData : IOutputInvoiceAdditionalData
{
public string Description { get; set; }
public bool InvoiceByThird { get; set; }
public bool MultipleRecipients { get; set; }
public bool CouponsBonusesOrDiscounts { get; set; }
public bool InvoicesInSpecialRegime { get; set; }
public decimal TaxableIncomeAtCost { get; set; }
public string InitialNumberOfDocument { get; set; }
public string LastNumberOfDocument { get; set; }
public bool NotIncludedInCensus { get; set; }
public TypeOfDocumentAdditionalDataEnum TypeOfDocument { get; set; }
public FundamentalAdditionalDataEnum Fundamental { get; set; }
public Guid Id { get; set; }
public int Line { get; set; }
public string Source { get; set; }

public string Identity() => string.Empty;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,6 @@ public string Identity()
public decimal? PendingAmount { get; set; }
public decimal? SatisfiedAmount { get; set; }
public IPayment[] Maturities { get; set; }
public IInputInvoiceAdditionalData AdditionalData { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,6 @@ public string Identity()
public decimal? PendingAmount { get; set; }
public decimal? SatisfiedAmount { get; set; }
public ICharge[] Maturities { get; set; }
public IOutputInvoiceAdditionalData AdditionalData { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
namespace a3innuva.TAA.Migration.SDK.Implementations
{
using a3innuva.TAA.Migration.SDK.Interfaces;
public class InputInvoiceAdditionalDataValidation : Validation<IInputInvoiceAdditionalData>
{
protected override void SetupValidations()
{
this.CreateRule(x => this.Validate(x.Id), "Id");

this.CreateRule(x => x.Description.Length <= 500, this.ReplaceInMessage(ValidationMessages.InvalidLength, "'Descripción'"));

this.CreateRule(x => x.DuaDocumentId.Length <= 18, this.ReplaceInMessage(ValidationMessages.InvalidLength, "'Número de DUA'"));

this.CreateRule(x => x.InitialNumberOfDocument.Length <= 60, this.ReplaceInMessage(ValidationMessages.InvalidLength, "'Número de documento inicial'"));
this.CreateRule(x => x.LastNumberOfDocument.Length <= 60, this.ReplaceInMessage(ValidationMessages.InvalidLength, "'Número de documento final'"));
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
namespace a3innuva.TAA.Migration.SDK.Implementations
{
using a3innuva.TAA.Migration.SDK.Interfaces;
public class OutputInvoiceAdditionalDataValidation : Validation<IOutputInvoiceAdditionalData>
{
protected override void SetupValidations()
{
this.CreateRule(x => this.Validate(x.Id), "Id");

this.CreateRule(x => x.Description.Length <= 500, this.ReplaceInMessage(ValidationMessages.InvalidLength, "'Descripción'"));

this.CreateRule(x => x.InitialNumberOfDocument.Length <= 60, this.ReplaceInMessage(ValidationMessages.InvalidLength, "'Número de documento inicial'"));
this.CreateRule(x => x.LastNumberOfDocument.Length <= 60, this.ReplaceInMessage(ValidationMessages.InvalidLength, "'Número de documento final'"));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<TargetFrameworks>netstandard2.0;netstandard2.1;net451;net461;net471;net48;net5.0;netcoreapp3.1;net6.0</TargetFrameworks>
<AssemblyName>a3innuva.TAA.Migration.SDK.Implementations</AssemblyName>
<RootNamespace>a3innuva.TAA.Migration.SDK.Implementations</RootNamespace>
<Version>2.13.0</Version>
<Version>2.14.0</Version>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Product>a3innuva.Importia.SDK</Product>
<PackageId>a3innuva.Importia.SDK.Implementations</PackageId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<TargetFrameworks>netstandard2.0;netstandard2.1;net451;net461;net471;net48;net5.0;netcoreapp3.1;net6.0</TargetFrameworks>
<AssemblyName>a3innuva.TAA.Migration.SDK.Serialization</AssemblyName>
<RootNamespace>a3innuva.TAA.Migration.SDK.Serialization</RootNamespace>
<Version>2.13.0</Version>
<Version>2.14.0</Version>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Product>a3innuva.Importia.SDK</Product>
<PackageId>a3innuva.Importia.SDK.Serialization</PackageId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,15 @@ public class a3innuvaSerializationBinder: ISerializationBinder
typeof(a3innuva.TAA.Migration.SDK.Implementations.OutputInvoiceLine),
typeof(a3innuva.TAA.Migration.SDK.Implementations.Payment),
typeof(a3innuva.TAA.Migration.SDK.Implementations.Charge),
typeof(a3innuva.TAA.Migration.SDK.Implementations.InputInvoiceAdditionalData),
typeof(a3innuva.TAA.Migration.SDK.Implementations.OutputInvoiceAdditionalData),

typeof(a3innuva.TAA.Migration.SDK.Interfaces.IMigrationEntity[]),
typeof(a3innuva.TAA.Migration.SDK.Interfaces.IInputInvoiceLine[]),
typeof(a3innuva.TAA.Migration.SDK.Interfaces.IJournalLine[]),
typeof(a3innuva.TAA.Migration.SDK.Interfaces.IOutputInvoiceLine[]),
typeof(a3innuva.TAA.Migration.SDK.Interfaces.IPayment[]),
typeof(a3innuva.TAA.Migration.SDK.Interfaces.ICharge[]),
typeof(a3innuva.TAA.Migration.SDK.Interfaces.ICharge[])
};

public Type BindToType(string assemblyName, string typeName)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ public interface IInputInvoice : IInvoice
{
IInputInvoiceLine[] Lines { get; set; }
IPayment[] Maturities { get; set; }
IInputInvoiceAdditionalData AdditionalData { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ public interface IOutputInvoice : IInvoice
{
IOutputInvoiceLine[] Lines { get; set; }
ICharge[] Maturities { get; set; }
IOutputInvoiceAdditionalData AdditionalData { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
namespace a3innuva.TAA.Migration.SDK.Interfaces
{
public enum FundamentalAdditionalDataEnum
{
None,

IssuedNotCorrectiveGeneralRegime,
IssuedNotCorrectiveSpecialRegimeForTravelAgencies,
IssuedNotCorrectiveThirdPartyFeeCollections,
IssuedNotCorrectiveCertificatesOfWorkToThePublicAdministration,
IssuedNotCorrectiveSuccessiveTractOperations,
IssuedNotCorrectiveTravelAgencyServicesAsMediator,
IssuedCorrectiveGeneralRegime,
IssuedCorrectiveSpecialRegimeForTravelAgencies,
IssuedCorrectiveThirdPartyFeeCollections,
IssuedCorrectiveCertificatesOfWorkToThePublicAdministration,
IssuedCorrectiveSuccessiveTractOperations,
IssuedCorrectiveTravelAgencyServicesAsMediator,



InputNotCorrectiveGeneralRegime,
InputNotCorrectiveSpecialRegimeForTravelAgencies,
InputNotCorrectivePurchaseTravelAgencyServicesAsMediator,
InputCorrectiveGeneralRegime,
InputCorrectiveSpecialRegimeForTravelAgencies,
InputCorrectivePurchaseTravelAgencyServicesAsMediator,
InputCorrectiveTravelAgenciesServices
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
namespace a3innuva.TAA.Migration.SDK.Interfaces
{
using System;
public interface IInputInvoiceAdditionalData : IMigrationEntity, IMigrationSourceInfo
{
/// <summary>
/// Description
/// </summary>
string Description { get; set;}
/// <summary>
/// Date of registry of AEAT
/// </summary>
DateTime RegistryDate { get; set; }
/// <summary>
/// Dua document id
/// </summary>
string DuaDocumentId { get; set; }
/// <summary>
/// Invoice in special regime
/// </summary>
bool InvoicesInSpecialRegime { get; set; }
/// <summary>
/// Taxable income at cost
/// </summary>
decimal TaxableIncomeAtCost { get; set; }
/// <summary>
/// Initial number of document
/// </summary>
string InitialNumberOfDocument { get; set; }
/// <summary>
/// Last number of document
/// </summary>
string LastNumberOfDocument { get; set; }
/// <summary>
/// Type of document additional data
/// </summary>
TypeOfDocumentAdditionalDataEnum TypeOfDocument { get; set; }
/// <summary>
/// Fundamental additional data
/// </summary>
FundamentalAdditionalDataEnum Fundamental { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
namespace a3innuva.TAA.Migration.SDK.Interfaces
{
using System;
public interface IOutputInvoiceAdditionalData : IMigrationEntity, IMigrationSourceInfo
{
/// <summary>
/// Description
/// </summary>
string Description { get; set;}
/// <summary>
/// Invoice by third
/// </summary>
bool InvoiceByThird { get; set; }
/// <summary>
/// Multiple recipients
/// </summary>
bool MultipleRecipients { get; set; }
/// <summary>
/// Coupons, bonuses or discounts
/// </summary>
bool CouponsBonusesOrDiscounts { get; set; }
/// <summary>
/// Invoice in special regime
/// </summary>
bool InvoicesInSpecialRegime { get; set; }
/// <summary>
/// Taxable income at cost
/// </summary>
decimal TaxableIncomeAtCost { get; set; }
/// <summary>
/// Initial number of document
/// </summary>
string InitialNumberOfDocument { get; set; }
/// <summary>
/// Last number of document
/// </summary>
string LastNumberOfDocument { get; set; }
/// <summary>
/// Not included in census
/// </summary>
bool NotIncludedInCensus { get; set; }
/// <summary>
/// Type of document additional data
/// </summary>
TypeOfDocumentAdditionalDataEnum TypeOfDocument { get; set; }
/// <summary>
/// Fundamental additional data
/// </summary>
FundamentalAdditionalDataEnum Fundamental { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
namespace a3innuva.TAA.Migration.SDK.Interfaces
{
public enum TypeOfDocumentAdditionalDataEnum
{
None = 0,

IssuedNotCorrectiveInvoice = 10,
IssuedNotCorrectiveSimplifiedInvoice = 11,
IssuedNotCorrectiveInvoiceWithoutObligation = 12,
IssuedCorrectiveErrorFundado = 20,
IssuedCorrectiveConcurso = 21,
IssuedCorrectiveDeudaIncobrable = 22,
IssuedCorrectiveResto = 23,
IssuedCorrectiveSimplificadas = 24,



InputNotCorrectiveInvoice = 30,
InputNotCorrectiveSimplifiedInvoice = 31,
InputNotCorrectiveJustificantesContables = 32,
InputCorrectiveErrorFundado = 40,
InputCorrectiveConcurso = 41,
InputCorrectiveDeudaIncobrable = 42,
InputCorrectiveResto = 43,
InputCorrectiveSimplificadas = 44
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<TargetFrameworks>netstandard2.0;netstandard2.1;net451;net461;net471;net48;net5.0;netcoreapp3.1;net6.0</TargetFrameworks>
<AssemblyName>a3innuva.TAA.Migration.SDK.Interfaces</AssemblyName>
<RootNamespace>a3innuva.TAA.Migration.SDK.Interfaces</RootNamespace>
<Version>2.13.0</Version>
<Version>2.14.0</Version>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Product>a3innuva.Importia.SDK</Product>
<PackageId>a3innuva.Importia.SDK.Interfaces</PackageId>
Expand Down
Loading

0 comments on commit 3887e0d

Please sign in to comment.