Calculates the appropriate tax rate to apply to a sale. Store pricing configuration holds a list of implementations (the built-in DefaultTaxCalcProvider or a store specific one), and PriceManager and PricingRulesService use the configured provider to work out how much tax to add to a product's price during checkout and pricing display.
Properties
| Property | Returns | Description |
|---|---|---|
| detailedDescription | String | A formatted, human readable description of the details configured for this provider, such as its rates. |
| id | String | The identifier for this provider, used in forms where the admin selects it. Never null once configured. |
| managementPageTemplate | String | The name of the admin template used to render this provider's configuration and management page. |
| title | String | The user friendly title for this tax calc provider. |
Methods
getId()
Returns: String
The identifier for this provider, used in forms where the admin selects it. Never null once configured.
getTitle()
Returns: String
The user friendly title for this tax calc provider.
getDetailedDescription()
Returns: String
A formatted, human readable description of the details configured for this provider, such as its rates.
calcTaxRate(BigDecimal adjustedPriceExTax, ProductInEComStore productInStoreList, ProductInLocation pil, ISale sale)
Returns: BigDecimal
Calculates the tax rate to apply to a sale of the given product, based on the price excluding tax, the product's store and location listings, and the sale itself.
| Parameter | Description |
|---|---|
adjustedPriceExTax | the price of the item excluding tax, after any pricing rule adjustments |
productInStoreList | the product's listing in the e-commerce store |
pil | the product's listing in the inventory location it is shipping from |
sale | the sale the tax rate is being calculated for |
getManagementPageTemplate()
Returns: String
The name of the admin template used to render this provider's configuration and management page.