feat: implement subscription tax calculation and remittance system#450
Merged
Smartdevs17 merged 2 commits intoMay 28, 2026
Merged
Conversation
- Tax rate lookup by jurisdiction (country, state, city) with hierarchical fallback - Tax-exempt customer handling with certificate validation and expiry checks - Mid-cycle tax rate change proration for existing subscriptions - Reverse-charge flagging and nexus threshold determination - Multi-jurisdiction: VAT, GST, sales tax, HST, PST, QST, digital services tax - Digital goods tax classification with country-specific rules - Tax remittance report generation with jurisdiction aggregation Contracts (Rust/Soroban): - types: Add TaxType, TaxJurisdiction, TaxRateEntry, CustomerTaxStatus, DigitalGoodsClass, TaxRemittanceLineItem types and 5 StorageKey variants - invoice: 11 new contract functions for full tax lifecycle + 10 test cases - subscription: Update generate_invoice signature with jurisdiction params - proxy: Fix StorageKey variant names for Soroban 32-char limit Backend (TypeScript): - TaxService with 17 built-in jurisdiction rates, caching, exemption validation - Nexus checks, mid-cycle proration, digital goods tax rules - Remittance report generation with filtering and grouping - 25 test cases covering all tax scenarios Frontend (React Native): - Extended Invoice types with TaxJurisdiction, CustomerTaxStatus, etc. - invoiceStore: Tax state management with 12 new actions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #371
feat: implement subscription tax calculation and remittance system
Contracts (Rust/Soroban):
DigitalGoodsClass, TaxRemittanceLineItem types and 5 StorageKey variants
Backend (TypeScript):
Frontend (React Native):