\XeroTaxCalculator
Calculate tax for an Order and apply tax rates to Items and Modifications based on Xero tax types. Logic for applying tax rates will likely change depending on application.
Injected into XeroTaxModification, can change with config e.g:
---
name: swipestripe_xero_tax
---
XeroTaxModification:
dependencies:
taxCalculator: %$XeroTaxCalculator_NZ
Synopsis
class XeroTaxCalculator
{
- // methods
- public abstract void applyItemTaxRate()
- public abstract void applyModificationTaxRate()
- public Price calculate()
Methods
public
- applyItemTaxRate() — Apply a tax rate to the Item
- applyModificationTaxRate() — Apply a tax rate to the Order Modification
- calculate() — Calculate the tax component based on tax rates for the items and modifications in the order