Development #7095
Updated by Kyle Chong 3 months ago
Refer to: * docs/planning/modules/M04_Tax_Calculation.md * docs/planning/modules/M03_POS_Terminal_Cart.md Integrate M04 into the Tax Calculation (M04) (docs/planning/modules/M04_Tax_Calculation.md). Extend existing M03 sales transaction lifecycle. Scope: * Calculate tax when service from one profile per product is added to cart. * Recalculate when quantity changes. * Recalculate when applicable price changes. * Recalculate after applicable M05 discount adjustments once M05 is integrated. * Update cart-line taxable amount. * Update cart-line multiple ordered components. Support inclusive/exclusive tax amount. * Update transaction-level tax totals. * Include tax in final payable amount according to inclusive/exclusive configuration. * Ensure Payment uses the final calculated transaction amount. Target calculation pipeline: Product/Price → Discount (M05 where applicable) → Tax (M04) → Final Line Amount → Cart Total → Payment Exact ordering should follow the documented country/business rules where a jurisdiction requires different treatment. and tax-on-tax compounding, then create TransactionLineTax snapshots. Done when: Tax is automatically calculated/recalculated throughout the M03 Cart when receipt totals and the correct final amount is passed to Payment. individual components match test scenarios.