Class LineItemData
java.lang.Object
org.nekosoft.PDFferTemplates.invoice.LineItemData
A VO for each line item in a PDF invoice.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the description.doubleCalculates the item total.intGets the quantity.Gets the tax name.doubleGets the tax rate.doubleCalculates the tax total.Gets the unit format.doubleGets the unit price.voidsetDescription(String description)Sets the description.voidsetQuantity(int quantity)Sets the quantity.voidsetTaxName(String taxName)Sets the tax name.voidsetTaxRate(double taxRate)Sets the tax rate.voidsetUnitFormat(String unitFormat)Sets the unit format.voidsetUnitPrice(double unitPrice)Sets the unit price.
-
Constructor Details
-
LineItemData
public LineItemData()
-
-
Method Details
-
getUnitFormat
Gets the unit format. SeesetUnitFormat(String).- Returns:
- the unit format
-
setUnitFormat
Sets the unit format. This will be used with theString.formatmethod to display the quantity in the invoice. It needs to include one format specifier for an integer value (%d), which will replaced with thequantity.- Parameters:
unitFormat- the unit format
-
getDescription
Gets the description.- Returns:
- the description
-
setDescription
Sets the description.- Parameters:
description- the description
-
getQuantity
public int getQuantity()Gets the quantity.- Returns:
- the quantity
-
setQuantity
public void setQuantity(int quantity)Sets the quantity. Also seesetUnitFormat(String).- Parameters:
quantity- the quantity
-
getUnitPrice
public double getUnitPrice()Gets the unit price.- Returns:
- the unit price
-
setUnitPrice
public void setUnitPrice(double unitPrice)Sets the unit price.- Parameters:
unitPrice- the unit price
-
getTaxName
Gets the tax name.- Returns:
- the tax name
-
setTaxName
Sets the tax name.- Parameters:
taxName- the tax name
-
getTaxRate
public double getTaxRate()Gets the tax rate.- Returns:
- the tax rate
-
setTaxRate
public void setTaxRate(double taxRate)Sets the tax rate.- Parameters:
taxRate- the tax rate
-
getItemTotal
public double getItemTotal()Calculates the item total.- Returns:
- the item total
-
getTaxTotal
public double getTaxTotal()Calculates the tax total.- Returns:
- the tax total
-