Calculation
Magento\Tax\Model\Calculation
What it does
This class handles all tax calculation operations in Magento 2, including determining applicable tax rates based on customer location, product tax class, and customer tax class.
Developers use it to calculate tax amounts for prices, retrieve tax rates for specific scenarios, and determine whether taxes should be applied before or after discounts.
It serves as the core engine for computing taxes throughout the checkout and order processing flow.
Public Methods
- getDefaultCustomerTaxClass()
- deleteByRuleId()
- getRates()
- getCustomerTaxClasses()
- getProductTaxClasses()
- getRate()
- getStoreRate()
- getDefaultRateRequest()
- getRateRequest()
- getAppliedRates()
- reproduceProcess()
- calcTaxAmount()
- round()
- getTaxRates()
- _resetState()