You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(8) |
Dec
(155) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(50) |
Feb
(18) |
Mar
(18) |
Apr
|
May
(5) |
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Anneli <an...@us...> - 2005-01-11 17:12:18
|
Update of /cvsroot/redpos/RedPOS/src/org/redpos/client In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11881/src/org/redpos/client Modified Files: POSEngine.java Log Message: New function, save and find receipt Index: POSEngine.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/POSEngine.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** POSEngine.java 27 Dec 2004 11:19:28 -0000 1.5 --- POSEngine.java 11 Jan 2005 17:11:35 -0000 1.6 *************** *** 42,45 **** --- 42,46 ---- import org.redpos.client.contract.receipt.ProductReceiptRow; import org.redpos.client.contract.receipt.ReceiptConstants; + import org.redpos.client.contract.receipt.ReceiptData; import org.redpos.client.contract.receipt.ReceiptException; import org.redpos.client.contract.receipt.ReceiptRow; *************** *** 418,422 **** rr.setProduct(product); rr.setPrice(price); ! try { --- 419,423 ---- rr.setProduct(product); rr.setPrice(price); ! try { *************** *** 1001,1005 **** } } ! /** * Close the ongoing receipt and treat it as completed/finished. --- 1002,1006 ---- } } ! /** * Close the ongoing receipt and treat it as completed/finished. *************** *** 1317,1320 **** } } ! } \ No newline at end of file --- 1318,1348 ---- } } ! ! /** ! * Restarts an existing receipt ! * ! * @jmx.managed-operation ! * @param receipt ! */ ! public void startReopeningReceipt(ReceiptData receipt)throws POSEngineException, ! ReceiptException ! { ! try ! { ! // call receipt session service method ! receiptSessionUtility.newReopeningReceipt(receipt); ! } ! catch(ReceiptException e1) ! { ! e1.printStackTrace(); ! throw e1; ! } ! catch(JMException e1) ! { ! e1.printStackTrace(); ! throw new POSEngineException( ! "Failed to reopen receipt in receipt session service", ! POSEngineException.UNKNOWN_ERROR); ! } ! } } \ No newline at end of file |
From: Anneli <an...@us...> - 2005-01-11 17:12:07
|
Update of /cvsroot/redpos/RedPOS/lang/conf In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11881/lang/conf Modified Files: lang-en-EN.xml lang-sv-SE.xml Log Message: New function, save and find receipt Index: lang-sv-SE.xml =================================================================== RCS file: /cvsroot/redpos/RedPOS/lang/conf/lang-sv-SE.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** lang-sv-SE.xml 20 Dec 2004 07:59:33 -0000 1.3 --- lang-sv-SE.xml 11 Jan 2005 17:11:39 -0000 1.4 *************** *** 27,30 **** --- 27,41 ---- <string desc="Client payment text" name="client.payment.bonuscard.name.text">Bonuskort</string> <string desc="Client payment text" name="client.payment.bonuscard.receipt.text">Bonuskort betalning</string> + <string desc="Client payment text" name="client.payment.pay1.name.text">Amex/Diners</string> + <string desc="Client payment text" name="client.payment.pay1.receipt.text">Amex/Diners betalning</string> + <string desc="Client payment text" name="client.payment.pay2.name.text">Övriga presentkort</string> + <string desc="Client payment text" name="client.payment.pay2.receipt.text">Övriga presentkort betalning</string> + <string desc="Client payment text" name="client.payment.pay3.name.text">Försäkringsrekvisition</string> + <string desc="Client payment text" name="client.payment.pay3.receipt.text">Försäkringsrekvisition betalning</string> + <string desc="Client payment text" name="client.payment.pay4.name.text">Resurs Räntefritt</string> + <string desc="Client payment text" name="client.payment.pay4.receipt.text">Resurs Räntefritt betalning</string> + <string desc="Client payment text" name="client.payment.pay5.name.text">Garantiersättning</string> + <string desc="Client payment text" name="client.payment.pay5.receipt.text">Garantiersättning betalning</string> + <string desc="Client receipt text" name="client.receipt.tax.text">Moms</string> *************** *** 45,48 **** --- 56,60 ---- <string desc="Client receipt printer text" name="client.receiptprinter.correction.text">*** FELSLAG ***</string> <string desc="Client receipt printer text" name="client.receiptprinter.copy.text">*** KOPIA ***</string> + <string desc="Client receipt printer text" name="client.receiptprinter.signature.text">Signatur .....................</string> <string desc="Client tally report text" name="client.tally.report.header.text">Kassarapport</string> *************** *** 78,82 **** <string desc="Client tally report text" name="client.tally.report.string29.text">Avrundning</string> <string desc="Client tally report text" name="client.tally.report.string30.text">Summa inbetalningar:</string> ! <string desc="UI main window dashboard" name="ui.main.dashboard.welcome.text">Välkommen till RedPOS</string> --- 90,99 ---- <string desc="Client tally report text" name="client.tally.report.string29.text">Avrundning</string> <string desc="Client tally report text" name="client.tally.report.string30.text">Summa inbetalningar:</string> ! <string desc="Client tally report text" name="client.tally.report.string31.text">Amex/Diners inbetalningar:</string> ! <string desc="Client tally report text" name="client.tally.report.string32.text">Övriga presentkort inbetalningar:</string> ! <string desc="Client tally report text" name="client.tally.report.string33.text">Försäkringsrekvisition inbetalningar:</string> ! <string desc="Client tally report text" name="client.tally.report.string34.text">Resurs Räntefritt inbetalningar:</string> ! <string desc="Client tally report text" name="client.tally.report.string35.text">Garantiersättning inbetalningar:</string> ! <string desc="UI main window dashboard" name="ui.main.dashboard.welcome.text">Välkommen till RedPOS</string> *************** *** 236,252 **** <string desc="Login dialog" name="ui.auth.login.message3.text" >Login misslyckades, felaktigt användarnamn eller lösenord</string> ! <string desc="UI plugin function text" name="ui.plugin.receipt.savereceipt.text">Spara</string> ! <string desc="UI plugin function text" name="ui.plugin.receipt.savereceipt.message.text">Kvittot är nu sparat</string> <string desc="UI plugin function text" name="ui.plugin.receipt.findreceipt.text">Kvitto</string> <string desc="UI plugin function text" name="ui.plugin.receipt.findreceipt.label.text">Datum:</string> <string desc="UI plugin function text" name="ui.plugin.receipt.findreceipt.string1.text">Avbryt</string> <string desc="UI plugin function text" name="ui.plugin.receipt.findreceipt.string2.text">Fortsätt</string> ! <string desc="UI main window message" name="ui.main.message.findreceipt1.text">Kunde inte hämta kvitto</string> <string desc="UI main window message" name="ui.main.message.findreceipt2.text">Sökning misslyckdes</string> <string desc="UI main window message" name="ui.main.message.findreceipt3.text">Kunde inte lägga till kvitto</string> ! <string desc="UI main window message" name="ui.main.message.findreceipt4.text">Kassör</string> ! <string desc="UI main window message" name="ui.main.message.findreceipt5.text">*Kunde inte hitta kvitto*</string> ! <string desc="UI main window message" name="ui.main.message.findreceipt6.text">*Sökning misslyckades*</string> ! <string desc="UI main window message" name="ui.main.message.findreceipt7.text">*Kunde inte lägga till kvitto*</string> </redpos-language> --- 253,275 ---- <string desc="Login dialog" name="ui.auth.login.message3.text" >Login misslyckades, felaktigt användarnamn eller lösenord</string> ! <string desc="UI plugin function text" name="ui.plugin.receipt.saveReceipt1.text">Vill du spara pågående kvitto?</string> ! <string desc="UI plugin function text" name="ui.plugin.receipt.saveReceipt2.text">Kunde inte spara kvitto</string> <string desc="UI plugin function text" name="ui.plugin.receipt.findreceipt.text">Kvitto</string> <string desc="UI plugin function text" name="ui.plugin.receipt.findreceipt.label.text">Datum:</string> + <string desc="UI plugin function text" name="ui.plugin.receipt.findreceipt.receiptid.text">Kvittonr:</string> + <string desc="UI plugin function text" name="ui.plugin.receipt.findreceipt.date.text">Datum:</string> + <string desc="UI plugin function text" name="ui.plugin.receipt.findreceipt..subtotal.text">Total:</string> + <string desc="UI plugin function text" name="ui.plugin.receipt.findreceipt.cashier.text">Kassör:</string> <string desc="UI plugin function text" name="ui.plugin.receipt.findreceipt.string1.text">Avbryt</string> <string desc="UI plugin function text" name="ui.plugin.receipt.findreceipt.string2.text">Fortsätt</string> ! ! <string desc="UI main window message" name="ui.main.message.findreceipt1.text">Det finns inget kvitto med angivet datum</string> <string desc="UI main window message" name="ui.main.message.findreceipt2.text">Sökning misslyckdes</string> <string desc="UI main window message" name="ui.main.message.findreceipt3.text">Kunde inte lägga till kvitto</string> ! ! <string desc="UI plugin function text" name="ui.plugin.support.customerservice.text" >Kundsupport</string> ! <string desc="UI plugin function text" name="ui.plugin.support.customerservice.message.text" >Kundtjänst telefon: 054 - 15 35 80 mail: su...@re...</string> ! ! </redpos-language> Index: lang-en-EN.xml =================================================================== RCS file: /cvsroot/redpos/RedPOS/lang/conf/lang-en-EN.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** lang-en-EN.xml 20 Dec 2004 07:59:32 -0000 1.3 --- lang-en-EN.xml 11 Jan 2005 17:11:38 -0000 1.4 *************** *** 25,33 **** <string desc="Client payment text" name="client.payment.bonuscard.name.text">Bonus card</string> <string desc="Client payment text" name="client.payment.bonuscard.receipt.text">Bonus card payment</string> <string desc="Client receipt text" name="client.receipt.tax.text">VAT</string> ! <string desc="Client receipt printer text" name="client.receiptprinter.date.text">Date:</string>javaVersion <string desc="Client receipt printer text" name="client.receiptprinter.time.text">Time:</string> <string desc="Client receipt printer text" name="client.receiptprinter.receiptid.text">Receipt No:</string> --- 25,43 ---- <string desc="Client payment text" name="client.payment.bonuscard.name.text">Bonus card</string> <string desc="Client payment text" name="client.payment.bonuscard.receipt.text">Bonus card payment</string> + <string desc="Client payment text" name="client.payment.pay1.name.text">Payment 1</string> + <string desc="Client payment text" name="client.payment.pay1.receipt.text">Payment 1 payment</string> + <string desc="Client payment text" name="client.payment.pay2.name.text">Payment 2</string> + <string desc="Client payment text" name="client.payment.pay2.receipt.text">Payment 2 payment</string> + <string desc="Client payment text" name="client.payment.pay3.name.text">Payment 3</string> + <string desc="Client payment text" name="client.payment.pay3.receipt.text">Payment 3 payment</string> + <string desc="Client payment text" name="client.payment.pay4.name.text">Payment 4</string> + <string desc="Client payment text" name="client.payment.pay4.receipt.text">Payment 4 payment</string> + <string desc="Client payment text" name="client.payment.pay5.name.text">Payment 5</string> + <string desc="Client payment text" name="client.payment.pay5.receipt.text">Payment 5 payment</string> <string desc="Client receipt text" name="client.receipt.tax.text">VAT</string> ! <string desc="Client receipt printer text" name="client.receiptprinter.date.text">Date:</string> <string desc="Client receipt printer text" name="client.receiptprinter.time.text">Time:</string> <string desc="Client receipt printer text" name="client.receiptprinter.receiptid.text">Receipt No:</string> *************** *** 39,47 **** <string desc="Client receipt printer text" name="client.receiptprinter.net.text">Net</string> <string desc="Client receipt printer text" name="client.receiptprinter.gross.text">Gross</string> ! <string desc="Client receipt printer text" name="client.receiptprinter.change.text">Change</string>javaVersion <string desc="Client receipt printer text" name="client.receiptprinter.complaint.text">*** COMPLAINT ***</string> <string desc="Client receipt printer text" name="client.receiptprinter.return.text">*** RETURN GOODS ***</string> <string desc="Client receipt printer text" name="client.receiptprinter.correction.text">*** CORR. RECEIPT ***</string> <string desc="Client receipt printer text" name="client.receiptprinter.copy.text">*** COPY ***</string> <string desc="Client tally report text" name="client.tally.report.header.text">End-of-day Report</string> --- 49,58 ---- <string desc="Client receipt printer text" name="client.receiptprinter.net.text">Net</string> <string desc="Client receipt printer text" name="client.receiptprinter.gross.text">Gross</string> ! <string desc="Client receipt printer text" name="client.receiptprinter.change.text">Change</string> <string desc="Client receipt printer text" name="client.receiptprinter.complaint.text">*** COMPLAINT ***</string> <string desc="Client receipt printer text" name="client.receiptprinter.return.text">*** RETURN GOODS ***</string> <string desc="Client receipt printer text" name="client.receiptprinter.correction.text">*** CORR. RECEIPT ***</string> <string desc="Client receipt printer text" name="client.receiptprinter.copy.text">*** COPY ***</string> + <string desc="Client receipt printer text" name="client.receiptprinter.signature.text">Signature .....................</string> <string desc="Client tally report text" name="client.tally.report.header.text">End-of-day Report</string> *************** *** 77,81 **** <string desc="Client tally report text" name="client.tally.report.string29.text">Rounding</string> <string desc="Client tally report text" name="client.tally.report.string30.text">Amount - Today�s payments:</string> ! <string desc="UI main window dashboard" name="ui.main.dashboard.welcome.text">Welcome to REDPOS</string> <string desc="UI main window dashboard" name="ui.main.dashboard.welcome.info.text">Enter product number to record your sale. Enter number of products * product number if you sell more than one product.</string> --- 88,97 ---- <string desc="Client tally report text" name="client.tally.report.string29.text">Rounding</string> <string desc="Client tally report text" name="client.tally.report.string30.text">Amount - Today�s payments:</string> ! <string desc="Client tally report text" name="client.tally.report.string31.text">Payment1 payments:</string> ! <string desc="Client tally report text" name="client.tally.report.string32.text">Payment2 payments:</string> ! <string desc="Client tally report text" name="client.tally.report.string33.text">Payment3 payments:</string> ! <string desc="Client tally report text" name="client.tally.report.string34.text">Payment4 payments:</string> ! <string desc="Client tally report text" name="client.tally.report.string35.text">Payment5 payments:</string> ! <string desc="UI main window dashboard" name="ui.main.dashboard.welcome.text">Welcome to REDPOS</string> <string desc="UI main window dashboard" name="ui.main.dashboard.welcome.info.text">Enter product number to record your sale. Enter number of products * product number if you sell more than one product.</string> *************** *** 235,237 **** --- 251,272 ---- <string desc="Login dialog" name="ui.auth.login.message3.text" >Login failed, incorrect user name or password</string> + <string desc="UI plugin function text" name="ui.plugin.receipt.saveReceipt1.text">Do you want to save current receipt?</string> + <string desc="UI plugin function text" name="ui.plugin.receipt.saveReceipt2.text">Your attempt to save current receipt failed</string> + <string desc="UI plugin function text" name="ui.plugin.receipt.findreceipt.text">Receipt</string> + <string desc="UI plugin function text" name="ui.plugin.receipt.findreceipt.label.text">Date:</string> + <string desc="UI plugin function text" name="ui.plugin.receipt.findreceipt.receiptid.text">Receipt No:</string> + <string desc="UI plugin function text" name="ui.plugin.receipt.findreceipt.date.text">Date:</string> + <string desc="UI plugin function text" name="ui.plugin.receipt.findreceipt.subtotal.text">Total:</string> + <string desc="UI plugin function text" name="ui.plugin.receipt.findreceipt.cashier.text">Cashier:</string> + <string desc="UI plugin function text" name="ui.plugin.receipt.findreceipt.string1.text">Cancel</string> + <string desc="UI plugin function text" name="ui.plugin.receipt.findreceipt.string2.text">Continue</string> + + <string desc="UI main window message" name="ui.main.message.findreceipt1.text">There is no receipt with stated date</string> + <string desc="UI main window message" name="ui.main.message.findreceipt2.text">The search failed</string> + <string desc="UI main window message" name="ui.main.message.findreceipt3.text">Your attempt to select receipt failed</string> + + <string desc="UI plugin function text" name="ui.plugin.support.customerservice.text" >Customersupport</string> + <string desc="UI plugin function text" name="ui.plugin.support.customerservice.message.text" >Customersupport phone: +4654 - 15 35 80 mail: su...@re...</string> + + </redpos-language> |
From: Anneli <an...@us...> - 2005-01-11 17:11:51
|
Update of /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin/META-INF In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11881/src/org/redpos/client/ui/plugin/META-INF Modified Files: jboss-service.xml Log Message: New function, save and find receipt Index: jboss-service.xml =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin/META-INF/jboss-service.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** jboss-service.xml 23 Nov 2004 16:02:31 -0000 1.1 --- jboss-service.xml 11 Jan 2005 17:11:40 -0000 1.2 *************** *** 228,231 **** --- 228,251 ---- <attribute name="Order">1</attribute> </mbean> + + <mbean code="org.redpos.client.ui.plugin.function.FindSaveReceipt" + name="RedPOS.client.ui.plugin.function:service=FindSaveReceipt" + > + <depends>RedPOS.client:service=LanguageService</depends> + <depends>RedPOS.client:service=POSEngine</depends> + <depends>RedPOS.client:service=Properties</depends> + <depends>RedPOS.client.ui.plugin.category:service=Search</depends> + <attribute name="Parent">RedPOS.client.ui.plugin.category:service=Search</attribute> + <attribute name="Order">2</attribute> + </mbean> + + <mbean code="org.redpos.client.ui.plugin.function.CustomerService" + name="RedPOS.client.ui.plugin.function:service=CustomerService" + > + <depends>RedPOS.client:service=LanguageService</depends> + <depends>RedPOS.client.ui.plugin.category:service=Help</depends> + <attribute name="Parent">RedPOS.client.ui.plugin.category:service=Help</attribute> + <attribute name="Order">1</attribute> + </mbean> <!-- |
From: Anneli <an...@us...> - 2005-01-11 17:11:51
|
Update of /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin/function In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11881/src/org/redpos/client/ui/plugin/function Added Files: FindReceiptUI.java FindSaveReceipt.java Log Message: New function, save and find receipt --- NEW FILE: FindSaveReceipt.java --- /* * RedPOS, the OpenSource Point of Sale * * Copyright (C) 2004-2007 Redpill AB * * This application is free software; you can redistribute * it and/or modify it under the terms of the GNU Lesser * General Public License as published by the Free Software * Foundation; either version 2.1 of the License, or * (at your option) any later version. * * This application is distributed in the hope that it will be * useful, but WITHOUT ANY WARRANTY; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this application; if not, it can be downloaded * from http://www.gnu.org/licenses/lgpl.html. * * For more information and contacts, please visit http://www.redpos.org * */ package org.redpos.client.ui.plugin.function; import java.text.SimpleDateFormat; import java.util.Collection; import java.util.Iterator; import java.util.Vector; import javax.management.JMException; import javax.management.MalformedObjectNameException; import javax.management.ObjectName; import org.eclipse.swt.widgets.Composite; import org.redpos.amount.Amount; import org.redpos.client.contract.POSEngineUtility; import org.redpos.client.contract.properties.PropertiesUtility; import org.redpos.client.contract.receipt.ReceiptConstants; import org.redpos.client.contract.receipt.ReceiptData; import org.redpos.client.contract.receipt.ReceiptException; import org.redpos.client.contract.receipt.ReceiptRowData; import org.redpos.client.contract.receipt.ReceiptSessionUtility; import org.redpos.client.lang.contract.Language; import org.redpos.client.ui.UIDisabler; import org.redpos.client.ui.plugin.PluginFunctionMBeanSupport; import org.redpos.client.ui.plugin.contract.PluginFunctionConstants; import org.redpos.client.ui.plugin.function.FindReceiptUI.ReceiptTableItemData; /** * UI plugin function service * * @version <tt>$Revision: 1.1 $</tt> * @author <a>hele</a> * @author <a href="mailto:an...@us...">anba</a> * @jmx.mbean name = "RedPOS.client.ui.plugin.function:service=FindSaveReceipt" * description = "RedPOS client plug-in function" * extends = "org.redpos.client.ui.plugin.PluginFunctionMBean" */ public class FindSaveReceipt extends PluginFunctionMBeanSupport implements FindSaveReceiptMBean, FindReceiptUI.FindReceiptUIListener { private Language language; private FindReceiptUI ui = null; private UserInputUI userInput; private ReceiptTableItemData selectedReceipt; /** Receipt session service utility instance * */ private ReceiptSessionUtility receiptSessionUtility = null; private POSEngineUtility posEngineUtility = null; /** * @see org.redpos.client.ui.plugin.PluginFunctionMBean#invoke(org.eclipse.swt.widgets.Composite) */ public boolean invokeFunction(Composite parent) { ui = null; if(isReceiptStarted()) { if (prepare()) { ConfirmActionUI.ConfirmListener listener = new ConfirmActionUI.ConfirmListener() { public void selectionMade(int selection) { saveReceipt(); // send notification fireNotification( PluginFunctionConstants.NOTIFICATION_FUNCTION_FINISHED, null); // enable other UI components UIDisabler.getInstance().fireEnable(); try { if (posEngineUtility.getLoginPerReceipt()) { fireNotification(PluginFunctionConstants.NOTIFICATION_LOGIN_PER_RECEIPT, null); } } catch(JMException e) { log.error(e.getMessage(), e); } } }; String yesText = getLanguageString("ui.main.dashboard.message.yes.text", "Yes"); String noText = getLanguageString("ui.main.dashboard.message.no.text", "No"); String okText = getLanguageString("ui.main.dashboard.message.ok.text", "OK"); String cancelText = getLanguageString( "ui.main.dashboard.message.cancel.text", "Cancel"); String message = getLanguageString( "ui.plugin.receipt.saveReceipt1.text", "Do you want to save current receipt?"); ConfirmActionUI confirm = new ConfirmActionUI(parent, message, ConfirmActionUI.YES_NO_SELECTION, listener, yesText, noText, okText, cancelText); parent.layout(); } else { UIDisabler.getInstance().fireEnable(); } } else { ui = new FindReceiptUI(parent, language, this); parent.layout(); } return true; } /** * Checks if current receipt contains other rows than Productrows * */ public boolean prepare() { try { ObjectName receiptSession = new ObjectName( "RedPOS.client:service=ReceiptSession"); Object parameters[] = {}; String signature[] = {}; Vector responseRow = (Vector) getServer().getAttribute(receiptSession, "Rows"); Collection rowsInCurrentReceipt = (Collection)responseRow; for(Iterator iter = rowsInCurrentReceipt.iterator(); iter.hasNext();) { ReceiptRowData element = (ReceiptRowData)iter.next(); if (element.getType() != (ReceiptConstants.TYPE_RECEIPTROW_PRODUCT)) // && element.getType() != (ReceiptConstants.TYPE_RECEIPTROW_FREETEXT)) { if (element.getStatus() != (ReceiptConstants.STATUS_RECEIPTROW_CANCELLED)) { // send message to ui String message = getLanguageString( "ui.plugin.receipt.saveReceipt2.text", "Your attempt to save current receipt failed"); sendUIMessage(message); return false; } } } } catch (Exception e) { // } return true; } /** * Save current receipt * */ private void saveReceipt() { try { ObjectName receiptSession = new ObjectName( "RedPOS.client:service=ReceiptSession"); Object parameters[] = {}; String signature[] = {}; Object response = getServer().invoke(receiptSession, "save", parameters, signature); } catch(MalformedObjectNameException e) { log.error(e.getMessage(), e); } catch(Exception e) { String message = getLanguageString( "ui.plugin.receipt.saveReceipt2.text", "Your attempt to save current receipt failed"); sendUIMessage(message); } } /** * Find receipt with date grather then given and ReceiptConstants.STATUS_RECEIPT_SAVED * * @jmx.managed-operation */ public void findReceipt(String value) { try { ObjectName receiptStorage = new ObjectName( "RedPOS.client:service=ReceiptStorage"); int status = ReceiptConstants.STATUS_RECEIPT_SAVED; SimpleDateFormat sdf = new SimpleDateFormat("yyMMdd"); Object params[] = {sdf.parse(value), new Integer(ReceiptConstants.STATUS_RECEIPT_SAVED)}; String signature[] = {"java.util.Date", "java.lang.Integer"}; //call pos core method Vector response = (Vector) getServer().invoke( receiptStorage, "findReceiptsByDateGreaterThan", params, signature); if (response.isEmpty()) { //send message to ui String message = getLanguageString( "ui.main.message.findReceipt1.text", "There is no receipt with stated date"); sendUIMessage(message); } //add found receipt to ui for (Iterator iter = response.iterator(); iter.hasNext();) { Amount amount = new Amount(0); ReceiptData receipt = (ReceiptData) iter.next(); Collection collRowData = findRows(receipt.getReceiptId()); // iterate receipt rows for(Iterator iterat = collRowData.iterator(); iterat.hasNext();) { ReceiptRowData receiptRowData = (ReceiptRowData)iterat.next(); if (receiptRowData.getType() != ReceiptConstants.TYPE_RECEIPTROW_FREETEXT) { // in this first version of find/save receipt it is not possible to save // other rows than of type product, thats why this is commented /* if ((receiptRowData.getType() == ReceiptConstants.TYPE_RECEIPTROW_DISCOUNT_ROW_AMOUNT) || (receiptRowData.getType() == ReceiptConstants.TYPE_RECEIPTROW_DISCOUNT_ROW_PERCENT) || (receiptRowData.getType() == ReceiptConstants.TYPE_RECEIPTROW_DISCOUNT_TOTAL_AMOUNT) || (receiptRowData.getType() == ReceiptConstants.TYPE_RECEIPTROW_DISCOUNT_ROW_PERCENT)) { if (receiptRowData.getStatus() != ReceiptConstants.STATUS_RECEIPTROW_CANCELLED) amount.subtract(receiptRowData.getAmount()); } else { */ amount.add(receiptRowData.getAmount()); // } } } ui.addReceipt(receipt, amount); } } catch (Exception e) { //send message to ui String message = getLanguageString( "ui.main.message.findReceipt2.text", "The search failed"); getLog().error("findReceipt() failed: " + e.getMessage()); e.printStackTrace(); } } /** * Tries to find receiptRows for given receipt in storage service * * @param receiptId * @return @throws * Exception */ private Vector findRows(String receiptId) { try { ObjectName receiptRowService = new ObjectName( "RedPOS.client:service=ReceiptRowStorage"); Object parameters[] = {receiptId}; String signature[] = {"java.lang.String"}; Object response = getServer().invoke(receiptRowService, "findRowsByReceiptId", parameters, signature); if(response != null) return (Vector)response; else return null; } catch(Exception e) { getLog().error("findRows() failed: " + e.getMessage()); e.printStackTrace(); } return null; } public boolean isReceiptStarted() { try { return receiptSessionUtility.isReceiptStarted(); } catch(JMException e) { log.error(e.getMessage(), e); return false; } } /** * Invoked when service is started * * @see org.jboss.system.ServiceMBeanSupport#startService() */ protected void startService() throws Exception { super.startService(); language = getLanguage(); setText(language.getString("ui.plugin.receipt.findReceipt.text", "Receipt")); PropertiesUtility po = new PropertiesUtility(getServer()); receiptSessionUtility = new ReceiptSessionUtility(getServer()); posEngineUtility = new POSEngineUtility(getServer()); } /** * Invoked by the FindReceiptUI * * @see org.redpos.client.ui.plugin.function.FindReceiptUI.FindReceiptUIListener#findSelected(java.lang.String) */ public void findSelected(String value) { ui.clearTable(); findReceipt(value); } public void addReceiptSelected(ReceiptTableItemData receipt) { if (receipt == null) { //set selected receipt selectedReceipt = receipt; //remove old ui from display Composite parent = ui.getParent(); ui.dispose(); ui = null; parent.layout(); } else { startReopeningReceipt(receipt); } } /** * Reopens given receipt * * @param receipt */ private void startReopeningReceipt(ReceiptTableItemData receipt) { try { ObjectName receiptService = new ObjectName( "RedPOS.client:service=POSEngine"); Object parameters [] = {receipt.receiptData}; String signature [] = {"org.redpos.client.contract.receipt.ReceiptData"}; getServer().invoke(receiptService, "startReopeningReceipt", parameters, signature); } catch (Exception e) { //send message to ui String message = getLanguageString( "ui.main.message.findReceipt3.text", "Your attempt to select receipt failed"); sendUIMessage(message); getLog().error("startReopeningReceipt() failed: " + e.getMessage()); e.printStackTrace(); } Collection collRowData = findRows(receipt.receiptData.getReceiptId()); try { receiptSessionUtility.addReceiptRowToReopenedReceipt(collRowData); } catch(ReceiptException e1) { e1.printStackTrace(); } catch(JMException e1) { e1.printStackTrace(); } // send notification fireNotification( PluginFunctionConstants.NOTIFICATION_FUNCTION_FINISHED, null); } } --- NEW FILE: FindReceiptUI.java --- /* * RedPOS, the OpenSource Point of Sale * * Copyright (C) 2004-2007 Redpill AB * * This application is free software; you can redistribute * it and/or modify it under the terms of the GNU Lesser * General Public License as published by the Free Software * Foundation; either version 2.1 of the License, or * (at your option) any later version. * * This application is distributed in the hope that it will be * useful, but WITHOUT ANY WARRANTY; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this application; if not, it can be downloaded * from http://www.gnu.org/licenses/lgpl.html. * * For more information and contacts, please visit http://www.redpos.org * */ package org.redpos.client.ui.plugin.function; import java.text.SimpleDateFormat; import java.util.Calendar; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.SWT; import org.eclipse.swt.custom.StackLayout; import org.eclipse.swt.events.KeyAdapter; import org.eclipse.swt.events.KeyEvent; import org.eclipse.swt.events.KeyListener; import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.events.SelectionListener; import org.eclipse.swt.events.TraverseEvent; import org.eclipse.swt.events.TraverseListener; import org.eclipse.swt.layout.FillLayout; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Event; import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.Table; import org.eclipse.swt.widgets.TableColumn; import org.eclipse.swt.widgets.TableItem; import org.eclipse.swt.widgets.Text; import org.eclipse.swt.widgets.Listener; import org.redpos.amount.Amount; import org.redpos.client.contract.receipt.ReceiptData; import org.redpos.client.lang.contract.Language; import org.redpos.client.ui.contract.FontManager; /** * The UI class for the FindReceipt plugin function * * @version <tt>$Revision: 1.1 $</tt> * @author <a>hele</a> * @author <a href="mailto:an...@us...">anba</a> */ public class FindReceiptUI extends Composite { private Text inputField; private Table receiptTable; private Language language; private FindReceiptUIListener listener; private StackLayout stack; private Composite centerStack; private Button receiptInfoBackButton; private Button receiptInfoToRegisterButton; private Composite receiptInfo; private Label receiptIDText; private Label receiptId; private Label receiptDateText; private Label receiptDate; private Label receiptCashierText; private Label receiptCashier; private Label receiptAmountText; private Label receiptAmount; /** * Constructor */ public FindReceiptUI(Composite parent, Language language, FindReceiptUIListener listener) { super(parent, SWT.NORMAL); this.language = language; this.listener = listener; setBackground(parent.getBackground()); init(); } public void init() { //set grid layout GridLayout layout = new GridLayout(); layout.verticalSpacing = 10; layout.marginHeight = 10; layout.marginWidth = 10; layout.numColumns = 3; setLayout(layout); //get font manager instance FontManager fontManager = FontManager.getInstance(this); //create input field label Label inputLabel = new Label(this, SWT.LEFT); inputLabel.setText(language.getString("ui.plugin.receipt.findreceipt.label.text", "Date:")); inputLabel.setBackground(this.getBackground()); GridData inputLabelGridData = new GridData(); inputLabelGridData.horizontalAlignment = GridData.BEGINNING; inputLabelGridData.verticalAlignment = GridData.CENTER; inputLabel.setLayoutData(inputLabelGridData); //create input field inputField = new Text(this, SWT.SINGLE | SWT.BORDER); GridData inputFieldGridData = new GridData(); inputFieldGridData.grabExcessHorizontalSpace = true; inputFieldGridData.horizontalAlignment = GridData.FILL; inputFieldGridData.verticalAlignment = GridData.CENTER; inputField.setLayoutData(inputFieldGridData); Calendar cal = Calendar.getInstance(); SimpleDateFormat sdf = new SimpleDateFormat("yyMMdd"); String value = sdf.format(cal.getTime()); inputField.setText(value); // create input field keylistener KeyListener keyListener = new KeyAdapter() { public void keyReleased(KeyEvent event) { if (inputField.getText().length() == 6) findSelected(); } }; inputField.addKeyListener(keyListener); //create panel centerStack = new Composite(this, SWT.BORDER); stack = new StackLayout(); centerStack.setLayout(stack); GridData centerData = new GridData(); centerData.grabExcessHorizontalSpace = true; centerData.grabExcessVerticalSpace = true; centerData.horizontalSpan = 2; centerData.horizontalAlignment = GridData.FILL; centerData.verticalAlignment = GridData.FILL; centerStack.setLayoutData(centerData); //create table receiptTable = new Table(centerStack, SWT.SINGLE); receiptTable.setHeaderVisible(false); receiptTable.setLinesVisible(true); //set table as initial top control in stack stack.topControl = receiptTable; TableColumn idColumn = new TableColumn(receiptTable, SWT.LEFT); idColumn.setWidth(50); idColumn.setAlignment(SWT.LEFT); TableColumn dateColumn = new TableColumn(receiptTable, SWT.LEFT); dateColumn.setWidth(140); dateColumn.setAlignment(SWT.LEFT); TableColumn cashierColumn = new TableColumn(receiptTable, SWT.RIGHT); cashierColumn.setWidth(50); cashierColumn.setAlignment(SWT.RIGHT); //create receipt info composite createReceiptInfoComposite(); //set focus order using traverse listeners TraverseListener fieldTraverseListener = new TraverseListener() { public void keyTraversed(TraverseEvent e) { receiptTable.setFocus(); e.doit = false; } }; inputField.addTraverseListener(fieldTraverseListener); TraverseListener tableTraverseListener = new TraverseListener() { public void keyTraversed(TraverseEvent e) { if(e.detail == SWT.TRAVERSE_TAB_NEXT || e.detail == SWT.TRAVERSE_TAB_PREVIOUS) { inputField.setFocus(); e.doit = false; } } }; receiptTable.addTraverseListener(tableTraverseListener); //add a selection listener to the table SelectionListener tableSelectionListener = new SelectionListener() { public void widgetSelected(SelectionEvent arg0) { // ignored } public void widgetDefaultSelected(SelectionEvent arg0) { int index = receiptTable.getSelectionIndex(); if (index != -1) showReceipt(index); } }; receiptTable.addSelectionListener(tableSelectionListener); }//end init() private void createReceiptInfoComposite() { //get fontmanager instance FontManager fontManager = FontManager.getInstance(this); //create receipt info composite receiptInfo = new Composite(centerStack, SWT.NORMAL); receiptInfo.setBackground(getBackground()); GridLayout gridLayout = new GridLayout(); gridLayout.numColumns = 2; gridLayout.verticalSpacing = 10; receiptInfo.setLayout(gridLayout); // create receipt info header label receiptIDText= new Label(receiptInfo, SWT.LEFT); receiptIDText.setFont(fontManager.getDefaultBoldFont()); receiptIDText.setBackground(getBackground()); GridData receiptIDTextData = new GridData(); receiptIDTextData.horizontalAlignment = GridData.BEGINNING; receiptIDTextData.verticalAlignment = GridData.CENTER; receiptIDText.setLayoutData(receiptIDTextData); receiptIDText.setText(language.getString( "ui.plugin.receipt.findreceipt.receiptid.text", "Receipt:")); receiptId = new Label(receiptInfo, SWT.LEFT); receiptId.setBackground(getBackground()); GridData receiptIdData = new GridData(); receiptIdData.horizontalAlignment = GridData.BEGINNING; receiptIdData.verticalAlignment = GridData.CENTER; receiptId.setLayoutData(receiptIdData); receiptDateText= new Label(receiptInfo, SWT.RIGHT); receiptDateText.setFont(fontManager.getDefaultBoldFont()); receiptDateText.setBackground(getBackground()); GridData receiptDateTextData = new GridData(); receiptDateTextData.horizontalAlignment = GridData.BEGINNING; receiptDateTextData.verticalAlignment = GridData.CENTER; receiptDateText.setLayoutData(receiptDateTextData); receiptDateText.setText(language.getString( "ui.plugin.receipt.findreceipt.date.text", "Date:")); receiptDate = new Label(receiptInfo, SWT.RIGHT); receiptDate.setBackground(getBackground()); GridData receiptDateData = new GridData(); receiptDateData.horizontalAlignment = GridData.BEGINNING; receiptDateData.verticalAlignment = GridData.CENTER; receiptDate.setLayoutData(receiptDateData); receiptAmountText = new Label(receiptInfo, SWT.LEFT); receiptAmountText.setFont(fontManager.getDefaultBoldFont()); receiptAmountText.setBackground(getBackground()); GridData receiptAmountTextData = new GridData(); receiptAmountTextData.horizontalAlignment = GridData.BEGINNING; receiptAmountTextData.verticalAlignment = GridData.CENTER; receiptAmountText.setLayoutData(receiptAmountTextData); receiptAmountText.setText(language.getString( "ui.plugin.receipt.findreceipt.subtotal.text", "Total:")); receiptAmount = new Label(receiptInfo, SWT.LEFT); receiptAmount.setBackground(getBackground()); GridData receiptAmountData = new GridData(); receiptAmountData.horizontalAlignment = GridData.BEGINNING; receiptAmountData.verticalAlignment = GridData.CENTER; receiptAmount.setLayoutData(receiptAmountData); receiptCashierText = new Label(receiptInfo, SWT.LEFT); receiptCashierText.setFont(fontManager.getDefaultBoldFont()); receiptCashierText.setBackground(getBackground()); GridData receiptCashierTextData = new GridData(); receiptCashierTextData.horizontalAlignment = GridData.BEGINNING; receiptCashierTextData.verticalAlignment = GridData.CENTER; receiptCashierText.setLayoutData(receiptCashierTextData); receiptCashierText.setText(language.getString( "ui.plugin.receipt.findreceipt.cashier.text", "Cashier:")); receiptCashier = new Label(receiptInfo, SWT.LEFT); receiptCashier.setBackground(getBackground()); GridData receiptCashierData = new GridData(); receiptCashierData.horizontalAlignment = GridData.BEGINNING; receiptCashierData.verticalAlignment = GridData.CENTER; receiptCashierData.grabExcessHorizontalSpace = true; receiptCashier.setLayoutData(receiptCashierData); //create composite for the buttons Composite buttonComposite = new Composite(receiptInfo, SWT.NORMAL); buttonComposite.setLayout(new FillLayout()); GridData buttonCompositeData = new GridData(); buttonCompositeData.horizontalAlignment = GridData.CENTER; buttonCompositeData.verticalAlignment = GridData.END; buttonCompositeData.horizontalSpan = 2; buttonCompositeData.grabExcessVerticalSpace = true; buttonComposite.setLayoutData(buttonCompositeData); //back button receiptInfoBackButton = new Button(buttonComposite, SWT.PUSH); receiptInfoBackButton.setText(language.getString( "ui.plugin.receipt.findreceipt.string1.text", "Back")); receiptInfoBackButton.setBackground(receiptInfo.getBackground()); Listener backButtonListener = new Listener() { public void handleEvent(Event arg0) { receiptInfoBackSelected(); } }; receiptInfoBackButton.addListener(SWT.Selection, backButtonListener); //add to receipt button receiptInfoToRegisterButton = new Button(buttonComposite, SWT.PUSH); receiptInfoToRegisterButton.setText(language.getString( "ui.plugin.receipt.findreceipt.string2.text", "Continue")); receiptInfoToRegisterButton.setBackground(receiptInfo.getBackground()); Listener toRegisterButtonListener = new Listener() { public void handleEvent(Event arg0) { receiptInfoToRegisterSelected(); } }; receiptInfoToRegisterButton.addListener(SWT.Selection, toRegisterButtonListener); //add traverse listeners to handle focus order TraverseListener backButtonTraverseListener = new TraverseListener() { public void keyTraversed(TraverseEvent e) { if(e.detail == SWT.TRAVERSE_TAB_NEXT || e.detail == SWT.TRAVERSE_TAB_PREVIOUS) { receiptInfoToRegisterButton.setFocus(); e.doit = false; } } }; receiptInfoBackButton.addTraverseListener(backButtonTraverseListener); TraverseListener toRegisterButtonTraverseListener = new TraverseListener() { public void keyTraversed(TraverseEvent e) { if(e.detail == SWT.TRAVERSE_TAB_NEXT || e.detail == SWT.TRAVERSE_TAB_PREVIOUS) { receiptInfoBackButton.setFocus(); e.doit = false; } } }; receiptInfoToRegisterButton.addTraverseListener(toRegisterButtonTraverseListener); } /** * Invoked when user selects the back button in the product info composite * */ private void receiptInfoBackSelected() { stack.topControl = receiptTable; centerStack.layout(); } /** * Invoked when user selects the 'to register' button in the product info composite * */ private void receiptInfoToRegisterSelected() { ReceiptTableItemData receipt = getSelectedReceipt(); listener.addReceiptSelected(receipt); } public void setInputValue(String value) { inputField.setText(value); } public void setFocusInInput() { inputField.setFocus(); } public void setFocusInTable() { receiptTable.setFocus(); } public void clearTable() { receiptTable.removeAll(); } /** * Invoked when user presses enter in the input field. * Calls listeners findSelected(..) method */ private void findSelected() { String value = inputField.getText(); listener.findSelected(value); } public interface FindReceiptUIListener { public void findSelected(String value); public void addReceiptSelected(ReceiptTableItemData receipt); } /** * Adds a receipt to table * * @param receipt, amount */ public void addReceipt(ReceiptData receipt, Amount amount) { // create a new table item TableItem newItem = new TableItem(receiptTable, SWT.NONE); String date = receipt.getAddedDate().toString(); String[] text = {receipt.getReceiptId(), date, receipt.getCashier()}; newItem.setText(text); // newItem.setData(new ReceiptTableItemData(receipt, receiptRow)); newItem.setData(new ReceiptTableItemData(receipt, amount)); } /** * Shows more info about product at given table index * * @param tableIndex */ public void showReceipt(int tableIndex) { // get selected table item TableItem item = receiptTable.getItem(tableIndex); if(item != null) { // get receipt data ReceiptTableItemData receipt = (ReceiptTableItemData)item.getData(); // set receipt info receiptId.setText(receipt.receiptData.getReceiptId()); SimpleDateFormat sdf = new SimpleDateFormat("yyMMd hh:mm:ss"); String date = sdf.format(receipt.receiptData.getAddedDate()); receiptDate.setText(date); receiptCashier.setText(receipt.receiptData.getCashier()); receiptAmount.setText(receipt.amountTotal.toString()); receiptInfo.layout(); // show product info stack.topControl = receiptInfo; centerStack.layout(); receiptInfoToRegisterButton.setFocus(); } } /** * Returns the product that is selected in the table * * @return */ public ReceiptTableItemData getSelectedReceipt() { int index = receiptTable.getSelectionIndex(); if(index != -1) { // get selected table item TableItem item = receiptTable.getItem(index); // get product data ReceiptTableItemData receipt = (ReceiptTableItemData)item.getData(); return receipt; } else return null; } /** * Inner public class representing the receipt data inside a table item * * @author anba */ public class ReceiptTableItemData { public ReceiptData receiptData; public String recId; public Amount amountTotal; public ReceiptTableItemData(ReceiptData receipt, Amount amount) { receiptData = receipt; recId = receipt.getReceiptId(); amountTotal = amount; } } } |
From: Anneli <an...@us...> - 2005-01-11 17:11:50
|
Update of /cvsroot/redpos/RedPOS/src/org/redpos/client/ui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11881/src/org/redpos/client/ui Modified Files: POSDashboardHome.java Log Message: New function, save and find receipt Index: POSDashboardHome.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/POSDashboardHome.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** POSDashboardHome.java 23 Nov 2004 16:02:09 -0000 1.1 --- POSDashboardHome.java 11 Jan 2005 17:11:40 -0000 1.2 *************** *** 197,200 **** --- 197,201 ---- { ReceiptNotificationData data = (ReceiptNotificationData)n.getUserData(); + if(data.receiptRow == null) { *************** *** 205,210 **** ProductReceiptRow prr = (ProductReceiptRow)data.receiptRow; setHeaderText(prr.getText()); ! setSaleSupportText(prr.getProduct().getSalesupport()); ! // create sale info string final ReceiptRow rr = data.receiptRow; --- 206,218 ---- ProductReceiptRow prr = (ProductReceiptRow)data.receiptRow; setHeaderText(prr.getText()); ! try ! { ! setSaleSupportText(prr.getProduct().getSalesupport()); ! } ! catch (Exception e) ! { ! setSaleSupportText(""); ! } ! // create sale info string final ReceiptRow rr = data.receiptRow; |
From: Anneli <an...@us...> - 2005-01-11 17:02:57
|
Update of /cvsroot/redpos/RedPOS/src/org/redpos/client/device In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10002/src/org/redpos/client/device Modified Files: ReceiptPrinter.java ReceiptPrinterRowFactory.java Log Message: Row with signature if the receipt is of type return Index: ReceiptPrinterRowFactory.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/device/ReceiptPrinterRowFactory.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ReceiptPrinterRowFactory.java 23 Nov 2004 16:02:06 -0000 1.1 --- ReceiptPrinterRowFactory.java 11 Jan 2005 17:02:46 -0000 1.2 *************** *** 530,533 **** --- 530,549 ---- return row.toString(); } + + /** + * Returns a signature row + * + * @return + */ + public String getSignatureRow() + { + StringBuffer row = new StringBuffer(); + row.append(NEW_LINE); + row.append(NEW_LINE); + row.append(centerString(lang.getString( + "client.receiptprinter.signature.text", "Signature ....................."))); + row.append(NEW_LINE); + return row.toString(); + } } \ No newline at end of file Index: ReceiptPrinter.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/device/ReceiptPrinter.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ReceiptPrinter.java 23 Nov 2004 16:02:07 -0000 1.1 --- ReceiptPrinter.java 11 Jan 2005 17:02:46 -0000 1.2 *************** *** 302,306 **** { rowCount++; ! newFooterRow = (String)po.getProperty("receiptprinter", "receiptfooter" + rowCount); --- 302,306 ---- { rowCount++; ! newFooterRow = (String)po.getProperty("receiptprinter", "receiptfooter" + rowCount); *************** *** 540,547 **** } } // add footer receipt.append(receiptFooter); ! // print receipt try --- 540,551 ---- } } + + // add signature row if receipt is of type return + if (data.receiptType == ReceiptConstants.TYPE_RECEIPT_RETURN) + receipt.append(rowFactory.getSignatureRow()); // add footer receipt.append(receiptFooter); ! // print receipt try *************** *** 559,562 **** --- 563,570 ---- // keep hold of the just printed receipt previousReceipt = receipt; + + // if receipt is of type retrun print another copy + if (data.receiptType == ReceiptConstants.TYPE_RECEIPT_RETURN) + printPreviousReceipt(); receipt = new StringBuffer(); |
From: Lennart P. <le...@us...> - 2005-01-11 13:58:31
|
Update of /cvsroot/redpos/RedPOS_third_party/jboss/bin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32322/jboss/bin Modified Files: run.sh Log Message: Do not allow more than one started Redpos Index: run.sh =================================================================== RCS file: /cvsroot/redpos/RedPOS_third_party/jboss/bin/run.sh,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** run.sh 1 Dec 2004 09:06:05 -0000 1.3 --- run.sh 11 Jan 2005 13:58:22 -0000 1.4 *************** *** 70,73 **** --- 70,92 ---- + # lenp Test RedPOS lock file + echo + if [ ! -f "$JBOSS_HOME/bin/redpos.lck" ]; then + echo RedPOS > "$JBOSS_HOME/bin/redpos.lck" + else + echo "================================================================================" + echo "" + echo " RedPOS already started" + echo "" + echo " If you are sure that it is not running, please remove $JBOSS_HOME/bin/redpos.lck" + echo "" + echo " This message will be gone in 10 seconds..." + echo "" + echo "================================================================================" + echo "" + sleep 10 + exit 1 + fi + # Increase the maximum file descriptors if we can if [ "$cygwin" = "false" ]; then *************** *** 196,198 **** # http://developer.java.sun.com/developer/bugParade/bugs/4465334.html done ! fi --- 215,221 ---- # http://developer.java.sun.com/developer/bugParade/bugs/4465334.html done ! # lenp Remove RedPOS lock file if exists ! if [ -f $JBOSS_HOME/bin/redpos.lck ]; then ! rm $JBOSS_HOME/bin/redpos.lck ! fi ! ffi |
From: Lennart P. <le...@us...> - 2005-01-11 13:09:03
|
Update of /cvsroot/redpos/RedPOS_third_party/jboss/bin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22442/jboss/bin Modified Files: run.conf Log Message: Removed unrelevant settings Index: run.conf =================================================================== RCS file: /cvsroot/redpos/RedPOS_third_party/jboss/bin/run.conf,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** run.conf 1 Dec 2004 08:33:09 -0000 1.1 --- run.conf 11 Jan 2005 13:08:50 -0000 1.2 *************** *** 47,50 **** #JAVA_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y $JAVA_OPTS" - # lepe - JAVA_OPTS=" -Djava.library.path=/home/lenp/jboss-3.2.3/lib $JAVA_OPTS" --- 47,48 ---- |
From: Lennart P. <le...@us...> - 2005-01-11 11:32:23
|
Update of /cvsroot/redpos/RedPOS/src/org/redpos/client/receipt In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4464/src/org/redpos/client/receipt Modified Files: ReceiptSession.java Log Message: Added backup of finished receipts to file Index: ReceiptSession.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/receipt/ReceiptSession.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ReceiptSession.java 23 Nov 2004 16:02:31 -0000 1.1 --- ReceiptSession.java 11 Jan 2005 11:32:12 -0000 1.2 *************** *** 24,27 **** --- 24,32 ---- package org.redpos.client.receipt; + import java.io.File; + import java.io.FileNotFoundException; + import java.io.FileOutputStream; + import java.io.IOException; + import java.io.PrintStream; import java.util.Calendar; import java.util.Date; *************** *** 33,36 **** --- 38,42 ---- import java.util.Vector; + import javax.management.JMException; import javax.management.Notification; import javax.management.ObjectName; *************** *** 59,62 **** --- 65,69 ---- * @version <tt>$$Revision$$</tt> * @author <a>mats</a> + * @author <a href="mailto:le...@us...">lenp</a> */ public class ReceiptSession extends ServiceMBeanSupport implements *************** *** 104,107 **** --- 111,137 ---- /** + * Signature of parameters used when finding receiptrows + */ + private String signatureFindByReceiptId[] = {"java.lang.String"}; + + /** + * Parameters used when finding receiptrows + */ + private Object paramsFindByReceiptId[] = new Object[1]; + + /** + * File to backup to + */ + private File backupFile; + /** + * Used during backup + */ + private FileOutputStream backupFileOutputStream; + /** + * Used during backup + */ + private PrintStream backupPrintStream; + + /** * */ *************** *** 483,486 **** --- 513,519 ---- fireNotification(ReceiptConstants.NOTIFICATION_RECEIPT_CLOSED, data); + // TODO Remove when hsqldb has been removed or secured + backupReceipt(); + // clear attributes reset(); *************** *** 503,506 **** --- 536,655 ---- /** + * Backup receipts in local backup file + */ + private void backupReceipt() + { + // Iterate all rows and print them to file + Vector rows = getRows(); + ReceiptRowData rowData; + StringBuffer line = new StringBuffer(); + for(Iterator iter = rows.iterator(); iter.hasNext();) + { + rowData = (ReceiptRowData)iter.next(); + + // ******************************** + // Head info + // RECEIPT_ID;ADDED_DATE;CASHIER;STATUS;TYPE + // ******************************** + line.append(getReceiptId()); + line.append(";"); + + line.append(getAddedDate()); + line.append(";"); + + line.append(getCashier()); + line.append(";"); + + line.append(getReceiptStatus()); + line.append(";"); + + line.append(getReceiptType()); + line.append(";"); + + // ******************************** + // Row info + // ORDER;TYPE;STATUS;OBJECT;TEXT;QUANTITY;AMOUNT;TAX_AMOUNT;TAX_PERCENTAGE;REFERENCE + // ******************************** + line.append(rowData.getOrder()); + line.append(";"); + + line.append(rowData.getType()); + line.append(";"); + + line.append(rowData.getStatus()); + line.append(";"); + + line.append(rowData.getObject()); + line.append(";"); + + line.append(rowData.getText()); + line.append(";"); + + line.append(rowData.getQuantity()); + line.append(";"); + + line.append(rowData.getAmount()); + line.append(";"); + + line.append(rowData.getTaxAmount()); + line.append(";"); + + line.append(rowData.getTaxPercentage()); + line.append(";"); + + line.append(rowData.getReference()); + line.append(";"); + + backupPrintStream.println(line.toString()); + line.delete(0, line.length()); + } + + } + + /** + * Create backup file. Will be created in JBoss start directory. Format of file name is nnn-backup.txt + * where nnn is id of the register + */ + private void createBackupFile() + { + StringBuffer outputFile = new StringBuffer(); + + PropertiesUtility po = new PropertiesUtility(this.getServer()); + + try + { + outputFile.append(po.getProperty("pos","registerid")); + } + catch(JMException e1) + { + log.error(e1.getMessage(), e1); + outputFile.append("null"); + } + outputFile.append("-backup.txt"); + backupFile = new File(outputFile.toString()); + try + { + if(backupFile.exists()) + log.info("Backup file " + backupFile + " exists, appending to it"); + else + { + log.info("Creating new backup file " + backupFile); + backupFile.createNewFile(); + } + backupFileOutputStream = new FileOutputStream(backupFile,true); + backupPrintStream = new PrintStream(backupFileOutputStream); + } + catch(FileNotFoundException e) + { + log.error(e.getMessage(), e); + } + catch(IOException e) + { + log.error(e.getMessage(), e); + } + + } + + /** * Counts tax for current receipts. Creates tax rows and adds them to the * receipt. *************** *** 1297,1300 **** --- 1446,1452 ---- getLog().debug("Language loaded: " + language); + + // Create backup file + createBackupFile(); } catch(Exception e) *************** *** 1328,1331 **** --- 1480,1500 ---- } + /* (non-Javadoc) + * @see org.jboss.system.ServiceMBeanSupport#stopService() + */ + protected void stopService() throws Exception + { + // Close backup file + try + { + backupPrintStream.close(); + backupFileOutputStream.close(); + } + catch(Exception e) + { + log.warn(e.getMessage(), e); + } + } + /** * |
From: Anneli <an...@us...> - 2005-01-11 09:29:07
|
Update of /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin/function In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10728/src/org/redpos/client/ui/plugin/function Modified Files: PaymentSelection.java Log Message: ENTER is now working when selecting payment and OS is Windows Index: PaymentSelection.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin/function/PaymentSelection.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** PaymentSelection.java 23 Nov 2004 16:02:26 -0000 1.1 --- PaymentSelection.java 11 Jan 2005 09:28:58 -0000 1.2 *************** *** 148,152 **** public void keyPressed(KeyEvent e) { ! if(e.character == SWT.ESC) cancelSelected(); } --- 148,156 ---- public void keyPressed(KeyEvent e) { ! if(e.character == SWT.CR || e.character == SWT.KEYPAD_CR) ! { ! okSelected(); ! } ! else if(e.character == SWT.ESC) cancelSelected(); } |
From: Anneli <an...@us...> - 2005-01-11 09:27:33
|
Update of /cvsroot/redpos/RedPOS/src/org/redpos/auth In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10218/src/org/redpos/auth Modified Files: POSLoginModule.java Log Message: Login with only username is now possible Index: POSLoginModule.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/auth/POSLoginModule.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** POSLoginModule.java 23 Nov 2004 16:01:59 -0000 1.1 --- POSLoginModule.java 11 Jan 2005 09:26:49 -0000 1.2 *************** *** 140,143 **** --- 140,146 ---- if(password == null) password = ""; + + if (user.getPassword() == null) + user.setPassword(""); if(!password.equals(user.getPassword())) |
From: Anneli <an...@us...> - 2005-01-11 09:27:20
|
Update of /cvsroot/redpos/RedPOS/db/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10218/db/scripts Modified Files: localDB.script Log Message: Login with only username is now possible Index: localDB.script =================================================================== RCS file: /cvsroot/redpos/RedPOS/db/scripts/localDB.script,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** localDB.script 27 Dec 2004 22:35:05 -0000 1.2 --- localDB.script 11 Jan 2005 09:26:50 -0000 1.3 *************** *** 4,8 **** CREATE CACHED TABLE RPRCPTRW(RECEIPTID VARCHAR NOT NULL,ROWORDER INTEGER NOT NULL,ROWTYPE INTEGER NOT NULL,ROWREF INTEGER,ROWOBJECT VARCHAR,ROWTEXT VARCHAR NOT NULL,QUANTITY DOUBLE NOT NULL,AMOUNT DOUBLE,CURRENCY VARCHAR,TAXPERCENTAGE DOUBLE,TAXAMOUNT DOUBLE,ROWSTATUS INTEGER NOT NULL,CONSTRAINT SYS_PK_RPRCPTRW PRIMARY KEY(RECEIPTID,ROWORDER),CONSTRAINT SYS_CT_7 UNIQUE(RECEIPTID,ROWORDER)) CREATE TABLE RPIDS(IDNAME VARCHAR NOT NULL,KEY VARCHAR NOT NULL,VALUE VARCHAR,CONSTRAINT SYS_PK_RPIDS PRIMARY KEY(IDNAME,KEY),CONSTRAINT SYS_CT_9 UNIQUE(IDNAME,KEY)) ! CREATE CACHED TABLE RPUSERS(USERID VARCHAR NOT NULL,USERNAME VARCHAR NOT NULL,NAME VARCHAR,PASSWORD VARCHAR NOT NULL,ALTID VARCHAR,CONSTRAINT SYS_PK_RPUSERS PRIMARY KEY(USERID,USERNAME),CONSTRAINT SYS_CT_11 UNIQUE(USERID,USERNAME)) CREATE CACHED TABLE RPTALLY(TALLYID VARCHAR NOT NULL PRIMARY KEY,REGISTERID VARCHAR NOT NULL,STOREID VARCHAR NOT NULL,CREATEDBY VARCHAR NOT NULL,CREATEDDATE TIMESTAMP NOT NULL,FROMRECEIPTID VARCHAR NOT NULL,TORECEIPTID VARCHAR NOT NULL,FROMRECEIPTDATE TIMESTAMP NOT NULL,TORECEIPTDATE TIMESTAMP NOT NULL,CASHIERS VARCHAR NOT NULL,UPLOADED BIT,CONSTRAINT SYS_CT_13 UNIQUE(TALLYID)) CREATE CACHED TABLE RPTALRW(TALLYID VARCHAR NOT NULL,ROWNUMBER INTEGER NOT NULL,TYPE VARCHAR NOT NULL,ID VARCHAR,AMOUNT DOUBLE,CURRENCY VARCHAR,RECEIPTCOUNT INTEGER,TAXPERCENTAGE DOUBLE,DATA VARCHAR,CONSTRAINT SYS_PK_RPTALRW PRIMARY KEY(TALLYID,ROWNUMBER),CONSTRAINT SYS_CT_15 UNIQUE(TALLYID,ROWNUMBER)) --- 4,8 ---- CREATE CACHED TABLE RPRCPTRW(RECEIPTID VARCHAR NOT NULL,ROWORDER INTEGER NOT NULL,ROWTYPE INTEGER NOT NULL,ROWREF INTEGER,ROWOBJECT VARCHAR,ROWTEXT VARCHAR NOT NULL,QUANTITY DOUBLE NOT NULL,AMOUNT DOUBLE,CURRENCY VARCHAR,TAXPERCENTAGE DOUBLE,TAXAMOUNT DOUBLE,ROWSTATUS INTEGER NOT NULL,CONSTRAINT SYS_PK_RPRCPTRW PRIMARY KEY(RECEIPTID,ROWORDER),CONSTRAINT SYS_CT_7 UNIQUE(RECEIPTID,ROWORDER)) CREATE TABLE RPIDS(IDNAME VARCHAR NOT NULL,KEY VARCHAR NOT NULL,VALUE VARCHAR,CONSTRAINT SYS_PK_RPIDS PRIMARY KEY(IDNAME,KEY),CONSTRAINT SYS_CT_9 UNIQUE(IDNAME,KEY)) ! CREATE CACHED TABLE RPUSERS(USERID VARCHAR NOT NULL,USERNAME VARCHAR NOT NULL,NAME VARCHAR,PASSWORD VARCHAR,ALTID VARCHAR,CONSTRAINT SYS_PK_RPUSERS PRIMARY KEY(USERID,USERNAME),CONSTRAINT SYS_CT_11 UNIQUE(USERID,USERNAME)) CREATE CACHED TABLE RPTALLY(TALLYID VARCHAR NOT NULL PRIMARY KEY,REGISTERID VARCHAR NOT NULL,STOREID VARCHAR NOT NULL,CREATEDBY VARCHAR NOT NULL,CREATEDDATE TIMESTAMP NOT NULL,FROMRECEIPTID VARCHAR NOT NULL,TORECEIPTID VARCHAR NOT NULL,FROMRECEIPTDATE TIMESTAMP NOT NULL,TORECEIPTDATE TIMESTAMP NOT NULL,CASHIERS VARCHAR NOT NULL,UPLOADED BIT,CONSTRAINT SYS_CT_13 UNIQUE(TALLYID)) CREATE CACHED TABLE RPTALRW(TALLYID VARCHAR NOT NULL,ROWNUMBER INTEGER NOT NULL,TYPE VARCHAR NOT NULL,ID VARCHAR,AMOUNT DOUBLE,CURRENCY VARCHAR,RECEIPTCOUNT INTEGER,TAXPERCENTAGE DOUBLE,DATA VARCHAR,CONSTRAINT SYS_PK_RPTALRW PRIMARY KEY(TALLYID,ROWNUMBER),CONSTRAINT SYS_CT_15 UNIQUE(TALLYID,ROWNUMBER)) |
From: Anneli <an...@us...> - 2005-01-10 15:24:18
|
Update of /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin/function In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10601/src/org/redpos/client/ui/plugin/function Modified Files: FindProduct.java FindProductUI.java Log Message: New property which states how many characters is used in productsearch Index: FindProductUI.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin/function/FindProductUI.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FindProductUI.java 23 Nov 2004 16:02:27 -0000 1.1 --- FindProductUI.java 10 Jan 2005 15:23:57 -0000 1.2 *************** *** 86,89 **** --- 86,91 ---- private Label productInfoSalesupport; + + private Integer productSearch; /** *************** *** 91,95 **** */ public FindProductUI(Composite parent, Language language, ! FindProductUIListener listener) { super(parent, SWT.NORMAL); --- 93,97 ---- */ public FindProductUI(Composite parent, Language language, ! FindProductUIListener listener, Integer productSearchInput) { super(parent, SWT.NORMAL); *************** *** 99,102 **** --- 101,105 ---- setBackground(parent.getBackground()); + productSearch = productSearchInput; init(); *************** *** 140,151 **** inputField.setLayoutData(inputFieldGridData); //inputField.setFont(fontManager.getInputFieldFont()); ! // create input field key listener KeyListener keyListener = new KeyAdapter() { - public void keyReleased(KeyEvent event) { ! if(inputField.getText().length() > 0) findSelected(); } --- 143,153 ---- inputField.setLayoutData(inputFieldGridData); //inputField.setFont(fontManager.getInputFieldFont()); ! // create input field key listener KeyListener keyListener = new KeyAdapter() { public void keyReleased(KeyEvent event) { ! if(inputField.getText().length() > (productSearch.intValue()-1)) findSelected(); } *************** *** 517,521 **** if(product.productData.getProductId() != null) ! productInfoId.setText(product.productData.getProductId()); else productInfoId.setText(""); --- 519,523 ---- if(product.productData.getProductId() != null) ! productInfoId.setText(product.productData.getBarcode1()); else productInfoId.setText(""); Index: FindProduct.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin/function/FindProduct.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FindProduct.java 14 Dec 2004 08:25:50 -0000 1.2 --- FindProduct.java 10 Jan 2005 15:23:42 -0000 1.3 *************** *** 60,63 **** --- 60,65 ---- private String defaultPricelistId; + + private Integer productSearchInput; private UserInputUI userInput; *************** *** 77,81 **** */ ui = null; ! ui = new FindProductUI(parent, language, this); parent.layout(); return true; --- 79,83 ---- */ ui = null; ! ui = new FindProductUI(parent, language, this, productSearchInput); parent.layout(); return true; *************** *** 180,186 **** defaultPricelistId = (String)po.getProperty("pos", "defaultpricelist"); } ! ! /** * Invoked by the FindProductUI * --- 182,190 ---- defaultPricelistId = (String)po.getProperty("pos", "defaultpricelist"); + + productSearchInput = (Integer)po.getProperty("pos", "productsearchinput"); } ! ! /** * Invoked by the FindProductUI * |
From: Anneli <an...@us...> - 2005-01-10 15:24:13
|
Update of /cvsroot/redpos/RedPOS/conf In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10601/conf Modified Files: properties.xml Log Message: New property which states how many characters is used in productsearch Index: properties.xml =================================================================== RCS file: /cvsroot/redpos/RedPOS/conf/properties.xml,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** properties.xml 3 Jan 2005 12:09:04 -0000 1.5 --- properties.xml 10 Jan 2005 15:23:57 -0000 1.6 *************** *** 22,25 **** --- 22,26 ---- <property name="loginperreceipt" type="java.lang.Boolean">true</property> <property name="defaultpricelist" type="java.lang.String">1000001</property> + <property name="productSearchInput" type="java.lang.Integer">2</property> <property name="tallyreportservice" type="java.lang.String">RedPOS.client.tally.report:service=BasicReport</property> <property name="reportprintername" type="java.lang.String">apoc</property> |
From: Anneli <an...@us...> - 2005-01-10 14:54:24
|
Update of /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin/function In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4753/src/org/redpos/client/ui/plugin/function Modified Files: OpenCashDrawer.java CancelReceipt.java MakeTallyAndReport.java Log Message: New function Login per receipt Index: CancelReceipt.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin/function/CancelReceipt.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CancelReceipt.java 23 Nov 2004 16:02:27 -0000 1.1 --- CancelReceipt.java 10 Jan 2005 14:54:05 -0000 1.2 *************** *** 24,31 **** --- 24,33 ---- package org.redpos.client.ui.plugin.function; + import javax.management.JMException; import javax.management.MBeanException; import javax.management.ObjectName; import org.eclipse.swt.widgets.Composite; + import org.redpos.client.contract.POSEngineUtility; import org.redpos.client.contract.receipt.ReceiptException; import org.redpos.client.ui.plugin.*; *************** *** 45,48 **** --- 47,51 ---- CancelReceiptMBean { + private POSEngineUtility posEngineUtility = null; /** *************** *** 80,83 **** --- 83,97 ---- PluginFunctionConstants.NOTIFICATION_FUNCTION_FINISHED, null); + try + { + if (posEngineUtility.getLoginPerReceipt()) + { + fireNotification(PluginFunctionConstants.NOTIFICATION_LOGIN_PER_RECEIPT, null); + } + } + catch(JMException e) + { + log.error(e.getMessage(), e); + } break; *************** *** 197,200 **** --- 211,215 ---- setText(getLanguageString("ui.plugin.receipt.cancel.text", "Cancel receipt")); + posEngineUtility = new POSEngineUtility(getServer()); } Index: MakeTallyAndReport.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin/function/MakeTallyAndReport.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MakeTallyAndReport.java 17 Dec 2004 12:10:47 -0000 1.2 --- MakeTallyAndReport.java 10 Jan 2005 14:54:05 -0000 1.3 *************** *** 92,95 **** --- 92,106 ---- PluginFunctionConstants.NOTIFICATION_FUNCTION_FINISHED, null); + try + { + if (posEngineUtility.getLoginPerReceipt()) + { + fireNotification(PluginFunctionConstants.NOTIFICATION_LOGIN_PER_RECEIPT, null); + } + } + catch(JMException e) + { + log.error(e.getMessage(), e); + } break; } Index: OpenCashDrawer.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin/function/OpenCashDrawer.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** OpenCashDrawer.java 23 Nov 2004 16:02:27 -0000 1.1 --- OpenCashDrawer.java 10 Jan 2005 14:54:05 -0000 1.2 *************** *** 24,30 **** --- 24,32 ---- package org.redpos.client.ui.plugin.function; + import javax.management.JMException; import javax.management.ObjectName; import org.eclipse.swt.widgets.Composite; + import org.redpos.client.contract.POSEngineUtility; import org.redpos.client.ui.plugin.*; import org.redpos.client.ui.plugin.contract.PluginFunctionConstants; *************** *** 43,46 **** --- 45,49 ---- OpenCashDrawerMBean { + private POSEngineUtility posEngineUtility = null; /** *************** *** 54,57 **** --- 57,71 ---- fireNotification(PluginFunctionConstants.NOTIFICATION_FUNCTION_FINISHED, null); + try + { + if (posEngineUtility.getLoginPerReceipt()) + { + fireNotification(PluginFunctionConstants.NOTIFICATION_LOGIN_PER_RECEIPT, null); + } + } + catch(JMException e) + { + log.error(e.getMessage(), e); + } return true; *************** *** 101,104 **** --- 115,119 ---- setText(getLanguageString("ui.plugin.checkout.opendrawer.text", "Open drawer")); + posEngineUtility = new POSEngineUtility(getServer()); } |
From: Anneli <an...@us...> - 2005-01-03 13:05:04
|
Update of /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin/function In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11422/src/org/redpos/client/ui/plugin/function Modified Files: PrintReceiptAgain.java Log Message: New function Login per receipt Index: PrintReceiptAgain.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin/function/PrintReceiptAgain.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** PrintReceiptAgain.java 23 Nov 2004 16:02:27 -0000 1.1 --- PrintReceiptAgain.java 3 Jan 2005 13:04:54 -0000 1.2 *************** *** 24,30 **** --- 24,32 ---- package org.redpos.client.ui.plugin.function; + import javax.management.JMException; import javax.management.ObjectName; import org.eclipse.swt.widgets.Composite; + import org.redpos.client.contract.POSEngineUtility; import org.redpos.client.lang.contract.Language; import org.redpos.client.ui.plugin.*; *************** *** 45,48 **** --- 47,53 ---- { private Language language; + + private POSEngineUtility posEngineUtility; + /** *************** *** 64,67 **** --- 69,83 ---- PluginFunctionConstants.NOTIFICATION_FUNCTION_FINISHED, null); + try + { + if (posEngineUtility.getLoginPerReceipt()) + { + fireNotification(PluginFunctionConstants.NOTIFICATION_LOGIN_PER_RECEIPT, null); + } + } + catch(JMException e) + { + log.error(e.getMessage(), e); + } break; *************** *** 146,150 **** language = getLanguage(); ! setText(language.getString("ui.plugin.receipt.printreceiptagain.text", "Print receipt again")); --- 162,167 ---- language = getLanguage(); ! posEngineUtility = new POSEngineUtility(getServer()); ! setText(language.getString("ui.plugin.receipt.printreceiptagain.text", "Print receipt again")); |
From: Anneli <an...@us...> - 2005-01-03 12:15:48
|
Update of /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin/function In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2439/src/org/redpos/client/ui/plugin/function Modified Files: TotalDiscountAmount.java RowDiscountAmount.java TotalDiscountPercent.java RowDiscountPercent.java Log Message: Problems when pressing ENTER with empty row in discount is now fixed, bug 1093257 Index: RowDiscountPercent.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin/function/RowDiscountPercent.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** RowDiscountPercent.java 23 Nov 2004 16:02:26 -0000 1.1 --- RowDiscountPercent.java 3 Jan 2005 12:15:34 -0000 1.2 *************** *** 120,135 **** // get user input String in = input.getInput(); ! // convert to percent ! double percent = Double.valueOf(in).doubleValue(); ! percent = percent / 100; ! ! // calls POS engine method and add the discount ! boolean ok = addRowDiscount(new Double(percent)); ! if(ok) ! // function is finished, notify listeners ! fireNotification( ! PluginFunctionConstants.NOTIFICATION_FUNCTION_FINISHED, null); } --- 120,138 ---- // get user input String in = input.getInput(); + + if (in.length() != 0) + { + // convert to percent + double percent = Double.valueOf(in).doubleValue(); + percent = percent / 100; ! // calls POS engine method and add the discount ! boolean ok = addRowDiscount(new Double(percent)); ! if(ok) ! // function is finished, notify listeners ! fireNotification( ! PluginFunctionConstants.NOTIFICATION_FUNCTION_FINISHED, null); ! } } Index: RowDiscountAmount.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin/function/RowDiscountAmount.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** RowDiscountAmount.java 23 Nov 2004 16:02:27 -0000 1.1 --- RowDiscountAmount.java 3 Jan 2005 12:15:34 -0000 1.2 *************** *** 120,134 **** // get user input String in = input.getInput(); ! // convert to amount ! Amount amount = new Amount(Double.valueOf(in).doubleValue()); ! ! // calls POS engine method and add the discount ! boolean ok = addRowDiscount(amount); ! if(ok) ! // function is finished, notify listeners ! fireNotification( ! PluginFunctionConstants.NOTIFICATION_FUNCTION_FINISHED, null); } --- 120,137 ---- // get user input String in = input.getInput(); + + if (in.length() != 0) + { + // convert to amount + Amount amount = new Amount(Double.valueOf(in).doubleValue()); ! // calls POS engine method and add the discount ! boolean ok = addRowDiscount(amount); ! if(ok) ! // function is finished, notify listeners ! fireNotification( ! PluginFunctionConstants.NOTIFICATION_FUNCTION_FINISHED, null); ! } } Index: TotalDiscountPercent.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin/function/TotalDiscountPercent.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TotalDiscountPercent.java 23 Nov 2004 16:02:27 -0000 1.1 --- TotalDiscountPercent.java 3 Jan 2005 12:15:34 -0000 1.2 *************** *** 138,153 **** // get user input String in = input.getInput(); ! // convert to double ! double percent = Double.valueOf(in).doubleValue(); ! percent = percent / 100; ! ! // calls POS engine method and add the discount ! boolean ok = addTotalDiscount(new Double(percent)); ! if(ok) ! // function is finished, notify listeners ! fireNotification( ! PluginFunctionConstants.NOTIFICATION_FUNCTION_FINISHED, null); } --- 138,156 ---- // get user input String in = input.getInput(); + + if (in.length() != 0) + { + // convert to double + double percent = Double.valueOf(in).doubleValue(); + percent = percent / 100; ! // calls POS engine method and add the discount ! boolean ok = addTotalDiscount(new Double(percent)); ! if(ok) ! // function is finished, notify listeners ! fireNotification( ! PluginFunctionConstants.NOTIFICATION_FUNCTION_FINISHED, null); ! } } Index: TotalDiscountAmount.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin/function/TotalDiscountAmount.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TotalDiscountAmount.java 23 Nov 2004 16:02:27 -0000 1.1 --- TotalDiscountAmount.java 3 Jan 2005 12:15:34 -0000 1.2 *************** *** 139,153 **** // get user input String in = input.getInput(); ! // convert to amount ! Amount amount = new Amount(Double.valueOf(in).doubleValue()); ! ! // calls POS engine method and add the discount ! boolean ok = addTotalDiscount(amount); ! if(ok) ! // function is finished, notify listeners ! fireNotification( ! PluginFunctionConstants.NOTIFICATION_FUNCTION_FINISHED, null); } --- 139,156 ---- // get user input String in = input.getInput(); + + if (in.length() != 0) + { + // convert to amount + Amount amount = new Amount(Double.valueOf(in).doubleValue()); ! // calls POS engine method and add the discount ! boolean ok = addTotalDiscount(amount); ! if(ok) ! // function is finished, notify listeners ! fireNotification( ! PluginFunctionConstants.NOTIFICATION_FUNCTION_FINISHED, null); ! } } |
From: Anneli <an...@us...> - 2005-01-03 12:09:24
|
Update of /cvsroot/redpos/RedPOS/conf In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1222/conf Modified Files: properties.xml Log Message: New types of payments Index: properties.xml =================================================================== RCS file: /cvsroot/redpos/RedPOS/conf/properties.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** properties.xml 30 Dec 2004 10:03:02 -0000 1.4 --- properties.xml 3 Jan 2005 12:09:04 -0000 1.5 *************** *** 98,101 **** --- 98,111 ---- <property name="CreditNoteLimitRepay" type="java.lang.Double">10000</property> + <property name="BonusCardIndex" type="java.lang.Integer">5</property> + <property name="BonusCardCode" type="java.lang.String">BONUSCARD</property> + <property name="BonusCardChangeAllowed" type="java.lang.Boolean">true</property> + <property name="BonusCardRepayAllowed" type="java.lang.Boolean">false</property> + <property name="BonusCardCancelAllowed" type="java.lang.Boolean">true</property> + <property name="BonusCardUpdateAllowed" type="java.lang.Boolean">true</property> + <property name="BonusCardLimit" type="java.lang.Double">10000</property> + <property name="BonusCardLimitChange" type="java.lang.Double">10000</property> + <property name="BonusCardLimitRepay" type="java.lang.Double">10000</property> + <property name="FlowerCardIndex" type="java.lang.Integer">6</property> <property name="FlowerCardCode" type="java.lang.String">FLOWERCARD</property> *************** *** 108,120 **** <property name="FlowerCardLimitRepay" type="java.lang.Double">10000</property> ! <property name="BonusCardIndex" type="java.lang.Integer">5</property> ! <property name="BonusCardCode" type="java.lang.String">BONUSCARD</property> ! <property name="BonusCardChangeAllowed" type="java.lang.Boolean">true</property> ! <property name="BonusCardRepayAllowed" type="java.lang.Boolean">false</property> ! <property name="BonusCardCancelAllowed" type="java.lang.Boolean">true</property> ! <property name="BonusCardUpdateAllowed" type="java.lang.Boolean">true</property> ! <property name="BonusCardLimit" type="java.lang.Double">10000</property> ! <property name="BonusCardLimitChange" type="java.lang.Double">10000</property> ! <property name="BonusCardLimitRepay" type="java.lang.Double">10000</property> </property-category> --- 118,171 ---- <property name="FlowerCardLimitRepay" type="java.lang.Double">10000</property> ! <property name="Pay1Index" type="java.lang.Integer">7</property> ! <property name="Pay1Code" type="java.lang.String">PAY1</property> ! <property name="Pay1ChangeAllowed" type="java.lang.Boolean">true</property> ! <property name="Pay1RepayAllowed" type="java.lang.Boolean">true</property> ! <property name="Pay1CancelAllowed" type="java.lang.Boolean">true</property> ! <property name="Pay1UpdateAllowed" type="java.lang.Boolean">true</property> ! <property name="Pay1Limit" type="java.lang.Double">10000</property> ! <property name="Pay1LimitChange" type="java.lang.Double">10000</property> ! <property name="Pay1LimitRepay" type="java.lang.Double">10000</property> ! ! <property name="Pay2Index" type="java.lang.Integer">8</property> ! <property name="Pay2Code" type="java.lang.String">PAY2</property> ! <property name="Pay2ChangeAllowed" type="java.lang.Boolean">true</property> ! <property name="Pay2RepayAllowed" type="java.lang.Boolean">true</property> ! <property name="Pay2CancelAllowed" type="java.lang.Boolean">true</property> ! <property name="Pay2UpdateAllowed" type="java.lang.Boolean">true</property> ! <property name="Pay2Limit" type="java.lang.Double">10000</property> ! <property name="Pay2LimitChange" type="java.lang.Double">10000</property> ! <property name="Pay2LimitRepay" type="java.lang.Double">10000</property> ! ! <property name="Pay3Index" type="java.lang.Integer">9</property> ! <property name="Pay3Code" type="java.lang.String">PAY3</property> ! <property name="Pay3ChangeAllowed" type="java.lang.Boolean">true</property> ! <property name="Pay3RepayAllowed" type="java.lang.Boolean">true</property> ! <property name="Pay3CancelAllowed" type="java.lang.Boolean">true</property> ! <property name="Pay3UpdateAllowed" type="java.lang.Boolean">true</property> ! <property name="Pay3Limit" type="java.lang.Double">10000</property> ! <property name="Pay3LimitChange" type="java.lang.Double">10000</property> ! <property name="Pay3LimitRepay" type="java.lang.Double">10000</property> ! ! <property name="Pay4Index" type="java.lang.Integer">10</property> ! <property name="Pay4Code" type="java.lang.String">PAY4</property> ! <property name="Pay4ChangeAllowed" type="java.lang.Boolean">true</property> ! <property name="Pay4RepayAllowed" type="java.lang.Boolean">true</property> ! <property name="Pay4CancelAllowed" type="java.lang.Boolean">true</property> ! <property name="Pay4UpdateAllowed" type="java.lang.Boolean">true</property> ! <property name="Pay4Limit" type="java.lang.Double">10000</property> ! <property name="Pay4LimitChange" type="java.lang.Double">10000</property> ! <property name="Pay4LimitRepay" type="java.lang.Double">10000</property> ! ! <property name="Pay5Index" type="java.lang.Integer">11</property> ! <property name="Pay5Code" type="java.lang.String">PAY5</property> ! <property name="Pay5ChangeAllowed" type="java.lang.Boolean">true</property> ! <property name="Pay5RepayAllowed" type="java.lang.Boolean">true</property> ! <property name="Pay5CancelAllowed" type="java.lang.Boolean">true</property> ! <property name="Pay5UpdateAllowed" type="java.lang.Boolean">true</property> ! <property name="Pay5Limit" type="java.lang.Double">10000</property> ! <property name="Pay5LimitChange" type="java.lang.Double">10000</property> ! <property name="Pay5LimitRepay" type="java.lang.Double">10000</property> ! </property-category> |
From: Lennart P. <le...@us...> - 2004-12-30 10:03:20
|
Update of /cvsroot/redpos/RedPOS/conf In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9685/conf Modified Files: properties.xml Log Message: Disable TXE as default Index: properties.xml =================================================================== RCS file: /cvsroot/redpos/RedPOS/conf/properties.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** properties.xml 27 Dec 2004 22:36:05 -0000 1.3 --- properties.xml 30 Dec 2004 10:03:02 -0000 1.4 *************** *** 32,36 **** <!-- TXE properties --> <property-category name="txe"> ! <property name="enabled" type="java.lang.Boolean">true</property> <property name="ipAddress" type="java.lang.String">xxx.xxx.xxx.xxx</property> <property name="port" type="java.lang.String">1099</property> --- 32,36 ---- <!-- TXE properties --> <property-category name="txe"> ! <property name="enabled" type="java.lang.Boolean">false</property> <property name="ipAddress" type="java.lang.String">xxx.xxx.xxx.xxx</property> <property name="port" type="java.lang.String">1099</property> |
From: Lennart P. <le...@us...> - 2004-12-27 22:36:15
|
Update of /cvsroot/redpos/RedPOS/conf In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17129/conf Modified Files: properties.xml Log Message: Changed default values for company, storeid and defaultpricelist Index: properties.xml =================================================================== RCS file: /cvsroot/redpos/RedPOS/conf/properties.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** properties.xml 27 Dec 2004 11:20:56 -0000 1.2 --- properties.xml 27 Dec 2004 22:36:05 -0000 1.3 *************** *** 6,10 **** <!-- General properties --> <property-category name="general"> ! <property name="company" type="java.lang.String">Foretaget AB</property> </property-category> --- 6,10 ---- <!-- General properties --> <property-category name="general"> ! <property name="company" type="java.lang.String">1000000</property> </property-category> *************** *** 19,25 **** <property-category name="pos"> <property name="registerid" type="java.lang.String">10</property> ! <property name="storeid" type="java.lang.String">Karlstad</property> <property name="loginperreceipt" type="java.lang.Boolean">true</property> ! <property name="defaultpricelist" type="java.lang.String">Normal</property> <property name="tallyreportservice" type="java.lang.String">RedPOS.client.tally.report:service=BasicReport</property> <property name="reportprintername" type="java.lang.String">apoc</property> --- 19,25 ---- <property-category name="pos"> <property name="registerid" type="java.lang.String">10</property> ! <property name="storeid" type="java.lang.String">1000000</property> <property name="loginperreceipt" type="java.lang.Boolean">true</property> ! <property name="defaultpricelist" type="java.lang.String">1000001</property> <property name="tallyreportservice" type="java.lang.String">RedPOS.client.tally.report:service=BasicReport</property> <property name="reportprintername" type="java.lang.String">apoc</property> |
From: Lennart P. <le...@us...> - 2004-12-27 22:35:14
|
Update of /cvsroot/redpos/RedPOS/db/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16963/db/scripts Modified Files: localDB.data localDB.properties localDB.script localDB.backup Log Message: Removed old receipts and tallies from default database Index: localDB.properties =================================================================== RCS file: /cvsroot/redpos/RedPOS/db/scripts/localDB.properties,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** localDB.properties 23 Nov 2004 16:02:02 -0000 1.1 --- localDB.properties 27 Dec 2004 22:35:05 -0000 1.2 *************** *** 1,16 **** ! #HSQL database ! #Fri Oct 29 13:39:32 CEST 2004 ! sql.strict_fk=true ! readonly=false ! sql.strong_fk=true ! hsqldb.version=1.7.1 ! version=1.7.1 ! hsqldb.cache_scale=14 ! sql.compare_in_locale=false ! sql.month=true ! hsqldb.log_size=200 ! modified=no ! hsqldb.cache_version=1.7.0 ! hsqldb.original_version=1.7.1 ! hsqldb.compatible_version=1.7.0 ! sql.enforce_size=false --- 1,16 ---- ! #HSQL database ! #Mon Dec 27 23:33:23 CET 2004 ! sql.strict_fk=true ! readonly=false ! sql.strong_fk=true ! hsqldb.version=1.7.1 ! version=1.7.1 ! hsqldb.cache_scale=14 ! sql.compare_in_locale=false ! sql.month=true ! hsqldb.log_size=200 ! modified=no ! hsqldb.cache_version=1.7.0 ! hsqldb.original_version=1.7.1 ! hsqldb.compatible_version=1.7.0 ! sql.enforce_size=false Index: localDB.backup =================================================================== RCS file: /cvsroot/redpos/RedPOS/db/scripts/localDB.backup,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvsAXDsPK and /tmp/cvsu3CCg8 differ Index: localDB.script =================================================================== RCS file: /cvsroot/redpos/RedPOS/db/scripts/localDB.script,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** localDB.script 23 Nov 2004 16:02:02 -0000 1.1 --- localDB.script 27 Dec 2004 22:35:05 -0000 1.2 *************** *** 7,17 **** CREATE CACHED TABLE RPTALLY(TALLYID VARCHAR NOT NULL PRIMARY KEY,REGISTERID VARCHAR NOT NULL,STOREID VARCHAR NOT NULL,CREATEDBY VARCHAR NOT NULL,CREATEDDATE TIMESTAMP NOT NULL,FROMRECEIPTID VARCHAR NOT NULL,TORECEIPTID VARCHAR NOT NULL,FROMRECEIPTDATE TIMESTAMP NOT NULL,TORECEIPTDATE TIMESTAMP NOT NULL,CASHIERS VARCHAR NOT NULL,UPLOADED BIT,CONSTRAINT SYS_CT_13 UNIQUE(TALLYID)) CREATE CACHED TABLE RPTALRW(TALLYID VARCHAR NOT NULL,ROWNUMBER INTEGER NOT NULL,TYPE VARCHAR NOT NULL,ID VARCHAR,AMOUNT DOUBLE,CURRENCY VARCHAR,RECEIPTCOUNT INTEGER,TAXPERCENTAGE DOUBLE,DATA VARCHAR,CONSTRAINT SYS_PK_RPTALRW PRIMARY KEY(TALLYID,ROWNUMBER),CONSTRAINT SYS_CT_15 UNIQUE(TALLYID,ROWNUMBER)) ! SET TABLE RPRECIPT INDEX '312 312 567' ! SET TABLE RPRCPTRW INDEX '21320 21320 1319' SET TABLE RPUSERS INDEX '32 32 1' ! SET TABLE RPTALLY INDEX '17576 17576 24' ! SET TABLE RPTALRW INDEX '95248 95248 137' ! GRANT ALL ON CLASS "org.hsqldb.Library" TO PUBLIC GRANT ALL ON CLASS "java.lang.Math" TO PUBLIC CREATE USER SA PASSWORD "" ADMIN CREATE ALIAS DAYNAME FOR "org.hsqldb.Library.dayname" --- 7,17 ---- CREATE CACHED TABLE RPTALLY(TALLYID VARCHAR NOT NULL PRIMARY KEY,REGISTERID VARCHAR NOT NULL,STOREID VARCHAR NOT NULL,CREATEDBY VARCHAR NOT NULL,CREATEDDATE TIMESTAMP NOT NULL,FROMRECEIPTID VARCHAR NOT NULL,TORECEIPTID VARCHAR NOT NULL,FROMRECEIPTDATE TIMESTAMP NOT NULL,TORECEIPTDATE TIMESTAMP NOT NULL,CASHIERS VARCHAR NOT NULL,UPLOADED BIT,CONSTRAINT SYS_CT_13 UNIQUE(TALLYID)) CREATE CACHED TABLE RPTALRW(TALLYID VARCHAR NOT NULL,ROWNUMBER INTEGER NOT NULL,TYPE VARCHAR NOT NULL,ID VARCHAR,AMOUNT DOUBLE,CURRENCY VARCHAR,RECEIPTCOUNT INTEGER,TAXPERCENTAGE DOUBLE,DATA VARCHAR,CONSTRAINT SYS_PK_RPTALRW PRIMARY KEY(TALLYID,ROWNUMBER),CONSTRAINT SYS_CT_15 UNIQUE(TALLYID,ROWNUMBER)) ! SET TABLE RPRECIPT INDEX '-1 -1 0' ! SET TABLE RPRCPTRW INDEX '-1 -1 0' SET TABLE RPUSERS INDEX '32 32 1' ! SET TABLE RPTALLY INDEX '-1 -1 0' ! SET TABLE RPTALRW INDEX '-1 -1 0' GRANT ALL ON CLASS "java.lang.Math" TO PUBLIC + GRANT ALL ON CLASS "org.hsqldb.Library" TO PUBLIC CREATE USER SA PASSWORD "" ADMIN CREATE ALIAS DAYNAME FOR "org.hsqldb.Library.dayname" *************** *** 94,102 **** INSERT INTO RPPRODCT VALUES('8','8','7392620102206','BARCODE3','Book','','','Read me',0.25E0,true,false) INSERT INTO RPPRODCT VALUES('9','9','7200266061842','BARCODE3','Red Hat Linux 9 Manual','','','Have fun',0.25E0,true,false) ! INSERT INTO RPPRCLST VALUES('1','Normal',100.0E0,125.0E0,'USD',25.0E0) ! INSERT INTO RPPRCLST VALUES('10','Normal',88.0E0,110.0E0,'USD',22.0E0) ! INSERT INTO RPPRCLST VALUES('2','Normal',100.0E0,125.0E0,'USD',25.0E0) ! INSERT INTO RPPRCLST VALUES('3','Normal',100.0E0,125.0E0,'USD',25.0E0) ! INSERT INTO RPPRCLST VALUES('6','Normal',49.6E0,62.0E0,'USD',12.4E0) ! INSERT INTO RPIDS VALUES('ReceiptNumber','10','263') ! INSERT INTO RPIDS VALUES('TallyId','2004','37') --- 94,102 ---- INSERT INTO RPPRODCT VALUES('8','8','7392620102206','BARCODE3','Book','','','Read me',0.25E0,true,false) INSERT INTO RPPRODCT VALUES('9','9','7200266061842','BARCODE3','Red Hat Linux 9 Manual','','','Have fun',0.25E0,true,false) ! INSERT INTO RPPRCLST VALUES('1','1000001',100.0E0,125.0E0,'USD',25.0E0) ! INSERT INTO RPPRCLST VALUES('10','1000001',88.0E0,110.0E0,'USD',22.0E0) ! INSERT INTO RPPRCLST VALUES('2','1000001',100.0E0,125.0E0,'USD',25.0E0) ! INSERT INTO RPPRCLST VALUES('3','1000001',100.0E0,125.0E0,'USD',25.0E0) ! INSERT INTO RPPRCLST VALUES('6','1000001',49.6E0,62.0E0,'USD',12.4E0) ! INSERT INTO RPIDS VALUES('ReceiptNumber','10','1') ! INSERT INTO RPIDS VALUES('TallyId','2004','1') Index: localDB.data =================================================================== RCS file: /cvsroot/redpos/RedPOS/db/scripts/localDB.data,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvsPIL5tS and /tmp/cvs8CEF0f differ |
From: Lennart P. <le...@us...> - 2004-12-27 22:13:49
|
Update of /cvsroot/redpos/RedPOS/src/org/redpos/txe In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12768/src/org/redpos/txe Modified Files: TXELocator.java Log Message: Spelling error Index: TXELocator.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/txe/TXELocator.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TXELocator.java 27 Dec 2004 11:20:56 -0000 1.1 --- TXELocator.java 27 Dec 2004 22:13:34 -0000 1.2 *************** *** 298,302 **** if(authorized.equals(Boolean.TRUE)) { ! log.info("Congratulations - your was authorized by TXE."); setGoOn(false); } --- 298,302 ---- if(authorized.equals(Boolean.TRUE)) { ! log.info("Congratulations - you was authorized by TXE."); setGoOn(false); } |
From: Lennart P. <le...@us...> - 2004-12-27 11:22:34
|
Update of /cvsroot/redpos/RedPOS In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17359 Modified Files: build.xml Log Message: Alpha dev build Index: build.xml =================================================================== RCS file: /cvsroot/redpos/RedPOS/build.xml,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** build.xml 27 Dec 2004 11:20:56 -0000 1.11 --- build.xml 27 Dec 2004 11:22:24 -0000 1.12 *************** *** 74,83 **** <property name="version.major" value="1"/> <property name="version.minor" value="5"/> ! <property name="version.revision" value="1"/> <property name="version.compound" value="${version.major}.${version.minor}.${version.revision}"/> <property name="version.tag" value=""/> <property name="version.name" value="Zion"/> <!-- This must be set to the CVS tag for any release --> ! <property name="version.cvstag" value="Rel_1_5_2_1"/> <property name="version.appname" value="RedPOS"/> <property name="version.url" value="http://www.redpos.org"/> --- 74,83 ---- <property name="version.major" value="1"/> <property name="version.minor" value="5"/> ! <property name="version.revision" value="2"/> <property name="version.compound" value="${version.major}.${version.minor}.${version.revision}"/> <property name="version.tag" value=""/> <property name="version.name" value="Zion"/> <!-- This must be set to the CVS tag for any release --> ! <property name="version.cvstag" value="Rel_1_5_2_2"/> <property name="version.appname" value="RedPOS"/> <property name="version.url" value="http://www.redpos.org"/> |
From: Lennart P. <le...@us...> - 2004-12-27 11:21:08
|
Update of /cvsroot/redpos/RedPOS/src/org/redpos/txe In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17103/src/org/redpos/txe Added Files: TXELocator.java Log Message: Replaced JGroups/multicast with static configuration of IP address to set up contact between RedPOS instances and TXE. --- NEW FILE: TXELocator.java --- /* * RedPOS, the OpenSource Point of Sale * * Copyright (C) 2004-2007 Redpill AB * * This application is free software; you can redistribute * it and/or modify it under the terms of the GNU Lesser * General Public License as published by the Free Software * Foundation; either version 2.1 of the License, or * (at your option) any later version. * * This application is distributed in the hope that it will be * useful, but WITHOUT ANY WARRANTY; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this application; if not, it can be downloaded * from http://www.gnu.org/licenses/lgpl.html. * * For more information and contacts, please visit http://www.redpos.org * */ package org.redpos.txe; import java.net.InetAddress; import java.net.UnknownHostException; import java.util.Hashtable; import javax.management.ObjectName; import javax.naming.InitialContext; import javax.naming.NamingException; import org.jboss.jmx.adaptor.rmi.RMIAdaptor; import org.jboss.logging.Logger; import org.jboss.system.ServiceMBeanSupport; import org.redpos.client.contract.properties.PropertiesUtility; /** * Will initiate contact with TXE during startup * * @version <tt>$Revision: 1.1 $</tt> * @author <a href="mailto:le...@us...">lenp</a> * * @jmx.mbean name = "RedPOS.TXE:service=TXELocator" * description = "RedPOS TXE locator module" * extends = "org.jboss.system.ServiceMBean" */ public class TXELocator extends ServiceMBeanSupport implements TXELocatorMBean { private Logger logger = Logger.getLogger(this.getClass()); /** * Whether TXE is enabled or not. Property in properties.xml */ private Boolean enabled = Boolean.FALSE; /** * IP address to TXE. Property in properties.xml */ public String ipAddress = ""; /** * Port to TXE. Property in properties.xml */ public String port = ""; /** * Cached context to TXE */ private InitialContext context; /** * Cached RMI adaptor */ private RMIAdaptor rmiAdaptor; /** * Cached local IP addres ot the RedPOS client */ private String localAddress; /** * Cached object name to RedPOSConnector service in TXE */ private ObjectName redposConnector; /** * Thread responsible for trying to connect to TXE */ private TxeRunnable txeRunnable; private Thread txeThread; /** * If RedPOS client has been authorized by TXE */ private Boolean authorized; private static final String TXE_SERVICE_REDPOSCONNECTOR = "TXE:service=RedposConnector"; private static final String UPREDPOS = "upRedPOS"; private static final String DOWNREDPOS = "downRedPOS"; private static final String RMIADAPTOR = "jmx/invoker/RMIAdaptor"; private boolean TRACE = logger.isTraceEnabled(); /** * @return Returns the ipAddress. * @jmx.managed-attribute */ public String getIpAddress() { return ipAddress; } /** * @param ipAddress The ipAddress to set. * @jmx.managed-attribute */ public void setIpAddress(String ipAddress) { this.ipAddress = ipAddress; } /* (non-Javadoc) * @see org.jboss.system.ServiceMBeanSupport#startService() */ protected void startService() throws Exception { super.startService(); // Get properties PropertiesUtility po = new PropertiesUtility(this.getServer()); setEnabled((Boolean)po.getProperty("txe", "enabled")); if(getEnabled().equals(Boolean.TRUE)) { setIpAddress((String)po.getProperty("txe", "ipAddress")); setPort((String)po.getProperty("txe", "port")); logger.info("---> TXE enabled and will use IP address " + getIpAddress() + ":" + getPort()); // Start a thread that will try to reach TXE to be authorized txeRunnable = new TxeRunnable(); txeThread = new Thread(txeRunnable); txeThread.start(); } else log.warn("TXE disabled"); } /** * Return RedPOS local IP address * @return * @throws UnknownHostException */ private String getLocalAddress() throws UnknownHostException { if(localAddress == null) localAddress = InetAddress.getLocalHost().getHostAddress(); return localAddress; } /** * @throws NamingException */ private void setupContext() throws NamingException { // Start with context environment from this host Hashtable env = new InitialContext().getEnvironment(); // Replace property PROVIDER_URL with address to TXE env.put(InitialContext.PROVIDER_URL, "jnp://" + getIpAddress() + ":" + getPort()); // And the create the initial context and cache it context = new InitialContext(env); } /* (non-Javadoc) * @see org.jboss.system.ServiceMBeanSupport#stopService() */ protected void stopService() throws Exception { super.stopService(); if(txeRunnable != null) { txeRunnable.setGoOn(false); txeThread.interrupt(); } } /** * @return Returns the port. * @jmx.managed-attribute */ public String getPort() { return port; } /** * @param port The port to set. * @jmx.managed-attribute */ public void setPort(String port) { this.port = port; } /** * @return Returns the enabled. * @jmx.managed-attribute */ public Boolean getEnabled() { return enabled; } /** * @param enabled The enabled to set. * @jmx.managed-attribute */ public void setEnabled(Boolean enabled) { this.enabled = enabled; } class TxeRunnable implements Runnable { private boolean goOn = true; /* (non-Javadoc) * @see java.lang.Runnable#run() */ public void run() { log.debug("I'm running..."); while(goOn) { try { Thread.sleep(5000); if(goOn) { log.trace("Time to ping TXE"); authorizeTXE(); } } catch(InterruptedException e) { log.info("Interrupted"); } } log.trace("Closing communication with TXE"); closeTXE(); } private void closeTXE() { if(getEnabled().equals(Boolean.TRUE) && rmiAdaptor != null) try { rmiAdaptor.invoke(redposConnector, DOWNREDPOS, new Object[] {getLocalAddress()}, new String[] {"java.lang.String"}); } catch(Exception e) { log.info("Exception:" + e.getClass().getName()); log.warn(e.getMessage()); } } private void authorizeTXE() { try { // Setup context to TXE setupContext(); // Lookup RMI adaptor rmiAdaptor = (RMIAdaptor)context.lookup(RMIADAPTOR); // Construct the object name redposConnector = new ObjectName(TXE_SERVICE_REDPOSCONNECTOR); // And do the ping authorized = (Boolean)rmiAdaptor.invoke(redposConnector, UPREDPOS, new Object[] {getLocalAddress()}, new String[] {"java.lang.String"}); if(authorized.equals(Boolean.TRUE)) { log.info("Congratulations - your was authorized by TXE."); setGoOn(false); } else { log.info("Sorry - your was not authorized by TXE."); setEnabled(Boolean.FALSE); setGoOn(false); } } catch(Exception e) { if(TRACE) e.printStackTrace(); log.warn("No connection with TXE, will try again real soon."); log.warn("Are you sure that specified IP address and port are korrect? ["+getIpAddress()+":"+getPort()+"]."); } } /** * @param goOn The goOn to set. */ public void setGoOn(boolean goOn) { log.trace("will go down"); this.goOn = goOn; } } } |
From: Lennart P. <le...@us...> - 2004-12-27 11:21:07
|
Update of /cvsroot/redpos/RedPOS/src/org/redpos/txe/META-INF In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17103/src/org/redpos/txe/META-INF Added Files: jboss-service.xml Log Message: Replaced JGroups/multicast with static configuration of IP address to set up contact between RedPOS instances and TXE. --- NEW FILE: jboss-service.xml --- <?xml version="1.0" encoding="UTF-8"?> <service> <mbean code="org.redpos.txe.TXELocator" name="RedPOS.TXE:service=TXELocator" > </mbean> <!-- To use non XDoclet mbeans, create a jboss-service.ent file that contains the additional mbeans and place it in your project's merge dir. --> </service> |