From: Anneli <an...@us...> - 2005-01-11 17:12:27
|
Update of /cvsroot/redpos/RedPOS/src/org/redpos/client/contract/receipt In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11881/src/org/redpos/client/contract/receipt Modified Files: ReceiptSessionUtility.java Log Message: New function, save and find receipt Index: ReceiptSessionUtility.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/contract/receipt/ReceiptSessionUtility.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ReceiptSessionUtility.java 23 Nov 2004 16:02:08 -0000 1.1 --- ReceiptSessionUtility.java 11 Jan 2005 17:11:35 -0000 1.2 *************** *** 24,27 **** --- 24,29 ---- package org.redpos.client.contract.receipt; + import java.util.Collection; + import javax.management.JMException; import javax.management.MBeanException; *************** *** 164,168 **** } } ! /** * Add a new row to receipt. Will start a new receipt if none is active. --- 166,199 ---- } } ! ! /** ! * Starts a reopened receipt ! * ! * @param receipt ! * @throws JMException ! * @throws ReceiptException ! */ ! public void newReopeningReceipt(final ReceiptData receipt) ! throws JMException, ! ReceiptException ! { ! try ! { ! Object[] params = {receipt}; ! String[] signature = {"org.redpos.client.contract.receipt.ReceiptData"}; ! getServer().invoke(getService(), "newReopening", params, signature); ! } ! catch(MBeanException e) ! { ! // exception thrown by mbean method ! Exception targetException = e.getTargetException(); ! throw (ReceiptException)targetException; ! } ! catch(JMException e) ! { ! throw e; ! } ! } ! /** * Add a new row to receipt. Will start a new receipt if none is active. *************** *** 200,203 **** --- 231,266 ---- } } + + /** + * Add a new row to receipt. Will start a new receipt if none is active. + * + * @param rr + * @param register + * @param store id + * @param cashier + * @param pricelistid + * @throws JMException + * @throws ReceiptException + */ + public void addReceiptRowToReopenedReceipt(Collection receiptRowData) throws JMException, + ReceiptException + { + try + { + Object[] params = {receiptRowData}; + String[] signature = {"java.util.Collection"}; + getServer().invoke(getService(), "addRowToReopenedReceipt", params, signature); + } + catch(MBeanException e) + { + // exception thrown by mbean method + Exception targetException = e.getTargetException(); + throw (ReceiptException)targetException; + } + catch(JMException e) + { + throw e; + } + } /** |