ZMObject
└─ZMOrderTotalLineDetails
public class ZMOrderTotalLineDetails
extends ZMObject
| Fields inherited from org.zenmagick.core\ZMObject | |
|---|---|
| properties_ | |
| Method Summary | |
|---|---|
| void | Create new instance. |
| float | Get the amount. |
| float | Get the display value. |
| int | Get the tax class id. |
| string | getTitle() Get the title. |
| void | setAmount(float amount) Set the amount. |
| void | setDisplayValue(float value) Set the display value. |
| void | setTaxClassId(int taxClassId) Set the tax class id. |
| void | setTitle(string title) Set the title. |
| Methods inherited from org.zenmagick.core\ZMObject | |
|---|---|
| __construct, attachMethod, get, getAttachedMethods, getProperties, getPropertyNames, set, singleton | |
public void __construct()
Create new instance.
public float getAmount()
Get the amount.
The amount to be used for subtotal/total calculation. This may be different from value.
public float getDisplayValue()
Get the display value.
The money/value to be displayed. This will be different from the amount in the case of order totals that
are purely for display. Examples are subtotal and total. In those cases the amount will be ,
while the value will the some calculated money amount.
public int getTaxClassId()
Get the tax class id.
public string getTitle()
Get the title.
public void setAmount(float amount)
Set the amount.
public void setDisplayValue(float value)
Set the display value.
public void setTaxClassId(int taxClassId)
Set the tax class id.
public void setTitle(string title)
Set the title.
The title is the text to disapppear in the order total display.
Order total line details as returned by a pluing implementing the
ZMOrderTotalinterface.The title and amount are the minimum requirements for an order total. Other available properties are optional.
Order totals are not supposed to calculate tax on their own. Instead, each calculated detail includes a corresponding tax class id. That way tax can be calculated later on the subtotals for each tax class to avoid rounding errors. The tax, subtotal and total order totals are responsible for handling all of that.
The default value for the tax class id is 0 for no tax.