Skip to content

feat: add amounts calculations and EAS inferrence#5

Merged
SimonLoir merged 3 commits intomainfrom
feat/amounts-api
Mar 10, 2026
Merged

feat: add amounts calculations and EAS inferrence#5
SimonLoir merged 3 commits intomainfrom
feat/amounts-api

Conversation

@SimonLoir
Copy link
Copy Markdown
Member

No description provided.

…EN16931 compliance

- Introduced `computeTotals` in the toolkit to compute base amounts, tax amounts, and totals for invoices following EN16931 rules.
- Added detailed unit tests to validate calculations for various scenarios, including rounding behavior, group tax computation, and handling empty or mixed data types for prices.
- Introduced `getEASFromTaxId` function to map tax IDs to corresponding EAS codes based on country.
- Added `CountryVATScheme` with predefined EAS codes for various countries.
- Exported `getEASFromTaxId` through the toolkit.
- Implemented comprehensive tests for different tax ID formats and edge cases.
@SimonLoir SimonLoir merged commit 8e3d4a5 into main Mar 10, 2026
1 of 2 checks passed
@SimonLoir SimonLoir deleted the feat/amounts-api branch March 10, 2026 23:24
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