TaxAmountCalculator.php
Table of Contents
Classes
- TaxAmountCalculator
- The only arithmetic of the VAT engine — pure bcmath: - {@see splitGross()}: a final price → base `money(gross ÷ (1 + rate/100))` + VAT = difference, the gross amount itself never changes; - {@see allocate()}: an ancillary amount (gateway fee, shipping) split proportionally to group bases, each part rounded to 3 places, the rounding remainder goes to the largest group.