org.geebis.books.model.ap
Class Bill

java.lang.Object
  extended by org.geebis.books.model.ap.Voucher
      extended by org.geebis.books.model.ap.Bill
All Implemented Interfaces:
java.io.Serializable

@Name(value="bill")
public class Bill
extends Voucher
implements java.io.Serializable

See Also:
Serialized Form

Constructor Summary
Bill()
           
 
Method Summary
 double calculateDiscountAmount(java.util.Date projectedPayDate)
          Gets the discount amount of the voucher if it's paid by the projected pay date
 java.util.Date calculateDiscountDate()
          Calculates and returns the date that a discount can be taken if the voucher is paid before
 TermsStatus calculateTermsStatus(java.util.Date projectedPayDate)
          Gets the terms status of the bill
 java.util.Date getDueDate()
          Gets the due date for this bill
 Terms getTerms()
          Gets the terms for this bill
 void setDueDate(java.util.Date dueDate)
          Sets the due date for this bill
 void setTerms(Terms terms)
          Sets the terms for this bill
 
Methods inherited from class org.geebis.books.model.ap.Voucher
getAmount, getDate, getDescription, getExpenseLines, getId, getItemLines, getNumber, getVendor, getVersion, setAmount, setDate, setDescription, setExpenseLines, setId, setItemLines, setNumber, setVendor, setVersion
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Bill

public Bill()
Method Detail

getTerms

public Terms getTerms()
Gets the terms for this bill

Returns:
the terms for this bill

setTerms

public void setTerms(Terms terms)
Sets the terms for this bill

Parameters:
terms - the new terms for this bill

getDueDate

public java.util.Date getDueDate()
Gets the due date for this bill

Returns:
the due date for this bill

setDueDate

public void setDueDate(java.util.Date dueDate)
Sets the due date for this bill

Parameters:
dueDate - the new due date for this bill

calculateTermsStatus

public TermsStatus calculateTermsStatus(java.util.Date projectedPayDate)
Gets the terms status of the bill

Parameters:
projectedPayDate - The projected pay date to use to calculate the terms status
Returns:
the terms status of the bill
See Also:
TermsStatus

calculateDiscountAmount

public double calculateDiscountAmount(java.util.Date projectedPayDate)
Gets the discount amount of the voucher if it's paid by the projected pay date

Parameters:
projectedPayDate - the projected date to use to calculate the discount amount
Returns:
the amount of discount that can be taken if the voucher is paid before the projected pay date

calculateDiscountDate

public java.util.Date calculateDiscountDate()
Calculates and returns the date that a discount can be taken if the voucher is paid before

Returns:
the date that the voucher must be paid by if the user wants to take a discount