From: Anneli <an...@us...> - 2005-01-17 10:25:55
|
Update of /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin/function In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18200/src/org/redpos/client/ui/plugin/function Modified Files: CustomerService.java Log Message: When we have an ongoing receipt the test of login per receipt is not made Index: CustomerService.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin/function/CustomerService.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CustomerService.java 11 Jan 2005 17:14:15 -0000 1.1 --- CustomerService.java 17 Jan 2005 10:25:41 -0000 1.2 *************** *** 29,32 **** --- 29,33 ---- import org.eclipse.swt.widgets.Composite; import org.redpos.client.contract.POSEngineUtility; + import org.redpos.client.contract.receipt.ReceiptSessionUtility; import org.redpos.client.ui.plugin.PluginFunctionMBeanSupport; import org.redpos.client.ui.plugin.contract.PluginFunctionConstants; *************** *** 48,51 **** --- 49,55 ---- private POSEngineUtility posEngineUtility = null; + /** Receipt session service utility instance * */ + private ReceiptSessionUtility receiptSessionUtility = null; + /** *************** *** 64,77 **** PluginFunctionConstants.NOTIFICATION_FUNCTION_FINISHED, null); ! try { ! if (posEngineUtility.getLoginPerReceipt()) ! { ! fireNotification(PluginFunctionConstants.NOTIFICATION_LOGIN_PER_RECEIPT, null); ! } } ! catch(JMException e) { ! log.error(e.getMessage(), e); } } --- 68,88 ---- PluginFunctionConstants.NOTIFICATION_FUNCTION_FINISHED, null); ! if(isReceiptStarted()) { ! // } ! else { ! try ! { ! if (posEngineUtility.getLoginPerReceipt()) ! { ! fireNotification(PluginFunctionConstants.NOTIFICATION_LOGIN_PER_RECEIPT, null); ! } ! } ! catch(JMException e) ! { ! log.error(e.getMessage(), e); ! } } } *************** *** 97,100 **** --- 108,123 ---- } + public boolean isReceiptStarted() + { + try + { + return receiptSessionUtility.isReceiptStarted(); + } + catch(JMException e) + { + log.error(e.getMessage(), e); + return false; + } + } /** * Invoked when service is started *************** *** 108,111 **** --- 131,135 ---- "Customer Service")); posEngineUtility = new POSEngineUtility(getServer()); + receiptSessionUtility = new ReceiptSessionUtility(getServer()); } |