Class SumItem

Container used to represent an subtotal or grandtotal item which contains various prices and a tax breakdown held in a collection of tax-items.

Usage example:

1var invoice : Invoice = ...;
2var productNet = invoice.productSubTotal.netPrice;
3var serviceNet = invoice.serviceSubTotal.netPrice;
4var grandNet   = invoice.grandTotal.netPrice;
5var grandTax   = invoice.grandTotal.tax;
6var grandGross = invoice.grandTotal.grossPrice;
7
8# tax breakdown
9for each(taxItem : TaxItem in invoice.grandTotal.taxItems) {
10  var tax : Money         = taxItem.amount;
11  var taxGroup : TaxGroup = taxItem.taxGroup;
12  var rate : Double       = taxGroup.rate;
13  var caption :String     = taxGroup.caption;
14  var taxType :String     = taxGroup.taxType;
15}

Property Summary 

PropertyDescription
grossPrice: Money (read-only)Gross price of SumItem.
netPrice: Money (read-only)Net price of SumItem.
tax: Money (read-only)Total tax for SumItem.
taxBasis: Money (read-only)Price of entire SumItem on which tax calculation is based.
taxItems: Collection (read-only)Tax items representing a tax breakdown for the SumItem.

Constructor Summary 

This class does not have a constructor, so you cannot create it directly.

Method Summary 

MethodDescription
getGrossPrice()Gross price of SumItem.
getNetPrice()Net price of SumItem.
getTax()Total tax for SumItem.
getTaxBasis()Price of entire SumItem on which tax calculation is based.
getTaxItems()Tax items representing a tax breakdown for the SumItem.

Methods inherited from class Object 

assign, create, create, defineProperties, defineProperty, entries, freeze, fromEntries, getOwnPropertyDescriptor, getOwnPropertyNames, getOwnPropertySymbols, getPrototypeOf, hasOwnProperty, is, isExtensible, isFrozen, isPrototypeOf, isSealed, keys, preventExtensions, propertyIsEnumerable, seal, setPrototypeOf, toLocaleString, toString, valueOf, values

Property Details 

grossPrice 

grossPrice: Money (read-only)

Gross price of SumItem.


netPrice 

netPrice: Money (read-only)

Net price of SumItem.


tax 

tax: Money (read-only)

Total tax for SumItem.


taxBasis 

taxBasis: Money (read-only)

Price of entire SumItem on which tax calculation is based. Same as getNetPrice() or getGrossPrice() depending on whether the order is based on net or gross prices.


taxItems 

taxItems: Collection (read-only)

Tax items representing a tax breakdown for the SumItem.

See Also:


Method Details 

getGrossPrice() 

getGrossPrice(): Money

Gross price of SumItem.

Returns:

  • Gross price of SumItem.

getNetPrice() 

getNetPrice(): Money

Net price of SumItem.

Returns:

  • Net price of SumItem.

getTax() 

getTax(): Money

Total tax for SumItem.

Returns:

  • Total tax for SumItem.

getTaxBasis() 

getTaxBasis(): Money

Price of entire SumItem on which tax calculation is based. Same as getNetPrice() or getGrossPrice() depending on whether the order is based on net or gross prices.

Returns:

  • Price of entire item on which tax calculation is based

getTaxItems() 

getTaxItems(): Collection

Tax items representing a tax breakdown for the SumItem.

Returns:

  • tax items representing a tax breakdown for the SumItem

See Also: