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

Quick Search    Search Deep

com.globalretailtech.pos.ej
Class EjDebitTender  view EjDebitTender download EjDebitTender.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.EjDebitTender
All Implemented Interfaces:
java.lang.Cloneable, java.lang.Comparable

public class EjDebitTender
extends EjLine
implements java.lang.Cloneable

Debit tender operation When started from a key press, it initiates a dialog by pushing the pos configuration debit dialog onto the event stack. The user then executes the dialog to complete any validation for the debit. When validation is complete the tender operation is completed via the TENDER_FINAL event.


Field Summary
private  double cashBack
           
static int DEBIT_TENDER
          Start dialog.
static int ENTER_CASH_BACK_AMOUNT
          Prompt for cash back amount.
private static java.lang.String eventname
           
static int GET_CASH_BACK_AMOUNT
          Get cash back amount.
private  java.lang.String promptText
           
static int TENDER_FINAL
          Complete the transaction.
private  java.util.Hashtable transistions
           
private  com.globalretailtech.data.TransTender transTender
           
private  int type
           
 
Fields inherited from class com.globalretailtech.pos.ej.EjLine
ACCOUNT, ALT_CURRENCY_TENDER, AMOUNT, BANK, CC_TENDER, CHECK_TENDER, COUPON, 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
EjDebitTender()
          Constructor sets line type and initializes transition list.
EjDebitTender(com.globalretailtech.data.TransTender t)
          Constructor sets line type, transaction record and initializes transition list.
 
Method Summary
 double amount()
          Amount for this line.
 double cashBack()
          Cash back amount.
private  boolean cashBackIsValid(double amount)
           
 double change()
          Chage for this transaction.
 void clear()
          Clear key implementation for this class
 java.lang.Object clone()
          Clone method
 java.lang.String cust()
          Display customer.
 com.globalretailtech.data.DBRecord dataRecord()
          The data record
 java.lang.String desc()
          Display description.
 void engage(int value)
          Gather input and create check tender record.
static java.lang.String eventName()
          Return staic name.
 double extAmount()
          Extended amount (quantity * amount).
private  void initTransition()
           
 int lineNo()
          The line nubmer
 java.lang.String prompt()
          Display prompt.
 java.lang.String promptText()
          Prompt text for displays.
 int quantity()
          Quantitiy for this line.
 boolean save()
          Save the trans record
 void setCashBack(double value)
          Set cash back amount.
 void setPromptText(java.lang.String value)
          Set prompt text.
 void setTransTender(com.globalretailtech.data.TransTender value)
          Set transaction record.
 double taxAmount()
          Taxable amount.
 java.lang.String toString()
          Return staic name.
 com.globalretailtech.data.TransTender transTender()
          Tender record.
 int type()
          Type for number dialog interfce
 void updateTotals()
          Update the check total and subtract cash back from cash total.
 boolean validTransition(java.lang.String event)
          Validate transistions state.
 
Methods inherited from class com.globalretailtech.pos.ej.EjLine
compareTo, lineType, numberType, setLineType
 
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
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEBIT_TENDER

public static final int DEBIT_TENDER
Start dialog.

See Also:
Constant Field Values

ENTER_CASH_BACK_AMOUNT

public static final int ENTER_CASH_BACK_AMOUNT
Prompt for cash back amount.

See Also:
Constant Field Values

GET_CASH_BACK_AMOUNT

public static final int GET_CASH_BACK_AMOUNT
Get cash back amount.

See Also:
Constant Field Values

TENDER_FINAL

public static final int TENDER_FINAL
Complete the transaction.

See Also:
Constant Field Values

cashBack

private double cashBack

transTender

private com.globalretailtech.data.TransTender transTender

promptText

private java.lang.String promptText

type

private int type

transistions

private java.util.Hashtable transistions

eventname

private static java.lang.String eventname
Constructor Detail

EjDebitTender

public EjDebitTender()
Constructor sets line type and initializes transition list.


EjDebitTender

public EjDebitTender(com.globalretailtech.data.TransTender t)
Constructor sets line type, transaction record and initializes transition list.

Method Detail

promptText

public java.lang.String promptText()
Prompt text for displays.

Overrides:
promptText in class EjLine

cashBack

public double cashBack()
Cash back amount.


transTender

public com.globalretailtech.data.TransTender transTender()
Tender record.


type

public int type()
Type for number dialog interfce

Overrides:
type in class EjLine

setPromptText

public void setPromptText(java.lang.String value)
Set prompt text.


setCashBack

public void setCashBack(double value)
Set cash back amount.


setTransTender

public void setTransTender(com.globalretailtech.data.TransTender value)
Set transaction record.


clone

public java.lang.Object clone()
Clone method


engage

public void engage(int value)
Gather input and create check tender record.


cashBackIsValid

private boolean cashBackIsValid(double amount)

initTransition

private void initTransition()

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.

Specified by:
amount in class EjLine

extAmount

public double extAmount()
Extended amount (quantity * amount).

Specified by:
extAmount in class EjLine

taxAmount

public double taxAmount()
Taxable amount.

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 trans 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()
Update the check total and subtract cash back from cash total.

Specified by:
updateTotals in class EjLine