Skip to content

feat: Enhance VAT Rate Value Object with Symbol Property and Grouping Support#19

Merged
inflop merged 1 commit into
masterfrom
feat/vat-rate-symbol-grouping
May 6, 2026
Merged

feat: Enhance VAT Rate Value Object with Symbol Property and Grouping Support#19
inflop merged 1 commit into
masterfrom
feat/vat-rate-symbol-grouping

Conversation

@inflop
Copy link
Copy Markdown
Owner

@inflop inflop commented May 6, 2026

The VatRate class currently lacks a symbol property to distinguish between different rate categories with the same percentage value. This limitation prevents the system from properly grouping and handling semantically different VAT calculations that may share identical percentages (e.g., standard rates, zero-rated supplies, exemptions, reverse-charge scenarios).

Objectives:

  1. Add a Symbol property to the VatRate value object to enable categorical distinction beyond percentage-based identification
  2. Implement value-object equality semantics so that two VatRate instances are considered equal only when both their Percentage and Symbol match
  3. Update all VAT rate summaries and grouping logic across all three calculation methods (FromSumOfNetValues, FromSumOfGrossValues, SumOfLineItemVatAmounts) to group by the complete VatRate identity (percentage + symbol)
  4. Ensure proper display and serialization of VAT rate symbols in reporting outputs
  5. Update existing test coverage to verify correct behavior across all calculation methods and edge cases (mixed rates, symbol variations, foreign currency scenarios)
  6. Maintain backward compatibility where feasible for existing code using percentage-only initialization

Impact Areas:

  • VatRate value object definition and factory methods
  • VatRateSummary and VatRateSummaryFcy grouping logic
  • All three calculation strategy implementations
  • Foreign currency support and base-currency conversions
  • Fluent mapping engine and line-item calculations
  • Unit test suite for all affected components

Implement VAT rate symbol grouping to distinguish between
zero-rate categories ("0%", "ZW", "NP") in calculations.
Enhance VatRate class with a Symbol property for value-object
equality and update tests to verify correct behavior across
different calculation methods.
Copilot AI review requested due to automatic review settings May 6, 2026 18:07
@inflop inflop merged commit 4403618 into master May 6, 2026
5 checks passed
@inflop inflop deleted the feat/vat-rate-symbol-grouping branch May 6, 2026 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant