1 25 package org.ofbiz.pos.event; 26 27 import org.ofbiz.pos.PosTransaction; 28 import org.ofbiz.pos.screen.PosScreen; 29 30 36 public class NavagationEvents { 37 38 public static void showPosScreen(PosScreen pos) { 39 ManagerEvents.mgrLoggedIn = false; 40 pos.showPage("pospanel"); 41 PosScreen.currentScreen.getInput().clear(); 42 } 43 44 public static void showPayScreen(PosScreen pos) { 45 ManagerEvents.mgrLoggedIn = false; 46 PosTransaction trans = PosTransaction.getCurrentTx(pos.getSession()); 47 if (trans.isEmpty()) { 48 pos.showDialog("dialog/error/noitems"); 49 } else { 50 PosScreen newPos = pos.showPage("paypanel"); 51 newPos.getInput().setFunction("TOTAL"); 52 newPos.refresh(); 53 } 54 } 55 56 public static void showPromoScreen(PosScreen pos) { 57 ManagerEvents.mgrLoggedIn = false; 58 pos.showPage("promopanel"); 59 PosScreen.currentScreen.getInput().clear(); 60 } 61 } 62 63 | Popular Tags |