|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.geebis.books.model.terms.Terms
@Name(value="terms") public abstract class Terms
The Terms class represents terms of payment on an invoice.
Terms can have discounts which means that if the invoice is paid before the discount date specified by calculateDiscountDate()
| Constructor Summary | |
|---|---|
protected |
Terms()
|
protected |
Terms(java.lang.String name)
|
protected |
Terms(java.lang.String name,
java.lang.Double discountPercent)
|
| Method Summary | |
|---|---|
java.lang.Double |
calculateDiscountAmount(java.util.Date issuedDate,
java.util.Date testDate,
java.lang.Double amount)
Returns the discount amount for the values passed in with this terms |
abstract java.util.Date |
calculateDiscountDate(java.util.Date issuedDate)
Gets the cut off date that a discount can be taken at with this terms |
abstract java.util.Date |
calculateDueDate(java.util.Date issuedDate)
Gets the due date of an invoice with the passed in date |
TermsStatus |
calculateStatus(java.util.Date issuedDate,
java.util.Date testDate)
Returns the TermsStatus for this terms with the passed in issued date and test date |
java.lang.Double |
getDiscountPercent()
Gets the discount percent of the terms |
java.lang.Long |
getId()
|
java.lang.String |
getName()
Gets the name of this terms. |
java.lang.Integer |
getVersion()
|
void |
setDiscountPercent(java.lang.Double discountPercent)
Sets the discount percent of the terms |
void |
setId(java.lang.Long id)
|
void |
setName(java.lang.String name)
Sets the name of the terms |
void |
setVersion(java.lang.Integer version)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected Terms()
protected Terms(java.lang.String name)
protected Terms(java.lang.String name,
java.lang.Double discountPercent)
| Method Detail |
|---|
public java.lang.String getName()
public void setName(java.lang.String name)
name - the new name of the termspublic java.lang.Double getDiscountPercent()
public void setDiscountPercent(java.lang.Double discountPercent)
discountPercent - the new discount percent for this termspublic java.lang.Integer getVersion()
public void setVersion(java.lang.Integer version)
public java.lang.Long getId()
public void setId(java.lang.Long id)
public abstract java.util.Date calculateDueDate(java.util.Date issuedDate)
issuedDate - the date the invoice was issued
public abstract java.util.Date calculateDiscountDate(java.util.Date issuedDate)
issuedDate - the date the invoice was issued
public java.lang.Double calculateDiscountAmount(java.util.Date issuedDate,
java.util.Date testDate,
java.lang.Double amount)
issuedDate - the date the invoice was issuedtestDate - the date to testamount - the amount of the invoice
public TermsStatus calculateStatus(java.util.Date issuedDate,
java.util.Date testDate)
TermsStatus for this terms with the passed in issued date and test date
issuedDate - the date the invoice was issuedtestDate - the date to test
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||