Class LineItemData
java.lang.Object
org.nekosoft.PDFferTemplates.invoice.LineItemData
A VO for each line item in a PDF invoice.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGets the description.double
Calculates the item total.int
Gets the quantity.Gets the tax name.double
Gets the tax rate.double
Calculates the tax total.Gets the unit format.double
Gets the unit price.void
setDescription(String description)
Sets the description.void
setQuantity(int quantity)
Sets the quantity.void
setTaxName(String taxName)
Sets the tax name.void
setTaxRate(double taxRate)
Sets the tax rate.void
setUnitFormat(String unitFormat)
Sets the unit format.void
setUnitPrice(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.format
method 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
-