\XeroTaxModification
Apply tax rates according to Xero tax types for each Item and Modification in the Order. Uses DI to inject a tax calculator that can be replaced based on the rules for applying tax rates.
Can change the dependencies in yml config file e.g:
---
name: mysite_swipestripe_xero
---
XeroTaxModification:
dependencies:
taxCalculator: %$XeroTaxCalculator_NZ
Synopsis
class XeroTaxModification
extends Modification
{
- // members
- private static array $defaults = ;
- public $taxCalculator;
- private static array $dependencies = ;
- // methods
- public void add()
- public FieldList getFormFields()
Hierarchy
Extends
- Modification
Members
private
- $defaults
- $dependencies
public
- $taxCalculator
Methods
public
- add() — Add a XeroTaxModification to the order by applying tax rates to Items and Modifications in the order using the taxCalculator.
- getFormFields() — Get the form fields for the OrderForm.