feat: fiscal pack abstractions and the Italian pack (#37)

The rest of the product needs tax codes, natures, code lists and VAT rules
without knowing the country. IFiscalPack exposes the parts every country has
(tax code catalog, tax engine, calendar) and optional features by type, so a
module can tell a missing feature from a broken one. FiscalPackCatalog finds
the pack by country; only the composition root names the Italian pack, as an
architecture test now checks.

The Italian pack carries the FatturaPA 1.9.1 code lists, VAT natures and base
tax codes with their rules, summary rounding on the total per rate, the stamp
duty rule, VAT deadlines with the August and holiday shifts, withholding kinds,
basic depreciation rules and F24 codes. ADR 0025 records the design.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Alby96andClaude Opus 5.5 committed 2026-11-11 21:48:09 +01:00
1 parent 8079d3da69
commit 49d2bb166b
22 files changed
+1987 -17

No files matched your search

@@ -0,0 +1,40 @@
using Khaemhat.Fiscal.Abstractions;
namespace Khaemhat.Fiscal.Italy;
/// <summary>
/// The Italian fiscal pack (SPEC §1.10, ADR 0007, ADR 0025): chosen for companies whose <c>company_profile.country</c>
/// is <c>IT</c>. Registered only by the composition root of <c>Khaemhat.Web</c>.
/// </summary>
public sealed class ItalyFiscalPack : FiscalPackBase
{
/// <summary>The version of the Italian base data and code lists.</summary>
public const string Version = "IT 2026.2";
/// <summary>Creates the pack with every feature this version delivers.</summary>
public ItalyFiscalPack()
{
AddFeature<IEInvoiceFormat>(new FatturaPaFormat());
AddFeature<IWithholdingRules>(new WithholdingRulesIt());
AddFeature<IFixedAssetRules>(new FixedAssetRulesIt());
AddFeature<ITaxPaymentFormExporter>(new F24Exporter());
}
/// <inheritdoc />
public override string CountryCode => "IT";
/// <inheritdoc />
public override string Name => "Italia";
/// <inheritdoc />
public override string DataVersion => Version;
/// <inheritdoc />
public override ITaxCodeCatalog TaxCodes { get; } = new ItalianTaxCodeCatalog();
/// <inheritdoc />
public override ITaxEngine TaxEngine { get; } = new ItalianTaxEngine();
/// <inheritdoc />
public override IFiscalCalendar Calendar { get; } = new ItalianFiscalCalendar();
}