pos.getInput().setFunction("QTY");
}
public static synchronized void triggerEnter(PosScreen pos, AWTEvent event) {
// enter key maps to various different events; depending on the function
Input input = pos.getInput();
String[] lastFunc = input.getLastFunction();
if (lastFunc != null) {
if ("MGRLOGIN".equals(lastFunc[0])) {
SecurityEvents.mgrLogin(pos);
} else if ("LOGIN".equals(lastFunc[0])) {
SecurityEvents.login(pos);
} else if ("OPEN".equals(lastFunc[0])) {
ManagerEvents.openTerminal(pos);
} else if ("CLOSE".equals(lastFunc[0])) {
ManagerEvents.closeTerminal(pos);
} else if ("PAID_IN".equals(lastFunc[0])) {
ManagerEvents.paidOutAndIn(pos, "IN");
} else if ("PAID_OUT".equals(lastFunc[0])) {
ManagerEvents.paidOutAndIn(pos, "OUT");
} else if ("VOID".equals(lastFunc[0])) {
ManagerEvents.voidOrder(pos);
} else if ("REFNUM".equals(lastFunc[0])) {
PaymentEvents.setRefNum(pos);
} else if ("CREDIT".equals(lastFunc[0])) {
PaymentEvents.payCredit(pos);
} else if ("CREDITEXP".equals(lastFunc[0])) {
PaymentEvents.payCredit(pos);
} else if ("SECURITYCODE".equals(lastFunc[0])) {
PaymentEvents.payCredit(pos);
} else if ("POSTALCODE".equals(lastFunc[0])) {
PaymentEvents.payCredit(pos);
} else if ("CHECK".equals(lastFunc[0])) {
PaymentEvents.payCheck(pos);
} else if ("GIFTCARD".equals(lastFunc[0])) {
PaymentEvents.payGiftCard(pos);
} else if ("MSRINFO".equals(lastFunc[0])) {
if (input.isFunctionSet("CREDIT")) {
PaymentEvents.payCredit(pos);
} else if (input.isFunctionSet("GIFTCARD")) {
PaymentEvents.payGiftCard(pos);
}
} else if ("SKU".equals(lastFunc[0])) {
MenuEvents.addItem(pos, event);
} else if ("PROMOCODE".equals(lastFunc[0])) {
PromoEvents.addPromoCode(pos);
}
} else if (input.value().length() > 0) {
MenuEvents.addItem(pos, event);
}
}