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:
1 parent
8079d3da69
commit
49d2bb166b
22 files changed
+1987
-17
No files matched your search
@@ -23,6 +23,8 @@ using Khaemhat.Data.Mapping;
|
||||
using Khaemhat.Data.Migrations;
|
||||
using Khaemhat.Data.PostgreSql;
|
||||
using Khaemhat.Data.Sqlite;
|
||||
using Khaemhat.Fiscal.Abstractions;
|
||||
using Khaemhat.Fiscal.Italy;
|
||||
using Khaemhat.Infrastructure.Caching;
|
||||
using Khaemhat.Infrastructure.Files;
|
||||
using Khaemhat.Infrastructure.Licensing;
|
||||
@@ -125,6 +127,11 @@ internal static class KhaemhatServices
|
||||
services.AddSingleton<SignInService>();
|
||||
services.AddSingleton<ProfileService>();
|
||||
|
||||
// Country fiscal packs (ADR 0007, ADR 0025): the only place that names a concrete pack. The application finds
|
||||
// the pack of a company through FiscalPackCatalog and company_profile.country.
|
||||
services.AddSingleton<IFiscalPack, ItalyFiscalPack>();
|
||||
services.AddSingleton(sp => new FiscalPackCatalog(sp.GetServices<IFiscalPack>()));
|
||||
|
||||
// Companies and start.
|
||||
services.AddSingleton<ICompanySeeder, PredefinedRolesSeeder>();
|
||||
services.AddSingleton<CompanyService>();
|
||||
|
||||
Reference in new issue
Block a user