Files
Khaemhat/src/Khaemhat.Fiscal.Italy/ItalyFiscalPack.cs
T
Alby96andClaude Opus 5.5 321aae7e81 feat: provinces and municipalities from the ISTAT list in the base data (#45)
New companies now get the 110 provinces and 7,894 municipalities in force
(ISTAT list of 26/02/2026, CC BY 4.0), so the tax code calculation and the
municipality lookups work without loading anything. The list lives in the
Italian pack behind a new IPlaceDirectory feature and is added by the base
seeder like the rest of the base data: missing codes only, never touching
existing rows. The pack data version moves to IT 2026.3 so existing
companies receive the lists at the next start.

Postal codes are left out: the only candidate source (comuni-json) has no
licence for them and stops at 2020 (ADR 0028).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 09:07:12 +01:00

47 lines
1.7 KiB
C#

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.3";
/// <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());
AddFeature<ITaxIdentifierRules>(new ItalianTaxIdentifierRules());
AddFeature<IBaseTablesTemplate>(new ItalianBaseTables());
AddFeature<IPlaceDirectory>(new ItalianPlaces());
// ABI and CAB are read from every Italian IBAN; bank names and BICs arrive with the ABI list (ADR 0026).
AddFeature<IBankDirectory>(new ItalianBankDirectory([]));
}
/// <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();
}