Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.globalretailtech.pos.ej
Class EjTax  view EjTax download EjTax.java

java.lang.Object
  extended bycom.globalretailtech.pos.events.PosEvent
      extended bycom.globalretailtech.pos.events.PosDialogEvent
          extended bycom.globalretailtech.pos.events.PosNumberDialog
              extended bycom.globalretailtech.pos.ej.EjLine
                  extended bycom.globalretailtech.pos.ej.EjTax
All Implemented Interfaces:
java.lang.Comparable

public class EjTax
extends EjLine


Field Summary
static int ALTERNATE_TAX
           
private static java.lang.String eventname
           
private  EjItem item
           
static int PRIMARY_TAX
           
private  int taxamount
           
private  com.globalretailtech.data.Tax taxRecord
           
private  com.globalretailtech.data.TransTax transTax
           
private  boolean useAltTax
          Toggle between tax rates.
 
Fields inherited from class com.globalretailtech.pos.ej.EjLine
ACCOUNT, ALT_CURRENCY_TENDER, AMOUNT, BANK, CC_TENDER, CHECK_TENDER, COUPON, DEBIT_TENDER, GIFT_CERT_TENDER, ITEM, ITEM_LINK, NUMBER, numbertype, PROMOTION, SPLIT, TAX, TENDER, TOTAL, TRANS_HEADER
 
Fields inherited from class com.globalretailtech.pos.events.PosNumberDialog
CLEAR, CURRENCY, DECIMAL, MASK
 
Fields inherited from class com.globalretailtech.pos.events.PosDialogEvent
 
Fields inherited from class com.globalretailtech.pos.events.PosEvent
CUST_HIST, CUST_MAIN, FUNCTION, HOME, ITEM_MODIFIER, NAVIGATE, NEXT, PREV
 
Constructor Summary
EjTax()
          Simple constructor, set type.
EjTax(com.globalretailtech.data.Tax t, EjItem i)
          Constructor, set type and item.
EjTax(com.globalretailtech.data.TransTax t)
          Constructor, set type and transaction tax record.
 
Method Summary
 double amount()
          Amount for this line, tax amount
 void applyTax()
          Set the taxable amount and multiply the tax rate times the taxable amount.
 double change()
          Chage for this transaction.
 void clear()
          Clear key implementation for this class
 java.lang.String cust()
          Display customer.
 com.globalretailtech.data.DBRecord dataRecord()
          The data record
 java.lang.String desc()
          Display description.
 void engage(int value)
          Create a tax record and add it to the EJ.
static java.lang.String eventName()
          Return staic name.
 double extAmount()
          Extended amount for this line = amount ()
 int lineNo()
          The line nubmer
 java.lang.String prompt()
          Display prompt.
 int quantity()
          Quantitiy for this line.
 double rate()
          The tax rate.
 boolean save()
          Save the transaction record
 void setActiveTaxRate(int rate)
          Switch to specific tax rate.
 double taxAmount()
          Tax amount for this line, always 0, can't tax tax.
(package private)  com.globalretailtech.data.TransTax taxRecord()
           
 void toggleAltTax()
          Toggle between tax rates.
 java.lang.String toString()
          Return staic name.
 void updateTotals()
          No total updates for this record.
 boolean validTransition(java.lang.String event)
          Validate transistions state.
 
Methods inherited from class com.globalretailtech.pos.ej.EjLine
compareTo, lineType, numberType, promptText, setLineType, type
 
Methods inherited from class com.globalretailtech.pos.events.PosDialogEvent
isDialog, nextDialogEvent, popState, pushState, pushUserEvent, state, states
 
Methods inherited from class com.globalretailtech.pos.events.PosEvent
blocked, checkProfile, context, employeeHasProfile, isValidEvent, setBlocked, setContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PRIMARY_TAX

public static final int PRIMARY_TAX
See Also:
Constant Field Values

ALTERNATE_TAX

public static final int ALTERNATE_TAX
See Also:
Constant Field Values

taxRecord

private com.globalretailtech.data.Tax taxRecord

transTax

private com.globalretailtech.data.TransTax transTax

item

private EjItem item

taxamount

private int taxamount

useAltTax

private boolean useAltTax
Toggle between tax rates.


eventname

private static java.lang.String eventname
Constructor Detail

EjTax

public EjTax()
Simple constructor, set type.


EjTax

public EjTax(com.globalretailtech.data.Tax t,
             EjItem i)
Constructor, set type and item.


EjTax

public EjTax(com.globalretailtech.data.TransTax t)
Constructor, set type and transaction tax record.

Method Detail

taxRecord

com.globalretailtech.data.TransTax taxRecord()

engage

public void engage(int value)
Create a tax record and add it to the EJ. Note: a tax record is created for each item, summaries are implemented in the print objects.


toggleAltTax

public void toggleAltTax()
Toggle between tax rates.


setActiveTaxRate

public void setActiveTaxRate(int rate)
Switch to specific tax rate. Only primary and alternate are supported now, but we leave the door open for others. Anything other than primary results in alternate.


applyTax

public void applyTax()
Set the taxable amount and multiply the tax rate times the taxable amount.


rate

public double rate()
The tax rate.


validTransition

public boolean validTransition(java.lang.String event)
Validate transistions state.


clear

public void clear()
Clear key implementation for this class


toString

public java.lang.String toString()
Return staic name.


eventName

public static java.lang.String eventName()
Return staic name.


quantity

public int quantity()
Quantitiy for this line.

Specified by:
quantity in class EjLine

amount

public double amount()
Amount for this line, tax amount

Specified by:
amount in class EjLine

extAmount

public double extAmount()
Extended amount for this line = amount ()

Specified by:
extAmount in class EjLine

taxAmount

public double taxAmount()
Tax amount for this line, always 0, can't tax tax.

Specified by:
taxAmount in class EjLine

change

public double change()
Chage for this transaction.

Specified by:
change in class EjLine

save

public boolean save()
Save the transaction record

Specified by:
save in class EjLine

prompt

public java.lang.String prompt()
Display prompt.

Specified by:
prompt in class EjLine

cust

public java.lang.String cust()
Display customer.

Specified by:
cust in class EjLine

desc

public java.lang.String desc()
Display description.

Specified by:
desc in class EjLine

lineNo

public int lineNo()
The line nubmer

Specified by:
lineNo in class EjLine

dataRecord

public com.globalretailtech.data.DBRecord dataRecord()
The data record

Specified by:
dataRecord in class EjLine

updateTotals

public void updateTotals()
No total updates for this record.

Specified by:
updateTotals in class EjLine