feat: fixed assets, Intrastat, intent declarations, year-end closing and statements (#82 #83 #84 #85 #86 #87)
CI / Build and test (SQLite) (pull_request) Successful in 4m35s
CI / PostgreSQL 16 integration (pull_request) Skipped
CI / PostgreSQL 17 integration (pull_request) Skipped
CI / YAML check (pull_request) Successful in 5s
CI / Docker image (pull_request) Successful in 1m24s
CI / Build and test (SQLite) (pull_request) Successful in 4m35s
CI / PostgreSQL 16 integration (pull_request) Skipped
CI / PostgreSQL 17 integration (pull_request) Skipped
CI / YAML check (pull_request) Successful in 5s
CI / Docker image (pull_request) Successful in 1m24s
M10 gives the ledger its year end. Fixed assets get categories with the ministerial coefficients, a civil and a fiscal plan, depreciation posted per category and undoable, disposals with gain or loss and the register print (ADR 0041). Intrastat lists are generated from confirmed invoices with the due periodicity and the SCAMBI.CEE file; declarations of intent get their own register and the N3.5 ceiling is checked when an invoice is confirmed (ADR 0042). Accruals, deferrals and exchange differences feed a nine-step guided closing that can repeat or undo its last step until the final prints, reopens the next year and locks the closed one; the CEE statements (ordinary, abbreviated, micro), the reclassified statements, the ratios and the accountant export read the year's balances (ADR 0043). The demo seed now opens the year with assets, stock, bank and capital, so the integration test closes the demo year from the checks to the lock on SQLite and PostgreSQL. Docs: wiki pages with screenshots, ADR 0041-0043, MODULES, STATUS, DATA-MODEL and the 0.10.0 changelog. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
836a316b05
commit
51007d68ca
84 files changed
+11701
-298
No files matched your search
@@ -0,0 +1,141 @@
|
||||
using Khaemhat.Core.Accounting;
|
||||
using Khaemhat.Core.Parties;
|
||||
using Khaemhat.Data.Mapping;
|
||||
|
||||
namespace Khaemhat.Data.CompanyDatabase;
|
||||
|
||||
/// <summary>Map of <see cref="FixedAssetCategory"/> to <c>fixed_asset_categories</c>.</summary>
|
||||
public sealed class FixedAssetCategoryMap : EntityMap<FixedAssetCategory>
|
||||
{
|
||||
/// <summary>Creates the map.</summary>
|
||||
public FixedAssetCategoryMap()
|
||||
{
|
||||
ToTable("fixed_asset_categories");
|
||||
Map(x => x.Code).MaxLength(20);
|
||||
Map(x => x.Description).MaxLength(100);
|
||||
Map(x => x.MinisterialGroup).MaxLength(20);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Map of <see cref="FixedAsset"/> to <c>fixed_assets</c>.</summary>
|
||||
public sealed class FixedAssetMap : EntityMap<FixedAsset>
|
||||
{
|
||||
/// <summary>Creates the map.</summary>
|
||||
public FixedAssetMap()
|
||||
{
|
||||
ToTable("fixed_assets");
|
||||
Map(x => x.Code).MaxLength(20);
|
||||
Map(x => x.Description).MaxLength(200);
|
||||
Map(x => x.DocumentReference).MaxLength(60);
|
||||
Map(x => x.Location).MaxLength(100);
|
||||
Map(x => x.SerialNumber).MaxLength(60);
|
||||
Map(x => x.Notes).MaxLength(500);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Map of <see cref="FixedAssetMovement"/> to <c>fixed_asset_movements</c>.</summary>
|
||||
public sealed class FixedAssetMovementMap : EntityMap<FixedAssetMovement>
|
||||
{
|
||||
/// <summary>Creates the map.</summary>
|
||||
public FixedAssetMovementMap()
|
||||
{
|
||||
ToTable("fixed_asset_movements");
|
||||
Map(x => x.Description).MaxLength(200);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Map of <see cref="AccrualDeferral"/> to <c>accruals</c>.</summary>
|
||||
public sealed class AccrualDeferralMap : EntityMap<AccrualDeferral>
|
||||
{
|
||||
/// <summary>Creates the map.</summary>
|
||||
public AccrualDeferralMap()
|
||||
{
|
||||
ToTable("accruals");
|
||||
Map(x => x.Description).MaxLength(200);
|
||||
Map(x => x.DocumentNumber).MaxLength(40);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Map of <see cref="ClosingRun"/> to <c>closing_runs</c>.</summary>
|
||||
public sealed class ClosingRunMap : EntityMap<ClosingRun>
|
||||
{
|
||||
/// <summary>Creates the map.</summary>
|
||||
public ClosingRunMap()
|
||||
{
|
||||
ToTable("closing_runs");
|
||||
Map(x => x.YearCode).MaxLength(10);
|
||||
Map(x => x.LockedBy).MaxLength(100);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Map of <see cref="ClosingStep"/> to <c>closing_steps</c>.</summary>
|
||||
public sealed class ClosingStepMap : EntityMap<ClosingStep>
|
||||
{
|
||||
/// <summary>Creates the map.</summary>
|
||||
public ClosingStepMap()
|
||||
{
|
||||
ToTable("closing_steps");
|
||||
Map(x => x.ExecutedBy).MaxLength(100);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Map of <see cref="ClosingPrint"/> to <c>closing_prints</c>.</summary>
|
||||
public sealed class ClosingPrintMap : EntityMap<ClosingPrint>
|
||||
{
|
||||
/// <summary>Creates the map.</summary>
|
||||
public ClosingPrintMap()
|
||||
{
|
||||
ToTable("closing_prints");
|
||||
Map(x => x.Kind).MaxLength(20);
|
||||
Map(x => x.FileName).MaxLength(100);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Map of <see cref="IntrastatList"/> to <c>intrastat_lists</c>.</summary>
|
||||
public sealed class IntrastatListMap : EntityMap<IntrastatList>
|
||||
{
|
||||
/// <summary>Creates the map.</summary>
|
||||
public IntrastatListMap()
|
||||
{
|
||||
ToTable("intrastat_lists");
|
||||
Map(x => x.FileName).MaxLength(60);
|
||||
Map(x => x.Protocol).MaxLength(40);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Map of <see cref="IntrastatListLine"/> to <c>intrastat_list_lines</c>.</summary>
|
||||
public sealed class IntrastatListLineMap : EntityMap<IntrastatListLine>
|
||||
{
|
||||
/// <summary>Creates the map.</summary>
|
||||
public IntrastatListLineMap()
|
||||
{
|
||||
ToTable("intrastat_list_lines");
|
||||
Map(x => x.DocumentNumber).MaxLength(40);
|
||||
Map(x => x.CountryCode).MaxLength(2);
|
||||
Map(x => x.VatNumber).MaxLength(20);
|
||||
Map(x => x.NomenclatureCode).MaxLength(10);
|
||||
Map(x => x.Description).MaxLength(200);
|
||||
Map(x => x.TransactionNature).MaxLength(2);
|
||||
Map(x => x.DeliveryTerms).MaxLength(3);
|
||||
Map(x => x.TransportMode).MaxLength(1);
|
||||
Map(x => x.OriginCountry).MaxLength(2);
|
||||
Map(x => x.Province).MaxLength(2);
|
||||
Map(x => x.SupplyMode).MaxLength(1);
|
||||
Map(x => x.PaymentMode).MaxLength(1);
|
||||
Map(x => x.PaymentCountry).MaxLength(2);
|
||||
Map(x => x.CorrectionSign).MaxLength(1);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Map of <see cref="IntentDeclaration"/> to <c>intent_declarations</c>.</summary>
|
||||
public sealed class IntentDeclarationMap : EntityMap<IntentDeclaration>
|
||||
{
|
||||
/// <summary>Creates the map.</summary>
|
||||
public IntentDeclarationMap()
|
||||
{
|
||||
ToTable("intent_declarations");
|
||||
Map(x => x.Number).MaxLength(40);
|
||||
Map(x => x.Protocol).MaxLength(40);
|
||||
Map(x => x.Notes).MaxLength(500);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user