Constructors
InvoiceEntry()
Methods
getDiscount()
Gets the discount of the current InvoiceEntry object in percent.The save-function calculates the discount in percent and money. So if the discount is set in money (setDiscountMoney(Float)), you have to save the entry before getting the corresponding value in percent.
getDiscountMoney()
Gets the discount of the current InvoiceEntry object in money.The save-function calculates the discount in percent and money. So if the discount is set in percent (setDiscount()), you have to save the entry before getting the corresponding value in money with this function.
getPricePrUnit()
Returns the price per unit of the current InvoiceEntry object.getValue(String)
Gets the value of the specified field.Available fields:
- messageId the id which this invoice entry is connected to
- description the descriptive text of this invoice entry
- type ID of the type for this invoice entry
- quantity the number of units invoiced
- pricePrUnit price per unit (precision 2)
- discount discount in percentage for this invoice entry (precision 2)
- discountMoney discount in money (precision 2)
- date the date for this invoice entry
load(Integer)
Loads an existing InvoiceEntry object.save()
Saves the existing InvoiceEntry object and returns the ID.setDiscount(Float)
Sets the discount of the current InvoiceEntry object with the given percent.If discount is set in both percent and money, the save-function use the money-version.
setDiscountMoney(Float)
Sets the discount of the current InvoiceEntry object with the given money.If both setDiscount() and this function has been used, the save-function uses the discount in money.
setPricePrUnit(Float)
Sets the price per unit for the current InvoiceEntry object with the given price.setValue(String,String)
Sets a field of the current InvoiceEntry object with the given value.Available fields:
- messageId the ID of the message which this invoice entry is connected to
- description a description of the invoice entry
- type the ID of the type which this invoice entry will be saved as
- quantity number of invoiced unites (this can be a float value)
- pricePrUnit price pr. unit (this can be a float value of precision 2)
- discount discount given in percentage (float value of precision 2). If discountMoney is also specified, this field will be ignored
- discountMoney discount in money
- date the date of the invoice entry