Broarm\EventTickets\Model\TaxModifier
Class TaxModifier
Adds a configurable tax rate on the receipt
Synopsis
class TaxModifier
extends PriceModifier
{
- // members
- private static string $table_name = 'EventTickets_TaxModifier';
- private static integer $tax_rate = 21;
- private static boolean $inclusive = false;
- private static array $defaults = ;
- // methods
- public void updateTotal()
- public string getTableTitle()
- public float getTableValue()
- public static TaxModifier|DataObject|null findOrMake()
- // Inherited methods from PriceModifier
- public void getCMSFields()
- public void updateTotal()
- public string getTableTitle()
- public float getTableValue()
- public void setPriceModification()
Hierarchy
Members
private
- $defaults
—
array
Set the default sort value to a large int so it always shows and calculates as last - $inclusive
—
string
Set if the tax rate is inclusive or exclusive - $table_name
- $tax_rate
—
string
Set the tax rate as a percentage
Methods
public
- findOrMake() — Create a tax modifier if it does not already exists
- getTableTitle() — Show the used tax rate in the table title
- getTableValue() — Show the calculated tax value as a positive value
- updateTotal() — Update the total, if the tax is not inclusive the total gets altered
Inherited from Broarm\EventTickets\Model\PriceModifier
public
- getCMSFields()
- getTableTitle() — Return a title to display in the summary table
- getTableValue() — Return a value to display in the summary table
- setPriceModification() — Set the price modification on the join
- updateTotal() — Modify the given total Implement this on your modifier