public class Item extends java.lang.Object implements IZUGFeRDExportableItem
| Modifier and Type | Field and Description |
|---|---|
protected java.util.ArrayList<IZUGFeRDAllowanceCharge> |
Allowances |
protected java.util.ArrayList<IZUGFeRDAllowanceCharge> |
Charges |
protected java.util.Date |
detailedDeliveryPeriodFrom |
protected java.util.Date |
detailedDeliveryPeriodTo |
protected java.math.BigDecimal |
grossPrice |
protected java.lang.String |
id |
protected java.math.BigDecimal |
lineTotalAmount |
protected java.util.ArrayList<java.lang.String> |
notes |
protected java.math.BigDecimal |
price |
protected Product |
product |
protected java.math.BigDecimal |
quantity |
protected java.util.ArrayList<ReferencedDocument> |
referencedDocuments |
protected java.lang.String |
referencedLineID |
protected java.math.BigDecimal |
tax |
| Constructor and Description |
|---|
Item()
empty constructor
do not use, but might be used e.g. by jackson
|
Item(Product product,
java.math.BigDecimal price,
java.math.BigDecimal quantity)
default constructor
|
| Modifier and Type | Method and Description |
|---|---|
Item |
addAllowance(IZUGFeRDAllowanceCharge izac)
Adds a item level reduction the price (will be multiplied by quantity)
|
Item |
addCharge(IZUGFeRDAllowanceCharge izac)
Adds a item level addition to the price (will be multiplied by quantity)
|
Item |
addNote(java.lang.String text)
adds item level freetext fields (includednote)
|
Item |
addReferencedDocument(ReferencedDocument doc)
adds item level Referenced documents along with their typecodes and issuerassignedIDs
|
Item |
addReferencedLineID(java.lang.String s) |
java.lang.String |
getBuyerOrderReferencedDocumentLineID()
BT 132 (issue https://github.com/ZUGFeRD/mustangproject/issues/247)
|
java.util.Date |
getDetailedDeliveryPeriodFrom()
specifies the item level delivery period (there is also one on document level),
this will be included in a BillingSpecifiedPeriod element
|
java.util.Date |
getDetailedDeliveryPeriodTo()
specifies the item level delivery period (there is also one on document level),
this will be included in a BillingSpecifiedPeriod element
|
java.math.BigDecimal |
getGrossPrice() |
java.lang.String |
getId() |
IZUGFeRDAllowanceCharge[] |
getItemAllowances()
item level discounts
|
IZUGFeRDAllowanceCharge[] |
getItemCharges()
item level price additions
|
java.math.BigDecimal |
getLineTotalAmount() |
java.lang.String[] |
getNotes()
descriptive texts
|
java.math.BigDecimal |
getPrice()
The price of one item excl. taxes
|
Product |
getProduct() |
java.math.BigDecimal |
getQuantity()
how many get billed
|
IReferencedDocument[] |
getReferencedDocuments()
allows to specify multiple(!)
|
java.math.BigDecimal |
getTax() |
Item |
setDetailedDeliveryPeriod(java.util.Date from,
java.util.Date to)
specify a item level delivery period
(apart from the document level delivery period, and the document level
delivery day, which is probably anyway required)
|
Item |
setGrossPrice(java.math.BigDecimal grossPrice)
the list price without VAT (sic!)
|
Item |
setId(java.lang.String id) |
Item |
setLineTotalAmount(java.math.BigDecimal lineTotalAmount)
should only be set by calculator classes or maybe when reading from XML
|
Item |
setPrice(java.math.BigDecimal price) |
Item |
setProduct(Product product) |
Item |
setQuantity(java.math.BigDecimal quantity) |
Item |
setTax(java.math.BigDecimal tax) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAdditionalReferencedDocumentID, getBasisQuantity, getItemTotalAllowances, getValueprotected java.math.BigDecimal price
protected java.math.BigDecimal quantity
protected java.math.BigDecimal tax
protected java.math.BigDecimal grossPrice
protected java.math.BigDecimal lineTotalAmount
protected java.util.Date detailedDeliveryPeriodFrom
protected java.util.Date detailedDeliveryPeriodTo
protected java.lang.String id
protected java.lang.String referencedLineID
protected Product product
protected java.util.ArrayList<java.lang.String> notes
protected java.util.ArrayList<ReferencedDocument> referencedDocuments
protected java.util.ArrayList<IZUGFeRDAllowanceCharge> Allowances
protected java.util.ArrayList<IZUGFeRDAllowanceCharge> Charges
public Item(Product product, java.math.BigDecimal price, java.math.BigDecimal quantity)
product - contains the products name, tax rate, and unitprice - the base price of one item the productquantity - the number, dimensions or the weight of the delivered product or good in this contextpublic Item()
public Item addReferencedLineID(java.lang.String s)
public java.lang.String getBuyerOrderReferencedDocumentLineID()
getBuyerOrderReferencedDocumentLineID in interface IZUGFeRDExportableItempublic java.math.BigDecimal getLineTotalAmount()
public Item setLineTotalAmount(java.math.BigDecimal lineTotalAmount)
lineTotalAmount - price*quantity of this linepublic java.math.BigDecimal getGrossPrice()
public Item setGrossPrice(java.math.BigDecimal grossPrice)
grossPrice - the list price without VATpublic java.math.BigDecimal getTax()
public Item setTax(java.math.BigDecimal tax)
public Item setId(java.lang.String id)
public java.lang.String getId()
public java.math.BigDecimal getPrice()
IZUGFeRDExportableItemgetPrice in interface IZUGFeRDExportableItempublic Item setPrice(java.math.BigDecimal price)
public java.math.BigDecimal getQuantity()
IZUGFeRDExportableItemgetQuantity in interface IZUGFeRDExportableItempublic Item setQuantity(java.math.BigDecimal quantity)
public Product getProduct()
getProduct in interface IZUGFeRDExportableItempublic IZUGFeRDAllowanceCharge[] getItemAllowances()
IZUGFeRDExportableItemgetItemAllowances in interface IZUGFeRDExportableItempublic IZUGFeRDAllowanceCharge[] getItemCharges()
IZUGFeRDExportableItemgetItemCharges in interface IZUGFeRDExportableItempublic java.lang.String[] getNotes()
IZUGFeRDExportableItemgetNotes in interface IZUGFeRDExportableItempublic Item addCharge(IZUGFeRDAllowanceCharge izac)
izac - a relative or absolute chargeChargepublic Item addAllowance(IZUGFeRDAllowanceCharge izac)
izac - a relative or absolute allowanceAllowancepublic Item addNote(java.lang.String text)
text - UTF8 plain textpublic Item addReferencedDocument(ReferencedDocument doc)
doc - the ReferencedDocument to addpublic IReferencedDocument[] getReferencedDocuments()
IZUGFeRDExportableItemgetReferencedDocuments in interface IZUGFeRDExportableItempublic Item setDetailedDeliveryPeriod(java.util.Date from, java.util.Date to)
from - start dateto - end datepublic java.util.Date getDetailedDeliveryPeriodFrom()
getDetailedDeliveryPeriodFrom in interface IZUGFeRDExportableItempublic java.util.Date getDetailedDeliveryPeriodTo()
getDetailedDeliveryPeriodTo in interface IZUGFeRDExportableItemCopyright © 2023. All rights reserved.