orderprocessing
Class BillingTerms

java.lang.Object
  extended byorderprocessing.BillingTerms
All Implemented Interfaces:
java.io.Serializable

public class BillingTerms
extends java.lang.Object
implements java.io.Serializable

This class represents various billing terms in use by the firm it exports constant terms objects for all allowable terms.

See Also:
Serialized Form

Method Summary
 java.lang.String code()
          Retrieve a string representation of these terms
 int days()
          Retrieve the number of days in these terms, usually 10 or 30
 void display()
          Display this billing terms info on standard output
 CalculationCalendar dueDate(CalculationCalendar invoiceDate)
          return the due date for payment on the associated order given the invoice date.
 boolean equals(java.lang.Object other)
           
static BillingTerms get(java.lang.String code)
          Retrieve a terms object from its string representation "net 30", "net 10" and "eom 10" are recognized.
 int hashCode()
           
 int terms()
          retrieve the terms code for these billing terms NET = 0 EOM = 1
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

terms

public int terms()
retrieve the terms code for these billing terms NET = 0 EOM = 1

Returns:
the terms code

days

public int days()
Retrieve the number of days in these terms, usually 10 or 30

Returns:
the number of days

code

public java.lang.String code()
Retrieve a string representation of these terms

Returns:
the terms as a string

get

public static BillingTerms get(java.lang.String code)
Retrieve a terms object from its string representation "net 30", "net 10" and "eom 10" are recognized. NOT case sensitive. An illegal entry will result in "net 30" by default

Parameters:
code - the string representation of a billing terms
Returns:
the terms object

dueDate

public CalculationCalendar dueDate(CalculationCalendar invoiceDate)
return the due date for payment on the associated order given the invoice date.

Parameters:
invoiceDate - the date that the order was invoiced.
Returns:
the due date for payment according to these terms.

toString

public java.lang.String toString()

equals

public boolean equals(java.lang.Object other)

hashCode

public int hashCode()

display

public void display()
Display this billing terms info on standard output