SilverShop\Model\Modifiers\Tax\FlatTax
Handles calculation of sales tax on Orders.
Synopsis
class FlatTax
extends Base
{
- // members
- private static string $name = 'GST';
- private static float $rate = 0.15;
- private static bool $exclusive = true;
- private static string $includedmessage = '%.1f%% %s (inclusive)';
- private static string $excludedmessage = '%.1f%% %s';
- // methods
- public void __construct()
- public void value()
- // Inherited methods from Base
- public void getTableTitle()
- // Inherited methods from OrderModifier
- public void required()
- public $subtotal modify()
- public void value()
- public void valid()
- public void Amount()
- public void TableValue()
- public boolean Total()
- public boolean IsChargable()
- public boolean canRemove()
- // Inherited methods from OrderAttribute
- public void canCreate()
- public void canDelete()
- public void isLive()
- public string getTableTitle()
- public void getCartTitle()
- public void ShowInTable()
Hierarchy
Members
private
- $excludedmessage — string
- $exclusive — SilverShop\Model\Modifiers\Tax\bool
- $includedmessage — string
- $name — string
- $rate — float
Methods
public
- __construct()
- value() — Get the tax amount to charge on the order.
Inherited from SilverShop\Model\Modifiers\Tax\Base
public
Inherited from SilverShop\Model\Modifiers\OrderModifier
public
- Amount() — This function is always called to determine the amount this modifier needs to charge or deduct.
- IsChargable() — Checks if this modifier has type = Chargable
- TableValue() — Monetary to use in templates.
- Total() — Provides a modifier total that is positive or negative, depending on whether the modifier is chargable or not.
- canRemove() — Checks if the modifier can be removed.
- modify() — Modifies the incoming value by adding, subtracting or ignoring the value this modifier calculates.
- required() — Specifies whether this modifier is always required in an order.
- valid() — Check if the modifier should be in the cart.
- value() — Calculates value to store, based on incoming running total.
Inherited from SilverShop\Model\OrderAttribute
public
- ShowInTable()
- canCreate()
- canDelete()
- getCartTitle()
- getTableTitle() — Produces a title for use in templates.
- isLive()