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-02-24 13:52:48
|
Update of /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin/function In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25817/src/org/redpos/client/ui/plugin/function Modified Files: RowDiscountAmount.java RowDiscountPercent.java Log Message: It is not possible to give rowdiscount on freetext- or discountrow Index: RowDiscountAmount.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin/function/RowDiscountAmount.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** RowDiscountAmount.java 19 Feb 2005 08:37:14 -0000 1.4 --- RowDiscountAmount.java 24 Feb 2005 13:52:22 -0000 1.5 *************** *** 31,34 **** --- 31,36 ---- import org.redpos.amount.Amount; import org.redpos.client.contract.POSEngineException; + import org.redpos.client.contract.receipt.DiscountReceiptRow; + import org.redpos.client.contract.receipt.FreetextReceiptRow; import org.redpos.client.contract.receipt.ReceiptRow; import org.redpos.client.lang.contract.Language; *************** *** 81,85 **** --- 83,102 ---- return false; } + + if ((receiptRow instanceof FreetextReceiptRow) || + (receiptRow instanceof DiscountReceiptRow)) + { + // send message to ui + String message = getLanguageString( + "ui.main.message.rowdiscountamount2.text", + "Discount is not allowed on the receipt row"); + sendUIMessage(message); + // function is finished, notify listeners + fireNotification( + PluginFunctionConstants.NOTIFICATION_FUNCTION_FINISHED, null); + return false; + } + // create user input listener // Index: RowDiscountPercent.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin/function/RowDiscountPercent.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** RowDiscountPercent.java 19 Feb 2005 08:37:14 -0000 1.4 --- RowDiscountPercent.java 24 Feb 2005 13:52:22 -0000 1.5 *************** *** 30,33 **** --- 30,35 ---- import org.eclipse.swt.SWT; import org.redpos.client.contract.POSEngineException; + import org.redpos.client.contract.receipt.DiscountReceiptRow; + import org.redpos.client.contract.receipt.FreetextReceiptRow; import org.redpos.client.contract.receipt.ReceiptRow; import org.redpos.client.lang.contract.Language; *************** *** 80,83 **** --- 82,99 ---- return false; } + if ((receiptRow instanceof FreetextReceiptRow) || + (receiptRow instanceof DiscountReceiptRow)) + { + // send message to ui + String message = getLanguageString( + "ui.main.message.rowdiscountamount2.text", + "Discount is not allowed on the receipt row"); + sendUIMessage(message); + // function is finished, notify listeners + fireNotification( + PluginFunctionConstants.NOTIFICATION_FUNCTION_FINISHED, null); + + return false; + } // create user input listener |
From: Lennart P. <le...@us...> - 2005-02-20 11:14:06
|
Update of /cvsroot/redpos/RedPOS_third_party/jboss/bin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8234/jboss/bin Modified Files: run.sh run.bat Log Message: Changed default memory flags, now starting with 128M and max is 256M Index: run.sh =================================================================== RCS file: /cvsroot/redpos/RedPOS_third_party/jboss/bin/run.sh,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** run.sh 13 Jan 2005 15:57:20 -0000 1.6 --- run.sh 20 Feb 2005 11:13:57 -0000 1.7 *************** *** 175,179 **** # Setup JBoss sepecific properties # RedPOS ! JAVA_OPTS="$JAVA_OPTS -Xmx128m -Dprogram.name=$PROGNAME -Djava.library.path=$JBOSS_HOME/swt/linux-gtk -Duser.language=sv -Duser.region=SE" # For Cygwin, switch paths to Windows format before running java --- 175,179 ---- # Setup JBoss sepecific properties # RedPOS ! JAVA_OPTS="$JAVA_OPTS -Xms128m -Xmx256m -Dprogram.name=$PROGNAME -Djava.library.path=$JBOSS_HOME/swt/linux-gtk -Duser.language=sv -Duser.region=SE" # For Cygwin, switch paths to Windows format before running java Index: run.bat =================================================================== RCS file: /cvsroot/redpos/RedPOS_third_party/jboss/bin/run.bat,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** run.bat 7 Dec 2004 11:00:20 -0000 1.4 --- run.bat 20 Feb 2005 11:13:57 -0000 1.5 *************** *** 71,75 **** rem Sun JVM memory allocation pool parameters. Uncomment and modify as appropriate. ! rem set JAVA_OPTS=%JAVA_OPTS% -Xms128m -Xmx512m REM RedPOS --- 71,75 ---- rem Sun JVM memory allocation pool parameters. Uncomment and modify as appropriate. ! set JAVA_OPTS=%JAVA_OPTS% -Xms128m -Xmx256m REM RedPOS |
From: Lennart P. <le...@us...> - 2005-02-20 11:05:53
|
Update of /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin/function In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6778/src/org/redpos/client/ui/plugin/function Modified Files: ConfirmActionUI.java Log Message: Removed erronous extra } Index: ConfirmActionUI.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin/function/ConfirmActionUI.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ConfirmActionUI.java 20 Feb 2005 11:02:16 -0000 1.2 --- ConfirmActionUI.java 20 Feb 2005 11:05:42 -0000 1.3 *************** *** 113,117 **** } - } /** * Inits this class --- 113,116 ---- |
From: Lennart P. <le...@us...> - 2005-02-20 11:02:28
|
Update of /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin/function In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6220/src/org/redpos/client/ui/plugin/function Modified Files: ConfirmActionUI.java Log Message: Added dispose when leaving by pressing SWT.ESC Index: ConfirmActionUI.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin/function/ConfirmActionUI.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ConfirmActionUI.java 23 Nov 2004 16:02:27 -0000 1.1 --- ConfirmActionUI.java 20 Feb 2005 11:02:16 -0000 1.2 *************** *** 113,116 **** --- 113,117 ---- } + } /** * Inits this class *************** *** 188,191 **** --- 189,197 ---- if(e.keyCode == SWT.ARROW_LEFT || e.keyCode == SWT.ARROW_RIGHT) noButton.setFocus(); + else if(e.character == SWT.ESC) + { + listener.selectionMade(ConfirmActionUI.NO_OPTION); + selectionMade = true; + } } }; *************** *** 204,207 **** --- 210,218 ---- if(e.keyCode == SWT.ARROW_LEFT || e.keyCode == SWT.ARROW_RIGHT) yesButton.setFocus(); + else if(e.character == SWT.ESC) + { + listener.selectionMade(ConfirmActionUI.NO_OPTION); + selectionMade = true; + } } }; *************** *** 252,255 **** --- 263,278 ---- okButton.addListener(SWT.Selection, buttonListener); + KeyListener okButtonKeyListener = new KeyAdapter() + { + public void keyPressed(KeyEvent e) + { + if(e.character == SWT.ESC) + { + listener.selectionMade(ConfirmActionUI.OK_OPTION); + } + } + }; + okButton.addKeyListener(okButtonKeyListener); + okButton.setFocus(); |
From: Lennart P. <le...@us...> - 2005-02-19 21:02:07
|
Update of /cvsroot/redpos/RedPOS/lang/conf In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27016/lang/conf Added Files: lang-es-CO.xml Log Message: Spanish translation (es-CO). Thanks to Rodrigo López-Guzmán, Colombia --- NEW FILE: lang-es-CO.xml --- (This appears to be a binary file; contents omitted.) |
From: Lennart P. <le...@us...> - 2005-02-19 18:38:08
|
Update of /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin/function In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24763/src/org/redpos/client/ui/plugin/function Modified Files: FindProductUI.java Log Message: Make sure that same select is not performed more than once. Code style. Index: FindProductUI.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin/function/FindProductUI.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** FindProductUI.java 17 Jan 2005 10:28:15 -0000 1.4 --- FindProductUI.java 19 Feb 2005 18:37:59 -0000 1.5 *************** *** 86,99 **** private Label productInfoSalesupport; ! private Integer productSearch; - - private ProductTableItemData productTableItemData; /** * Constructor */ public FindProductUI(Composite parent, Language language, ! FindProductUIListener listener, Integer productSearchInput) { super(parent, SWT.NORMAL); --- 86,102 ---- private Label productInfoSalesupport; ! private Integer productSearch; + private ProductTableItemData productTableItemData; + + private String lastFind; + /** * Constructor */ public FindProductUI(Composite parent, Language language, ! FindProductUIListener listener, ! Integer productSearchInput) { super(parent, SWT.NORMAL); *************** *** 145,149 **** inputField.setLayoutData(inputFieldGridData); //inputField.setFont(fontManager.getInputFieldFont()); ! // create input field key listener KeyListener keyListener = new KeyAdapter() --- 148,152 ---- inputField.setLayoutData(inputFieldGridData); //inputField.setFont(fontManager.getInputFieldFont()); ! // create input field key listener KeyListener keyListener = new KeyAdapter() *************** *** 151,155 **** public void keyReleased(KeyEvent event) { ! if(inputField.getText().length() > (productSearch.intValue()-1)) findSelected(); } --- 154,158 ---- public void keyReleased(KeyEvent event) { ! if(inputField.getText().length() > (productSearch.intValue() - 1)) findSelected(); } *************** *** 241,246 **** if(index != -1) { ! inputField.setEditable(false); ! showProduct(index); } } --- 244,249 ---- if(index != -1) { ! inputField.setEditable(false); ! showProduct(index); } } *************** *** 394,398 **** listener.addProductToReceiptSelected(productTableItemData.productData, productTableItemData.priceData); ! } --- 397,401 ---- listener.addProductToReceiptSelected(productTableItemData.productData, productTableItemData.priceData); ! } *************** *** 425,429 **** //inputField.selectAll(); String value = inputField.getText(); ! listener.findSelected(value); } --- 428,437 ---- //inputField.selectAll(); String value = inputField.getText(); ! // Don't use same select ! if(!value.equals(lastFind)) ! { ! listener.findSelected(value); ! lastFind = value; ! } } *************** *** 514,518 **** if(productTableItemData.priceData != null) { ! Amount amount = new Amount(productTableItemData.priceData.getGrossPrice(), productTableItemData.priceData.getCurrency()); priceText = amount.toString(); --- 522,527 ---- if(productTableItemData.priceData != null) { ! Amount amount = new Amount( ! productTableItemData.priceData.getGrossPrice(), productTableItemData.priceData.getCurrency()); priceText = amount.toString(); |
From: Lennart P. <le...@us...> - 2005-02-19 08:53:19
|
Update of /cvsroot/redpos/RedPOS/src/org/redpos/client/product In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24479/src/org/redpos/client/product Modified Files: ProductStorage.java Log Message: Forgot to remove parameter productId from the method findProductByTextOrBarcode Index: ProductStorage.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/product/ProductStorage.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ProductStorage.java 19 Feb 2005 08:29:35 -0000 1.2 --- ProductStorage.java 19 Feb 2005 08:53:09 -0000 1.3 *************** *** 220,224 **** public Vector findProductByTextOrBarcode( final String text, - final String productId, final String primBarcode, Boolean like) --- 220,223 ---- |
From: Lennart P. <le...@us...> - 2005-02-19 08:40:42
|
Update of /cvsroot/redpos/RedPOS In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22817 Modified Files: build.xml Log Message: Next release will be 1.6.1.0 Index: build.xml =================================================================== RCS file: /cvsroot/redpos/RedPOS/build.xml,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** build.xml 17 Jan 2005 15:48:49 -0000 1.14 --- build.xml 19 Feb 2005 08:40:31 -0000 1.15 *************** *** 74,83 **** <property name="version.major" value="1"/> <property name="version.minor" value="6"/> ! <property name="version.revision" value="0"/> <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_6_0_0"/> <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="6"/> ! <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_6_1_0"/> <property name="version.appname" value="RedPOS"/> <property name="version.url" value="http://www.redpos.org"/> |
From: Lennart P. <le...@us...> - 2005-02-19 08:37:26
|
Update of /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin/function In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22296/src/org/redpos/client/ui/plugin/function Modified Files: MakeTallyAndReport.java TotalDiscountAmount.java CancelReceiptRow.java PrintReceiptAgain.java FindSaveReceipt.java Pay.java RowDiscountAmount.java ClosePOS.java RowDiscountPercent.java AddFreetext.java CancelReceipt.java Logoff.java TotalDiscountPercent.java CustomerService.java Log Message: Added dispose of SWT composite. Index: FindSaveReceipt.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin/function/FindSaveReceipt.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FindSaveReceipt.java 17 Jan 2005 10:35:28 -0000 1.2 --- FindSaveReceipt.java 19 Feb 2005 08:37:14 -0000 1.3 *************** *** 70,73 **** --- 70,74 ---- private ReceiptSessionUtility receiptSessionUtility = null; private POSEngineUtility posEngineUtility = null; + private ConfirmActionUI confirm; /** *************** *** 76,80 **** public boolean invokeFunction(Composite parent) { ! ui = null; if(isReceiptStarted()) { --- 77,88 ---- public boolean invokeFunction(Composite parent) { ! try ! { ! ui.dispose(); ! ui = null; ! } ! catch(NullPointerException e) ! {} ! //ui = null; if(isReceiptStarted()) { *************** *** 134,138 **** } break; ! } } --- 142,154 ---- } break; ! } ! try ! { ! confirm.dispose(); ! confirm = null; ! } ! catch(NullPointerException e) ! { ! } } *************** *** 153,157 **** "Do you want to save current receipt?"); ! ConfirmActionUI confirm = new ConfirmActionUI(parent, message, ConfirmActionUI.YES_NO_SELECTION, listener, yesText, noText, okText, cancelText); --- 169,173 ---- "Do you want to save current receipt?"); ! /*ConfirmActionUI*/ confirm = new ConfirmActionUI(parent, message, ConfirmActionUI.YES_NO_SELECTION, listener, yesText, noText, okText, cancelText); Index: CancelReceiptRow.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin/function/CancelReceiptRow.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CancelReceiptRow.java 23 Nov 2004 16:02:27 -0000 1.1 --- CancelReceiptRow.java 19 Feb 2005 08:37:14 -0000 1.2 *************** *** 44,47 **** --- 44,48 ---- { private ReceiptRow receiptRow; + private static ConfirmActionUI confirm; /** *************** *** 101,104 **** --- 102,113 ---- break; } + try + { + confirm.dispose(); + confirm = null; + } + catch(NullPointerException e) + { + } } }; *************** *** 117,121 **** "Do you really want to remove the row?"); ! ConfirmActionUI confirm = new ConfirmActionUI(parent, message, ConfirmActionUI.YES_NO_SELECTION, listener, yesText, noText, okText, cancelText); --- 126,130 ---- "Do you really want to remove the row?"); ! /*ConfirmActionUI*/ confirm = new ConfirmActionUI(parent, message, ConfirmActionUI.YES_NO_SELECTION, listener, yesText, noText, okText, cancelText); Index: TotalDiscountPercent.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin/function/TotalDiscountPercent.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** TotalDiscountPercent.java 18 Jan 2005 15:31:57 -0000 1.3 --- TotalDiscountPercent.java 19 Feb 2005 08:37:14 -0000 1.4 *************** *** 86,89 **** --- 86,96 ---- { inputOKSelected(); + try + { + input.dispose(); + input = null; + } + catch(NullPointerException e) + {} } *************** *** 91,94 **** --- 98,108 ---- { inputCancelSelected(); + try + { + input.dispose(); + input = null; + } + catch(NullPointerException e) + {} } }; Index: AddFreetext.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin/function/AddFreetext.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** AddFreetext.java 23 Nov 2004 16:02:27 -0000 1.1 --- AddFreetext.java 19 Feb 2005 08:37:14 -0000 1.2 *************** *** 71,74 **** --- 71,82 ---- null); } + try + { + userInput.dispose(); + userInput = null; + } + catch(NullPointerException e) + { + } } *************** *** 78,81 **** --- 86,97 ---- fireNotification( PluginFunctionConstants.NOTIFICATION_FUNCTION_FINISHED, null); + try + { + userInput.dispose(); + userInput = null; + } + catch(NullPointerException e) + { + } } Index: ClosePOS.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin/function/ClosePOS.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ClosePOS.java 23 Nov 2004 16:02:27 -0000 1.1 --- ClosePOS.java 19 Feb 2005 08:37:14 -0000 1.2 *************** *** 46,49 **** --- 46,51 ---- ClosePOSMBean { + + private static ConfirmActionUI confirm; /** *************** *** 69,72 **** --- 71,82 ---- break; } + try + { + confirm.dispose(); + confirm = null; + } + catch(NullPointerException e) + { + } } }; *************** *** 85,89 **** "Do you really want to close the register?"); ! ConfirmActionUI confirm = new ConfirmActionUI(parent, message, ConfirmActionUI.YES_NO_SELECTION, listener, yesText, noText, okText, cancelText); --- 95,99 ---- "Do you really want to close the register?"); ! /*ConfirmActionUI*/ confirm = new ConfirmActionUI(parent, message, ConfirmActionUI.YES_NO_SELECTION, listener, yesText, noText, okText, cancelText); Index: RowDiscountPercent.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin/function/RowDiscountPercent.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** RowDiscountPercent.java 18 Jan 2005 15:31:57 -0000 1.3 --- RowDiscountPercent.java 19 Feb 2005 08:37:14 -0000 1.4 *************** *** 89,92 **** --- 89,99 ---- { inputOKSelected(); + try + { + input.dispose(); + input = null; + } + catch(NullPointerException e) + {} } *************** *** 94,97 **** --- 101,111 ---- { inputCancelSelected(); + try + { + input.dispose(); + input = null; + } + catch(NullPointerException e) + {} } }; Index: CustomerService.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin/function/CustomerService.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** CustomerService.java 17 Jan 2005 10:25:41 -0000 1.2 --- CustomerService.java 19 Feb 2005 08:37:14 -0000 1.3 *************** *** 52,55 **** --- 52,56 ---- private ReceiptSessionUtility receiptSessionUtility = null; + private static ConfirmActionUI confirm; /** *************** *** 86,89 **** --- 87,98 ---- } } + try + { + confirm.dispose(); + confirm = null; + } + catch(NullPointerException e) + { + } } }; *************** *** 99,103 **** "Customer service su...@re..."); ! ConfirmActionUI confirm = new ConfirmActionUI(parent, message, ConfirmActionUI.OK_SELECTION, listener, yesText, noText, okText, cancelText); --- 108,112 ---- "Customer service su...@re..."); ! /*ConfirmActionUI*/ confirm = new ConfirmActionUI(parent, message, ConfirmActionUI.OK_SELECTION, listener, yesText, noText, okText, cancelText); Index: Logoff.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin/function/Logoff.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Logoff.java 23 Nov 2004 16:02:27 -0000 1.1 --- Logoff.java 19 Feb 2005 08:37:14 -0000 1.2 *************** *** 112,116 **** // kill login UI ! loginUI = null; } } --- 112,122 ---- // kill login UI ! try ! { ! loginUI.dispose(); ! loginUI = null; ! } ! catch(NullPointerException e) ! {} } } *************** *** 332,336 **** private Composite parent; - /** * @param arg0 --- 338,341 ---- Index: PrintReceiptAgain.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin/function/PrintReceiptAgain.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** PrintReceiptAgain.java 3 Jan 2005 13:04:54 -0000 1.2 --- PrintReceiptAgain.java 19 Feb 2005 08:37:14 -0000 1.3 *************** *** 49,52 **** --- 49,53 ---- private POSEngineUtility posEngineUtility; + private ConfirmActionUI confirm; *************** *** 89,92 **** --- 90,101 ---- break; } + try + { + confirm.dispose(); + confirm = null; + } + catch(NullPointerException e) + { + } } }; *************** *** 105,109 **** "Do you want to print the previous receipt again?"); ! ConfirmActionUI confirm = new ConfirmActionUI(parent, message, ConfirmActionUI.YES_NO_SELECTION, listener, yesText, noText, okText, cancelText); --- 114,118 ---- "Do you want to print the previous receipt again?"); ! /*ConfirmActionUI*/ confirm = new ConfirmActionUI(parent, message, ConfirmActionUI.YES_NO_SELECTION, listener, yesText, noText, okText, cancelText); Index: CancelReceipt.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin/function/CancelReceipt.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** CancelReceipt.java 10 Jan 2005 14:54:05 -0000 1.2 --- CancelReceipt.java 19 Feb 2005 08:37:14 -0000 1.3 *************** *** 48,51 **** --- 48,52 ---- { private POSEngineUtility posEngineUtility = null; + private static ConfirmActionUI confirm; /** *************** *** 103,107 **** break; } ! } }; --- 104,117 ---- break; } ! try ! { ! confirm.dispose(); ! confirm = null; ! } ! catch(NullPointerException e) ! { ! } ! ! } }; *************** *** 119,128 **** "Do you really want to cancel the receipt?"); ! ConfirmActionUI confirm = new ConfirmActionUI(parent, message, ConfirmActionUI.YES_NO_SELECTION, listener, yesText, noText, okText, cancelText); parent.layout(); ! return true; } --- 129,138 ---- "Do you really want to cancel the receipt?"); ! /*ConfirmActionUI*/ confirm = new ConfirmActionUI(parent, message, ConfirmActionUI.YES_NO_SELECTION, listener, yesText, noText, okText, cancelText); parent.layout(); ! return true; } Index: TotalDiscountAmount.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin/function/TotalDiscountAmount.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** TotalDiscountAmount.java 18 Jan 2005 15:31:56 -0000 1.3 --- TotalDiscountAmount.java 19 Feb 2005 08:37:14 -0000 1.4 *************** *** 87,90 **** --- 87,97 ---- { inputOKSelected(); + try + { + input.dispose(); + input = null; + } + catch(NullPointerException e) + {} } *************** *** 92,95 **** --- 99,109 ---- { inputCancelSelected(); + try + { + input.dispose(); + input = null; + } + catch(NullPointerException e) + {} } }; Index: Pay.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin/function/Pay.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Pay.java 18 Jan 2005 15:31:57 -0000 1.5 --- Pay.java 19 Feb 2005 08:37:14 -0000 1.6 *************** *** 87,90 **** --- 87,91 ---- private Amount toPayChange; private Amount payChange; + private static ConfirmActionUI confirm; /** *************** *** 191,194 **** --- 192,203 ---- invokeFunction(parent); } + try + { + confirmCancelReceiptAction.dispose(); + confirmCancelReceiptAction = null; + } + catch(NullPointerException e) + { + } } }; *************** *** 410,413 **** --- 419,429 ---- invokeFunction(parent); } + try + { + userInput.dispose(); + userInput = null; + } + catch(NullPointerException e) + {} } *************** *** 426,429 **** --- 442,453 ---- // re-invoke payment selection invokeFunction(parent); + + try + { + userInput.dispose(); + userInput = null; + } + catch(NullPointerException e) + {} } *************** *** 625,632 **** log.error(e.getMessage(), e); } } }; // customer has change due, show message ! ConfirmActionUI message = new ConfirmActionUI(parent, messageString, ConfirmActionUI.OK_SELECTION, listener, yesText, noText, okText, cancelText); --- 649,664 ---- log.error(e.getMessage(), e); } + try + { + confirm.dispose(); + confirm = null; + } + catch(NullPointerException e) + { + } } }; // customer has change due, show message ! /*ConfirmActionUI*/ confirm = new ConfirmActionUI(parent, messageString, ConfirmActionUI.OK_SELECTION, listener, yesText, noText, okText, cancelText); Index: RowDiscountAmount.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin/function/RowDiscountAmount.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** RowDiscountAmount.java 18 Jan 2005 15:31:56 -0000 1.3 --- RowDiscountAmount.java 19 Feb 2005 08:37:14 -0000 1.4 *************** *** 90,93 **** --- 90,100 ---- { inputOKSelected(); + try + { + input.dispose(); + input = null; + } + catch(NullPointerException e) + {} } *************** *** 95,98 **** --- 102,112 ---- { inputCancelSelected(); + try + { + input.dispose(); + input = null; + } + catch(NullPointerException e) + {} } }; Index: MakeTallyAndReport.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin/function/MakeTallyAndReport.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** MakeTallyAndReport.java 10 Jan 2005 14:54:05 -0000 1.3 --- MakeTallyAndReport.java 19 Feb 2005 08:37:14 -0000 1.4 *************** *** 51,54 **** --- 51,55 ---- private POSEngineUtility posEngineUtility; + private ConfirmActionUI confirm; *************** *** 105,108 **** --- 106,117 ---- break; } + try + { + confirm.dispose(); + confirm = null; + } + catch(NullPointerException e) + { + } } }; *************** *** 121,125 **** "Do you want to create a new cashreport?"); ! ConfirmActionUI confirm = new ConfirmActionUI(parent, message, ConfirmActionUI.YES_NO_SELECTION, listener, yesText, noText, okText, cancelText); --- 130,134 ---- "Do you want to create a new cashreport?"); ! /*ConfirmActionUI*/ confirm = new ConfirmActionUI(parent, message, ConfirmActionUI.YES_NO_SELECTION, listener, yesText, noText, okText, cancelText); |
From: Lennart P. <le...@us...> - 2005-02-19 08:35:48
|
Update of /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin/function In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22015/src/org/redpos/client/ui/plugin/function Modified Files: FindProduct.java Log Message: Added dispose of SWT composite. Use of findProductByTextOrBarcode Index: FindProduct.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin/function/FindProduct.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** FindProduct.java 18 Jan 2005 15:31:56 -0000 1.4 --- FindProduct.java 19 Feb 2005 08:35:39 -0000 1.5 *************** *** 60,64 **** private String defaultPricelistId; ! private Integer productSearchInput; --- 60,64 ---- private String defaultPricelistId; ! private Integer productSearchInput; *************** *** 78,81 **** --- 78,89 ---- * ui.clearTable(); ui.setFocusInInput(); } */ + // Ok, but at least we should call dispose on the old UI ! + try + { + ui.dispose(); + } + catch(NullPointerException e) + { + } ui = null; ui = new FindProductUI(parent, language, this, productSearchInput); *************** *** 94,104 **** "RedPOS.client:service=ProductStorage"); ! Object[] params = {value, value, value, Boolean.TRUE}; String[] signature = {"java.lang.String", "java.lang.String", ! "java.lang.String", "java.lang.Boolean"}; // call pos core method Vector response = (Vector)getServer().invoke(posCore, ! "findProductByTextOrProductIdOrBarcode", params, signature); if(response.isEmpty()) --- 102,112 ---- "RedPOS.client:service=ProductStorage"); ! Object[] params = {value, value, Boolean.TRUE}; String[] signature = {"java.lang.String", "java.lang.String", ! "java.lang.Boolean"}; // call pos core method Vector response = (Vector)getServer().invoke(posCore, ! "findProductByTextOrBarcode", params, signature); if(response.isEmpty()) *************** *** 182,190 **** defaultPricelistId = (String)po.getProperty("pos", "defaultpricelist"); ! productSearchInput = (Integer)po.getProperty("pos", "productsearchinput"); } ! ! /** * Invoked by the FindProductUI * --- 190,198 ---- defaultPricelistId = (String)po.getProperty("pos", "defaultpricelist"); ! productSearchInput = (Integer)po.getProperty("pos", "productsearchinput"); } ! ! /** * Invoked by the FindProductUI * *************** *** 240,244 **** { dAmount = Double.valueOf(input); ! if(dAmount.doubleValue() >= 10000) { --- 248,252 ---- { dAmount = Double.valueOf(input); ! if(dAmount.doubleValue() >= 10000) { *************** *** 246,250 **** String message = language.getString( "ui.main.message.editreceiptrow4.text", ! "You have to enter a valid price"); sendUIMessage(message); --- 254,258 ---- String message = language.getString( "ui.main.message.editreceiptrow4.text", ! "You have to enter a valid price"); sendUIMessage(message); *************** *** 257,266 **** addProductToReceipt(selectedProduct, amount); } ! catch (NumberFormatException e) { // send message to ui String message = language.getString( "ui.main.message.editreceiptrow4.text", ! "You have to enter a valid price"); sendUIMessage(message); userInput.setFocus(); --- 265,274 ---- addProductToReceipt(selectedProduct, amount); } ! catch(NumberFormatException e) { // send message to ui String message = language.getString( "ui.main.message.editreceiptrow4.text", ! "You have to enter a valid price"); sendUIMessage(message); userInput.setFocus(); *************** *** 270,273 **** --- 278,289 ---- else userInput.setFocus(); + try + { + userInput.dispose(); + userInput = null; + } + catch(NullPointerException e) + { + } } *************** *** 280,283 **** --- 296,307 ---- PluginFunctionConstants.NOTIFICATION_FUNCTION_FINISHED, null); + try + { + userInput.dispose(); + userInput = null; + } + catch(NullPointerException e) + { + } } *************** *** 314,321 **** Object parameters[] = {product.getProductId(), Boolean.TRUE, new Double(1), price}; ! String signature[] = {"java.lang.String", "java.lang.Boolean", "java.lang.Double", "org.redpos.amount.Amount"}; ! // TODO: the used method in the POS service will redo the search of // this product, add a new method for just adding product? --- 338,345 ---- Object parameters[] = {product.getProductId(), Boolean.TRUE, new Double(1), price}; ! String signature[] = {"java.lang.String", "java.lang.Boolean", "java.lang.Double", "org.redpos.amount.Amount"}; ! // TODO: the used method in the POS service will redo the search of // this product, add a new method for just adding product? |
From: Lennart P. <le...@us...> - 2005-02-19 08:34:02
|
Update of /cvsroot/redpos/RedPOS/src/org/redpos/client/ui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21760/src/org/redpos/client/ui Modified Files: UIShell.java Log Message: Use of Sleak tool. Commented out by default. Index: UIShell.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/UIShell.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** UIShell.java 23 Nov 2004 16:02:09 -0000 1.1 --- UIShell.java 19 Feb 2005 08:33:53 -0000 1.2 *************** *** 151,154 **** --- 151,162 ---- try { + // Sleak start + /* DeviceData data = new DeviceData(); + data.tracking = true; + Display display = new Display(data); + Sleak sleak = new Sleak(); + sleak.open(); + */ // Sleak end + Display display = new Display(); shell = new Shell(display); *************** *** 161,165 **** shell.open(); ! while(!shell.isDisposed()) { if(!display.readAndDispatch()) --- 169,174 ---- shell.open(); ! // Sleak. ! while(!/*sleak.*/shell.isDisposed()) { if(!display.readAndDispatch()) |
From: Lennart P. <le...@us...> - 2005-02-19 08:33:20
|
Update of /cvsroot/redpos/RedPOS/src/org/redpos/client/ui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21691/src/org/redpos/client/ui Added Files: Sleak.java Log Message: Eclipse tool to search for leaks of display resources. Good to have! --- NEW FILE: Sleak.java --- /******************************************************************************* * Copyright (c) 2004 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Common Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/cpl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package org.redpos.client.ui; import org.eclipse.swt.*; import org.eclipse.swt.graphics.*; import org.eclipse.swt.widgets.*; import java.io.*; /** * Instructions on how to use the Sleak tool with a standlaone SWT example: * * Modify the main method below to launch your application. * Run Sleak. * */ public class Sleak { Display display; Shell shell; List list; Canvas canvas; Button start, stop, check; Text text; Label label; Object[] oldObjects = new Object[0]; Error[] oldErrors = new Error[0]; Object[] objects = new Object[0]; Error[] errors = new Error[0]; public static void main(String[] args) { DeviceData data = new DeviceData(); data.tracking = true; Display display = new Display(data); Sleak sleak = new Sleak(); sleak.open(); // Launch you application here // e.g. // Shell shell = new Shell(display); // Button button1 = new Button(shell, SWT.PUSH); // button1.setBounds(10, 10, 100, 50); // button1.setText("Hello World"); // Image image = new Image(display, 20, 20); // Button button2 = new Button(shell, SWT.PUSH); // button2.setBounds(10, 70, 100, 50); // button2.setImage(image); // shell.open(); while(!sleak.shell.isDisposed()) { if(!display.readAndDispatch()) display.sleep(); } display.dispose(); } void open() { display = Display.getCurrent(); shell = new Shell(display); shell.setText("S-Leak"); list = new List(shell, SWT.BORDER | SWT.V_SCROLL); list.addListener(SWT.Selection, new Listener() { public void handleEvent(Event event) { refreshObject(); } }); text = new Text(shell, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL); canvas = new Canvas(shell, SWT.BORDER); canvas.addListener(SWT.Paint, new Listener() { public void handleEvent(Event event) { paintCanvas(event); } }); check = new Button(shell, SWT.CHECK); check.setText("Stack"); check.addListener(SWT.Selection, new Listener() { public void handleEvent(Event e) { toggleStackTrace(); } }); start = new Button(shell, SWT.PUSH); start.setText("Snap"); start.addListener(SWT.Selection, new Listener() { public void handleEvent(Event event) { refreshAll(); } }); stop = new Button(shell, SWT.PUSH); stop.setText("Diff"); stop.addListener(SWT.Selection, new Listener() { public void handleEvent(Event event) { refreshDifference(); } }); label = new Label(shell, SWT.BORDER); label.setText("0 object(s)"); shell.addListener(SWT.Resize, new Listener() { public void handleEvent(Event e) { layout(); } }); check.setSelection(false); text.setVisible(false); Point size = shell.getSize(); shell.setSize(size.x / 2, size.y / 2); shell.open(); } void refreshLabel() { int colors = 0, cursors = 0, fonts = 0, gcs = 0, images = 0, regions = 0; for(int i = 0; i < objects.length; i++) { Object object = objects[i]; if(object instanceof Color) colors++; if(object instanceof Cursor) cursors++; if(object instanceof Font) fonts++; if(object instanceof GC) gcs++; if(object instanceof Image) images++; if(object instanceof Region) regions++; } String string = ""; if(colors != 0) string += colors + " Color(s)\n"; if(cursors != 0) string += cursors + " Cursor(s)\n"; if(fonts != 0) string += fonts + " Font(s)\n"; if(gcs != 0) string += gcs + " GC(s)\n"; if(images != 0) string += images + " Image(s)\n"; if(regions != 0) string += regions + " Region(s)\n"; if(string.length() != 0) { string = string.substring(0, string.length() - 1); } label.setText(string); } void refreshDifference() { DeviceData info = display.getDeviceData(); if(!info.tracking) { MessageBox dialog = new MessageBox(shell, SWT.ICON_WARNING | SWT.OK); dialog.setText(shell.getText()); dialog.setMessage("Warning: Device is not tracking resource allocation"); dialog.open(); } Object[] newObjects = info.objects; Error[] newErrors = info.errors; Object[] diffObjects = new Object[newObjects.length]; Error[] diffErrors = new Error[newErrors.length]; int count = 0; for(int i = 0; i < newObjects.length; i++) { int index = 0; while(index < oldObjects.length) { if(newObjects[i] == oldObjects[index]) break; index++; } if(index == oldObjects.length) { diffObjects[count] = newObjects[i]; diffErrors[count] = newErrors[i]; count++; } } objects = new Object[count]; errors = new Error[count]; System.arraycopy(diffObjects, 0, objects, 0, count); System.arraycopy(diffErrors, 0, errors, 0, count); list.removeAll(); text.setText(""); canvas.redraw(); for(int i = 0; i < objects.length; i++) { list.add(objectName(objects[i])); } refreshLabel(); layout(); } String objectName(Object object) { String string = object.toString(); int index = string.lastIndexOf('.'); if(index == -1) return string; return string.substring(index + 1, string.length()); } void toggleStackTrace() { refreshObject(); layout(); } void paintCanvas(Event event) { canvas.setCursor(null); int index = list.getSelectionIndex(); if(index == -1) return; GC gc = event.gc; Object object = objects[index]; if(object instanceof Color) { if(((Color)object).isDisposed()) return; gc.setBackground((Color)object); gc.fillRectangle(canvas.getClientArea()); return; } if(object instanceof Cursor) { if(((Cursor)object).isDisposed()) return; canvas.setCursor((Cursor)object); return; } if(object instanceof Font) { if(((Font)object).isDisposed()) return; gc.setFont((Font)object); FontData[] array = gc.getFont().getFontData(); String string = ""; String lf = text.getLineDelimiter(); for(int i = 0; i < array.length; i++) { FontData data = array[i]; String style = "NORMAL"; int bits = data.getStyle(); if(bits != 0) { if((bits & SWT.BOLD) != 0) style = "BOLD "; if((bits & SWT.ITALIC) != 0) style += "ITALIC"; } string += data.getName() + " " + data.getHeight() + " " + style + lf; } gc.drawString(string, 0, 0); return; } //NOTHING TO DRAW FOR GC // if (object instanceof GC) { // return; // } if(object instanceof Image) { if(((Image)object).isDisposed()) return; gc.drawImage((Image)object, 0, 0); return; } if(object instanceof Region) { if(((Region)object).isDisposed()) return; String string = ((Region)object).getBounds().toString(); gc.drawString(string, 0, 0); return; } } void refreshObject() { int index = list.getSelectionIndex(); if(index == -1) return; if(check.getSelection()) { ByteArrayOutputStream stream = new ByteArrayOutputStream(); PrintStream s = new PrintStream(stream); errors[index].printStackTrace(s); text.setText(stream.toString()); text.setVisible(true); canvas.setVisible(false); } else { canvas.setVisible(true); text.setVisible(false); canvas.redraw(); } } void refreshAll() { oldObjects = new Object[0]; oldErrors = new Error[0]; refreshDifference(); oldObjects = objects; oldErrors = errors; } void layout() { Rectangle rect = shell.getClientArea(); int width = 0; String[] items = list.getItems(); GC gc = new GC(list); for(int i = 0; i < objects.length; i++) { width = Math.max(width, gc.stringExtent(items[i]).x); } gc.dispose(); Point size1 = start.computeSize(SWT.DEFAULT, SWT.DEFAULT); Point size2 = stop.computeSize(SWT.DEFAULT, SWT.DEFAULT); Point size3 = check.computeSize(SWT.DEFAULT, SWT.DEFAULT); Point size4 = label.computeSize(SWT.DEFAULT, SWT.DEFAULT); width = Math.max(size1.x, Math.max(size2.x, Math.max(size3.x, width))); width = Math.max(64, Math.max(size4.x, list.computeSize(width, SWT.DEFAULT).x)); start.setBounds(0, 0, width, size1.y); stop.setBounds(0, size1.y, width, size2.y); check.setBounds(0, size1.y + size2.y, width, size3.y); label.setBounds(0, rect.height - size4.y, width, size4.y); int height = size1.y + size2.y + size3.y; list.setBounds(0, height, width, rect.height - height - size4.y); text.setBounds(width, 0, rect.width - width, rect.height); canvas.setBounds(width, 0, rect.width - width, rect.height); } } |
From: Lennart P. <le...@us...> - 2005-02-19 08:31:27
|
Update of /cvsroot/redpos/RedPOS/src/org/redpos/client/receipt In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21413/src/org/redpos/client/receipt Modified Files: ReceiptStorage.java Log Message: Commented out not used finders. Index: ReceiptStorage.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/receipt/ReceiptStorage.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ReceiptStorage.java 11 Jan 2005 17:11:36 -0000 1.2 --- ReceiptStorage.java 19 Feb 2005 08:31:19 -0000 1.3 *************** *** 430,434 **** * @return * @throws SQLException ! */ public Vector findReceiptsById(final String receiptId) throws SQLException { --- 430,434 ---- * @return * @throws SQLException ! * TODO Seems not to be used, remove it public Vector findReceiptsById(final String receiptId) throws SQLException { *************** *** 452,455 **** --- 452,456 ---- return receipts; } + */ |
From: Lennart P. <le...@us...> - 2005-02-19 08:29:45
|
Update of /cvsroot/redpos/RedPOS/src/org/redpos/client/product In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21041/src/org/redpos/client/product Modified Files: ProductStorage.java Log Message: Commented out not used finders. Method findProductByBarcode() now first searching on Barcode2 where EAN is. Method findProductByTextOrProductIdOrBarcode became findProductByTextOrBarcode. Index: ProductStorage.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/product/ProductStorage.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ProductStorage.java 23 Nov 2004 16:02:43 -0000 1.1 --- ProductStorage.java 19 Feb 2005 08:29:35 -0000 1.2 *************** *** 127,153 **** * @param like * @return ! */ ! public Vector findProductByText(final String text, Boolean like) ! throws SQLException ! { ! // create column names for where clause ! String where[] = {DB_COLUMN_NAME_PRODUCTTEXT}; ! // create values for where clause ! String values[] = {text}; ! // create column names for order by ! String orderBy[] = {DB_COLUMN_NAME_PRODUCTTEXT}; ! // call select in table ! Vector result = productTable.select(getConnection(), where, values, ! orderBy, like.booleanValue(), true); ! Vector products = new Vector(); ! for(Iterator iter = result.iterator(); iter.hasNext();) ! { ! RedPOSRow row = (RedPOSRow)iter.next(); ! products.add(createProductData(row)); ! } ! return products; ! } /** --- 127,154 ---- * @param like * @return ! * TODO Seems to not be used - remove it ! public Vector findProductByText(final String text, Boolean like) ! throws SQLException ! { ! // create column names for where clause ! String where[] = {DB_COLUMN_NAME_PRODUCTTEXT}; ! // create values for where clause ! String values[] = {text}; ! // create column names for order by ! String orderBy[] = {DB_COLUMN_NAME_PRODUCTTEXT}; ! // call select in table ! Vector result = productTable.select(getConnection(), where, values, ! orderBy, like.booleanValue(), true); ! Vector products = new Vector(); ! for(Iterator iter = result.iterator(); iter.hasNext();) ! { ! RedPOSRow row = (RedPOSRow)iter.next(); ! products.add(createProductData(row)); ! } ! return products; ! } ! */ /** *************** *** 181,208 **** * @param like * @return ! */ ! public Vector findProductByTextOrProductId(final String text, ! final String productId, ! Boolean like) throws SQLException ! { ! // create column names for where clause ! String where[] = {DB_COLUMN_NAME_PRODUCTTEXT, DB_COLUMN_NAME_PRODUCTID}; ! // create values for where clause ! String values[] = {text, productId}; ! // create column names for order by ! String orderBy[] = {DB_COLUMN_NAME_PRODUCTTEXT}; ! // call select in table ! Vector result = productTable.select(getConnection(), where, values, ! orderBy, like.booleanValue(), false); ! Vector products = new Vector(); ! for(Iterator iter = result.iterator(); iter.hasNext();) ! { ! RedPOSRow row = (RedPOSRow)iter.next(); ! products.add(createProductData(row)); ! } ! return products; ! } /** --- 182,210 ---- * @param like * @return ! * TODO Seems not to be used, remove it ! public Vector findProductByTextOrProductId(final String text, ! final String productId, ! Boolean like) throws SQLException ! { ! // create column names for where clause ! String where[] = {DB_COLUMN_NAME_PRODUCTTEXT, DB_COLUMN_NAME_PRODUCTID}; ! // create values for where clause ! String values[] = {text, productId}; ! // create column names for order by ! String orderBy[] = {DB_COLUMN_NAME_PRODUCTTEXT}; ! // call select in table ! Vector result = productTable.select(getConnection(), where, values, ! orderBy, like.booleanValue(), false); ! Vector products = new Vector(); ! for(Iterator iter = result.iterator(); iter.hasNext();) ! { ! RedPOSRow row = (RedPOSRow)iter.next(); ! products.add(createProductData(row)); ! } ! return products; ! } ! */ /** *************** *** 216,220 **** * @return */ ! public Vector findProductByTextOrProductIdOrBarcode( final String text, final String productId, --- 218,222 ---- * @return */ ! public Vector findProductByTextOrBarcode( final String text, final String productId, *************** *** 224,231 **** { // create column names for where clause ! String where[] = {DB_COLUMN_NAME_PRODUCTTEXT, DB_COLUMN_NAME_PRODUCTID, ! DB_COLUMN_NAME_BARCODE1}; // create values for where clause ! String values[] = {text, productId, primBarcode}; // create column names for order by String orderBy[] = {DB_COLUMN_NAME_PRODUCTTEXT}; --- 226,232 ---- { // create column names for where clause ! String where[] = {DB_COLUMN_NAME_PRODUCTTEXT, DB_COLUMN_NAME_BARCODE1}; // create values for where clause ! String values[] = {text, primBarcode}; // create column names for order by String orderBy[] = {DB_COLUMN_NAME_PRODUCTTEXT}; *************** *** 255,259 **** { // create column names for where clause ! String where[] = {DB_COLUMN_NAME_BARCODE1}; // create values for where clause String values[] = {barcode}; --- 256,260 ---- { // create column names for where clause ! String where[] = {DB_COLUMN_NAME_BARCODE2}; // barcode // create values for where clause String values[] = {barcode}; *************** *** 264,269 **** if(result.isEmpty()) { ! // no result, try second barcode column ! where[0] = DB_COLUMN_NAME_BARCODE2; // call select in table result = productTable.select(getConnection(), where, values, null, --- 265,270 ---- if(result.isEmpty()) { ! // no result, try first barcode column ! where[0] = DB_COLUMN_NAME_BARCODE1; // RedPOS product id // call select in table result = productTable.select(getConnection(), where, values, null, *************** *** 271,275 **** if(result.isEmpty()) { ! // no result try third barcode column where[0] = DB_COLUMN_NAME_BARCODE3; // call select in table --- 272,276 ---- if(result.isEmpty()) { ! // no result try third barcode column // where[0] = DB_COLUMN_NAME_BARCODE3; // call select in table |
From: Lennart P. <le...@us...> - 2005-02-19 08:19:01
|
Update of /cvsroot/redpos/RedPOS/src/org/redpos/client/device In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19062/src/org/redpos/client/device Modified Files: ReceiptPrinterRowFactory.java Log Message: Removed unused import statements Index: ReceiptPrinterRowFactory.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/device/ReceiptPrinterRowFactory.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ReceiptPrinterRowFactory.java 17 Jan 2005 10:23:23 -0000 1.3 --- ReceiptPrinterRowFactory.java 19 Feb 2005 08:18:52 -0000 1.4 *************** *** 26,34 **** import java.text.DateFormat; - import javax.management.JMException; - import org.redpos.amount.Amount; - import org.redpos.client.contract.POSEngineUtility; - import org.redpos.client.contract.properties.PropertiesUtility; import org.redpos.client.contract.receipt.DiscountReceiptRow; import org.redpos.client.contract.receipt.ReceiptConstants; --- 26,30 ---- |
From: Lennart P. <le...@us...> - 2005-02-19 08:17:42
|
Update of /cvsroot/redpos/RedPOS/src/org/redpos/client/contract/db In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18769/src/org/redpos/client/contract/db Modified Files: RedPOSTable.java Log Message: Removed unused import statements Index: RedPOSTable.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/contract/db/RedPOSTable.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** RedPOSTable.java 19 Feb 2005 08:16:06 -0000 1.2 --- RedPOSTable.java 19 Feb 2005 08:17:30 -0000 1.3 *************** *** 31,36 **** import org.jboss.logging.Logger; - import org.redpos.client.contract.pricelist.PriceListData; - import org.redpos.client.pricelist.PriceListStorage; /** --- 31,34 ---- |
From: Lennart P. <le...@us...> - 2005-02-19 08:16:16
|
Update of /cvsroot/redpos/RedPOS/src/org/redpos/client/contract/db In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18469/src/org/redpos/client/contract/db Modified Files: RedPOSTable.java Log Message: Stop using UPPER in WHERE clause. Added printStackTrace() when SQLException Index: RedPOSTable.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/contract/db/RedPOSTable.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** RedPOSTable.java 23 Nov 2004 16:03:31 -0000 1.1 --- RedPOSTable.java 19 Feb 2005 08:16:06 -0000 1.2 *************** *** 31,34 **** --- 31,36 ---- import org.jboss.logging.Logger; + import org.redpos.client.contract.pricelist.PriceListData; + import org.redpos.client.pricelist.PriceListStorage; /** *************** *** 153,157 **** sql.append(" FROM "); sql.append(tableName); ! // add where clause sql.append(" WHERE "); --- 155,159 ---- sql.append(" FROM "); sql.append(tableName); ! // add where clause sql.append(" WHERE "); *************** *** 161,167 **** { // TODO this can be DB specific. Parameterize this then? ! sql.append("UPPER ("); sql.append(where[i]); ! sql.append(")"); } else --- 163,170 ---- { // TODO this can be DB specific. Parameterize this then? ! // UPPER is a real perfomance killer. Using VARCHAR_IGNORECASE in hsqldb instead + adding indexes ! //sql.append("UPPER ("); sql.append(where[i]); ! //sql.append(")"); } else *************** *** 192,196 **** log.debug(sql.toString()); ! // prepare statement PreparedStatement ps = connection.prepareStatement(sql.toString()); --- 195,199 ---- log.debug(sql.toString()); ! // prepare statement PreparedStatement ps = connection.prepareStatement(sql.toString()); *************** *** 254,257 **** --- 257,265 ---- } + catch(SQLException e) + { + e.printStackTrace(); + throw e; + } finally { |
From: Lennart P. <le...@us...> - 2005-02-19 08:07:37
|
Update of /cvsroot/redpos/RedPOS/db/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16962/db/scripts Modified Files: localDB.data localDB.properties localDB.script Added Files: localDB.log Log Message: Added index on RPPRODCT, RPRECIPT and RPTALLY --- NEW FILE: localDB.log --- /*C2*/CONNECT USER SA SET AUTOCOMMIT FALSE DISCONNECT Index: localDB.properties =================================================================== RCS file: /cvsroot/redpos/RedPOS/db/scripts/localDB.properties,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** localDB.properties 27 Dec 2004 22:35:05 -0000 1.2 --- localDB.properties 19 Feb 2005 08:07:28 -0000 1.3 *************** *** 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 --- 1,20 ---- #HSQL database ! #Sat Feb 19 08:56:41 CET 2005 ! hsqldb.cache_file_scale=1 ! runtime.gc_interval=0 ! hsqldb.first_identity=0 ! version=1.7.2 ! modified=yes ! hsqldb.script_format=0 ! sql.enforce_size=false ! hsqldb.cache_size_scale=10 hsqldb.cache_scale=14 ! hsqldb.version=1.7.2 hsqldb.log_size=200 ! sql.enforce_strict_size=false ! readonly=false ! hsqldb.compatible_version=1.7.2 hsqldb.original_version=1.7.1 ! sql.compare_in_locale=false ! hsqldb.nio_data_file=true ! hsqldb.cache_version=1.7.0 Index: localDB.script =================================================================== RCS file: /cvsroot/redpos/RedPOS/db/scripts/localDB.script,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** localDB.script 11 Jan 2005 09:26:50 -0000 1.3 --- localDB.script 19 Feb 2005 08:07:28 -0000 1.4 *************** *** 1,97 **** ! CREATE TABLE RPPRODCT(PRODUCTID VARCHAR NOT NULL PRIMARY KEY,BARCODE1 VARCHAR NOT NULL,BARCODE2 VARCHAR,BARCODE3 VARCHAR,PRODUCTTEXT VARCHAR NOT NULL,CAMPAIGNCODE VARCHAR,SERVICES VARCHAR,SALESUPPORT VARCHAR,TAXPERCENTAGE DOUBLE,DISCOUNTABLE BIT,BLOCKED BIT,CONSTRAINT SYS_CT_1 UNIQUE(PRODUCTID)) CREATE TABLE RPPRCLST(PRODUCTID VARCHAR NOT NULL,PRICELISTID VARCHAR NOT NULL,NETPRICE DOUBLE,GROSSPRICE DOUBLE,CURRENCY VARCHAR,TAXAMOUNT DOUBLE,CONSTRAINT SYS_PK_RPPRCLST PRIMARY KEY(PRODUCTID,PRICELISTID),CONSTRAINT SYS_CT_3 UNIQUE(PRODUCTID,PRICELISTID)) ! CREATE CACHED TABLE RPRECIPT(RECEIPTID VARCHAR NOT NULL PRIMARY KEY,REGISTERID VARCHAR NOT NULL,STOREID VARCHAR NOT NULL,CASHIER VARCHAR NOT NULL,PRICELISTID VARCHAR NOT NULL,ADDEDDATE TIMESTAMP NOT NULL,RECEIPTTYPE INTEGER NOT NULL,RECEIPTSTATUS INTEGER NOT NULL,UPLOADED BIT,TALLIED BIT,CONSTRAINT SYS_CT_5 UNIQUE(RECEIPTID)) 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)) ! 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" ! CREATE ALIAS SPACE FOR "org.hsqldb.Library.space" ! CREATE ALIAS SUBSTRING FOR "org.hsqldb.Library.substring" ! CREATE ALIAS HEXTORAW FOR "org.hsqldb.Library.hexToRaw" ! CREATE ALIAS SQRT FOR "java.lang.Math.sqrt" ! CREATE ALIAS ABS FOR "org.hsqldb.Library.abs" ! CREATE ALIAS POWER FOR "java.lang.Math.pow" ! CREATE ALIAS CHAR FOR "org.hsqldb.Library.character" ! CREATE ALIAS CONCAT FOR "org.hsqldb.Library.concat" ! CREATE ALIAS PI FOR "org.hsqldb.Library.pi" ! CREATE ALIAS RAWTOHEX FOR "org.hsqldb.Library.rawToHex" ! CREATE ALIAS SECOND FOR "org.hsqldb.Library.second" ! CREATE ALIAS TRUNCATE FOR "org.hsqldb.Library.truncate" ! CREATE ALIAS MONTH FOR "org.hsqldb.Library.month" ! CREATE ALIAS LOWER FOR "org.hsqldb.Library.lcase" ! CREATE ALIAS ATAN2 FOR "java.lang.Math.atan2" ! CREATE ALIAS REPEAT FOR "org.hsqldb.Library.repeat" ! CREATE ALIAS DAYOFMONTH FOR "org.hsqldb.Library.dayofmonth" ! CREATE ALIAS TAN FOR "java.lang.Math.tan" ! CREATE ALIAS RADIANS FOR "java.lang.Math.toRadians" ! CREATE ALIAS FLOOR FOR "java.lang.Math.floor" ! CREATE ALIAS NOW FOR "org.hsqldb.Library.now" ! CREATE ALIAS ACOS FOR "java.lang.Math.acos" ! CREATE ALIAS DAYOFWEEK FOR "org.hsqldb.Library.dayofweek" ! CREATE ALIAS CEILING FOR "java.lang.Math.ceil" ! CREATE ALIAS DAYOFYEAR FOR "org.hsqldb.Library.dayofyear" ! CREATE ALIAS LCASE FOR "org.hsqldb.Library.lcase" ! CREATE ALIAS WEEK FOR "org.hsqldb.Library.week" ! CREATE ALIAS SOUNDEX FOR "org.hsqldb.Library.soundex" ! CREATE ALIAS ASIN FOR "java.lang.Math.asin" ! CREATE ALIAS LOCATE FOR "org.hsqldb.Library.locate" ! CREATE ALIAS EXP FOR "java.lang.Math.exp" ! CREATE ALIAS MONTHNAME FOR "org.hsqldb.Library.monthname" ! CREATE ALIAS YEAR FOR "org.hsqldb.Library.year" ! CREATE ALIAS LEFT FOR "org.hsqldb.Library.left" ! CREATE ALIAS ROUNDMAGIC FOR "org.hsqldb.Library.roundMagic" ! CREATE ALIAS BITOR FOR "org.hsqldb.Library.bitor" ! CREATE ALIAS LTRIM FOR "org.hsqldb.Library.ltrim" ! CREATE ALIAS COT FOR "org.hsqldb.Library.cot" ! CREATE ALIAS COS FOR "java.lang.Math.cos" ! CREATE ALIAS MOD FOR "org.hsqldb.Library.mod" ! CREATE ALIAS SIGN FOR "org.hsqldb.Library.sign" ! CREATE ALIAS DEGREES FOR "java.lang.Math.toDegrees" ! CREATE ALIAS LOG FOR "java.lang.Math.log" ! CREATE ALIAS SIN FOR "java.lang.Math.sin" ! CREATE ALIAS CURTIME FOR "org.hsqldb.Library.curtime" ! CREATE ALIAS DIFFERENCE FOR "org.hsqldb.Library.difference" ! CREATE ALIAS INSERT FOR "org.hsqldb.Library.insert" ! CREATE ALIAS SUBSTR FOR "org.hsqldb.Library.substring" ! CREATE ALIAS DATABASE FOR "org.hsqldb.Library.database" ! CREATE ALIAS MINUTE FOR "org.hsqldb.Library.minute" ! CREATE ALIAS HOUR FOR "org.hsqldb.Library.hour" ! CREATE ALIAS IDENTITY FOR "org.hsqldb.Library.identity" ! CREATE ALIAS QUARTER FOR "org.hsqldb.Library.quarter" ! CREATE ALIAS CURDATE FOR "org.hsqldb.Library.curdate" ! CREATE ALIAS BITAND FOR "org.hsqldb.Library.bitand" ! CREATE ALIAS USER FOR "org.hsqldb.Library.user" ! CREATE ALIAS UCASE FOR "org.hsqldb.Library.ucase" ! CREATE ALIAS RTRIM FOR "org.hsqldb.Library.rtrim" ! CREATE ALIAS LOG10 FOR "org.hsqldb.Library.log10" ! CREATE ALIAS RIGHT FOR "org.hsqldb.Library.right" ! CREATE ALIAS ATAN FOR "java.lang.Math.atan" ! CREATE ALIAS UPPER FOR "org.hsqldb.Library.ucase" ! CREATE ALIAS ASCII FOR "org.hsqldb.Library.ascii" ! CREATE ALIAS RAND FOR "java.lang.Math.random" ! CREATE ALIAS LENGTH FOR "org.hsqldb.Library.length" ! CREATE ALIAS ROUND FOR "org.hsqldb.Library.round" ! CREATE ALIAS REPLACE FOR "org.hsqldb.Library.replace" ! INSERT INTO RPPRODCT VALUES('1','1','7314440250073','BARCODE3','Water','','','Fresh water on bottle',0.25E0,true,false) ! INSERT INTO RPPRODCT VALUES('10','10','3086126100326','BARCODE3','Fermented herring','','','Served with cold milk, beware of the smell',0.25E0,true,false) ! INSERT INTO RPPRODCT VALUES('12','12','7310321250002','BARCODE3','Vegemite','','','Concentrated yeast extract',0.25E0,true,false) ! INSERT INTO RPPRODCT VALUES('2','2','7311310027094','BARCODE3','Clothes','','','Genuine brand',0.25E0,true,false) ! INSERT INTO RPPRODCT VALUES('3','3','7310130418006','BARCODE3','Fruit','','','Fresh and tasty',0.25E0,true,false) ! INSERT INTO RPPRODCT VALUES('4','4','7300330003218','BARCODE3','Shoes','','','Made for walking',0.25E0,true,false) ! INSERT INTO RPPRODCT VALUES('5','5','7310186023056','BARCODE3','Record','','','Play some music',0.25E0,true,false) ! INSERT INTO RPPRODCT VALUES('6','6','7310106023685','BARCODE3','Sport','','','Sport and fitness',0.25E0,true,false) ! INSERT INTO RPPRODCT VALUES('7','7','7310130418013','BARCODE3','Sony Ericsson T610','','','Offer the customer Bluetooth Headset',0.25E0,true,false) ! 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) --- 1,30 ---- ! CREATE TABLE RPPRODCT(PRODUCTID VARCHAR NOT NULL PRIMARY KEY,BARCODE1 VARCHAR_IGNORECASE NOT NULL,BARCODE2 VARCHAR_IGNORECASE,BARCODE3 VARCHAR_IGNORECASE,PRODUCTTEXT VARCHAR_IGNORECASE NOT NULL,CAMPAIGNCODE VARCHAR,SERVICES VARCHAR,SALESUPPORT VARCHAR,TAXPERCENTAGE DOUBLE,DISCOUNTABLE BOOLEAN,BLOCKED BOOLEAN,CONSTRAINT SYS_CT_1 UNIQUE(PRODUCTID)) ! CREATE INDEX RPPRODCT_IX1 ON RPPRODCT(BARCODE1) ! CREATE INDEX RPPRODCT_IX2 ON RPPRODCT(BARCODE2) ! CREATE INDEX RPPRODCT_IX3 ON RPPRODCT(PRODUCTTEXT) CREATE TABLE RPPRCLST(PRODUCTID VARCHAR NOT NULL,PRICELISTID VARCHAR NOT NULL,NETPRICE DOUBLE,GROSSPRICE DOUBLE,CURRENCY VARCHAR,TAXAMOUNT DOUBLE,CONSTRAINT SYS_PK_RPPRCLST PRIMARY KEY(PRODUCTID,PRICELISTID),CONSTRAINT SYS_CT_3 UNIQUE(PRODUCTID,PRICELISTID)) ! CREATE CACHED TABLE RPRECIPT(RECEIPTID VARCHAR NOT NULL PRIMARY KEY,REGISTERID VARCHAR NOT NULL,STOREID VARCHAR NOT NULL,CASHIER VARCHAR NOT NULL,PRICELISTID VARCHAR NOT NULL,ADDEDDATE TIMESTAMP NOT NULL,RECEIPTTYPE INTEGER NOT NULL,RECEIPTSTATUS INTEGER NOT NULL,UPLOADED BOOLEAN,TALLIED BOOLEAN,CONSTRAINT SYS_CT_5 UNIQUE(RECEIPTID)) ! CREATE INDEX RPRECIPT_IX1 ON RPRECIPT(REGISTERID,TALLIED) ! CREATE INDEX RPRECIPT_IX2 ON RPRECIPT(UPLOADED) 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_IGNORECASE 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_IGNORECASE 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 BOOLEAN,CONSTRAINT SYS_CT_13 UNIQUE(TALLYID)) ! CREATE INDEX RPTALLY_IX1 ON RPTALLY(CREATEDDATE) 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 RPUSERS INDEX'32 32 1' CREATE USER SA PASSWORD "" ADMIN ! SET WRITE_DELAY 60 ! INSERT INTO RPPRODCT VALUES('1','1','7314440250073','BARCODE3','Water','','','Fresh water on bottle',0.25E0,TRUE,FALSE) ! INSERT INTO RPPRODCT VALUES('10','10','3086126100326','BARCODE3','Fermented herring','','','Served with cold milk, beware of the smell',0.25E0,TRUE,FALSE) ! INSERT INTO RPPRODCT VALUES('12','12','7310321250002','BARCODE3','Vegemite','','','Concentrated yeast extract',0.25E0,TRUE,FALSE) ! INSERT INTO RPPRODCT VALUES('2','2','7311310027094','BARCODE3','Clothes','','','Genuine brand',0.25E0,TRUE,FALSE) ! INSERT INTO RPPRODCT VALUES('3','3','7310130418006','BARCODE3','Fruit','','','Fresh and tasty',0.25E0,TRUE,FALSE) ! INSERT INTO RPPRODCT VALUES('4','4','7300330003218','BARCODE3','Shoes','','','Made for walking',0.25E0,TRUE,FALSE) ! INSERT INTO RPPRODCT VALUES('5','5','7310186023056','BARCODE3','Record','','','Play some music',0.25E0,TRUE,FALSE) ! INSERT INTO RPPRODCT VALUES('6','6','7310106023685','BARCODE3','Sport','','','Sport and fitness',0.25E0,TRUE,FALSE) ! INSERT INTO RPPRODCT VALUES('7','7','7310130418013','BARCODE3','Sony Ericsson T610','','','Offer the customer Bluetooth Headset',0.25E0,TRUE,FALSE) ! 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) Index: localDB.data =================================================================== RCS file: /cvsroot/redpos/RedPOS/db/scripts/localDB.data,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 Binary files /tmp/cvsTlIInB and /tmp/cvsvE6R6o differ |
From: Anneli <an...@us...> - 2005-01-18 15:32:25
|
Update of /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin/function In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30990/src/org/redpos/client/ui/plugin/function Modified Files: TotalDiscountAmount.java FindProduct.java RowDiscountAmount.java Pay.java TotalDiscountPercent.java RowDiscountPercent.java EditReceiptRow.java Log Message: Better handling of NumberFormatException Index: FindProduct.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin/function/FindProduct.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** FindProduct.java 10 Jan 2005 15:23:42 -0000 1.3 --- FindProduct.java 18 Jan 2005 15:31:56 -0000 1.4 *************** *** 236,256 **** if(input != null && input.length() > 0) { ! Double dAmount = Double.valueOf(input); ! if(dAmount.doubleValue() >= 10000) { // send message to ui String message = language.getString( "ui.main.message.editreceiptrow4.text", ! "You have to enter a valid price"); sendUIMessage(message); - userInput.setFocus(); return; } - - Amount amount = new Amount(dAmount.doubleValue()); - - addProductToReceipt(selectedProduct, amount); } else --- 236,270 ---- if(input != null && input.length() > 0) { ! Double dAmount; ! try ! { ! dAmount = Double.valueOf(input); ! ! if(dAmount.doubleValue() >= 10000) ! { ! // send message to ui ! String message = language.getString( ! "ui.main.message.editreceiptrow4.text", ! "You have to enter a valid price"); ! sendUIMessage(message); ! userInput.setFocus(); ! return; ! } ! ! Amount amount = new Amount(dAmount.doubleValue()); ! ! addProductToReceipt(selectedProduct, amount); ! } ! catch (NumberFormatException e) { // send message to ui String message = language.getString( "ui.main.message.editreceiptrow4.text", ! "You have to enter a valid price"); sendUIMessage(message); userInput.setFocus(); return; } } else Index: TotalDiscountAmount.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin/function/TotalDiscountAmount.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TotalDiscountAmount.java 3 Jan 2005 12:15:34 -0000 1.2 --- TotalDiscountAmount.java 18 Jan 2005 15:31:56 -0000 1.3 *************** *** 142,148 **** 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); --- 142,163 ---- if (in.length() != 0) { ! Amount amount; ! try ! { ! // convert to amount ! amount = new Amount(Double.valueOf(in).doubleValue()); ! } ! catch (NumberFormatException e) ! { ! String message = ""; ! message = getLanguageString("ui.main.message.totaldiscountamount4.text", ! "You have to enter a valid value"); + sendUIMessage(message); + input.setFocus(); + return; + } + + // calls POS engine method and add the discount boolean ok = addTotalDiscount(amount); Index: Pay.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin/function/Pay.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Pay.java 17 Jan 2005 10:23:21 -0000 1.4 --- Pay.java 18 Jan 2005 15:31:57 -0000 1.5 *************** *** 339,343 **** inputMessage, inputLabelText, true, getLanguage(), this); userInput.setFocus(); ! } } else --- 339,343 ---- inputMessage, inputLabelText, true, getLanguage(), this); userInput.setFocus(); ! } } else *************** *** 365,386 **** // get input from user String input = userInput.getInput(); Amount amount; ! if(input == null || input.length() == 0) { ! amount = getAmountToPay(); ! payChange = new Amount(0); } ! else { ! Double dAmount = Double.valueOf(input); ! amount = new Amount(dAmount.doubleValue()); ! payChange = new Amount(dAmount.doubleValue()); ! } ! ! getLog().info( ! "handlePaymentSelected: entered amount = " + amount.toString()); ! // add the payment using the POS Engine service ! addPayment(payment, amount); // see if there is more to pay, if so re-invoke payment selection --- 365,400 ---- // get input from user String input = userInput.getInput(); + Amount amount; ! try { ! if(input == null || input.length() == 0) ! { ! amount = getAmountToPay(); ! payChange = new Amount(0); ! } ! else ! { ! Double dAmount = Double.valueOf(input); ! amount = new Amount(dAmount.doubleValue()); ! payChange = new Amount(dAmount.doubleValue()); ! } ! ! getLog().info( ! "handlePaymentSelected: entered amount = " + amount.toString()); ! ! // add the payment using the POS Engine service ! addPayment(payment, amount); } ! catch (NumberFormatException e) { ! String message = ""; ! message = getLanguageString("ui.main.message.pay7.text", ! "Couldn't add payment"); ! this.sendUIMessage(message); ! userInput.setFocus(); ! return; ! } // see if there is more to pay, if so re-invoke payment selection Index: EditReceiptRow.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin/function/EditReceiptRow.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** EditReceiptRow.java 23 Nov 2004 16:02:27 -0000 1.1 --- EditReceiptRow.java 18 Jan 2005 15:31:57 -0000 1.2 *************** *** 142,160 **** quantityString = quantityString.replace(',', '.'); priceString = priceString.replace(',', '.'); ! // update receipt row object with new info ! // ! Double quantity = Double.valueOf(quantityString); ! if(quantity.doubleValue() >= 1000) { ! // send message to ui ! String message = getLanguageString( ! "ui.main.message.editreceiptrow3.text", ! "You have to enter a valid quantity"); ! sendUIMessage(message); ui.setFocusInQuantity(); return; } if(receiptRow.getQuantity() < 0 && quantity.doubleValue() > 0) --- 142,176 ---- quantityString = quantityString.replace(',', '.'); priceString = priceString.replace(',', '.'); + + Double quantity; ! try { ! // update receipt row object with new info ! // ! quantity = Double.valueOf(quantityString); ! if(quantity.doubleValue() >= 1000) ! { ! // send message to ui ! String message = getLanguageString( ! "ui.main.message.editreceiptrow3.text", ! "You have to enter a valid quantity"); ! sendUIMessage(message); + ui.setFocusInQuantity(); + return; + } + } + catch (NumberFormatException e) + { + String message = ""; + message = getLanguageString("ui.main.message.editreceiptrow3.text", + "You have to enter a valid quantity"); + + sendUIMessage(message); ui.setFocusInQuantity(); return; } + if(receiptRow.getQuantity() < 0 && quantity.doubleValue() > 0) *************** *** 163,180 **** receiptRow.setQuantity(quantity.doubleValue()); ! Double price = Double.valueOf(priceString); ! if(price.doubleValue() >= 10000) { ! // send message to ui ! String message = getLanguageString( ! "ui.main.message.editreceiptrow4.text", ! "You have to enter a valid price"); ! sendUIMessage(message); ui.setFocusInPrice(); return; } ! // if price has changed, update tax amount if(price.doubleValue() != receiptRow.getAmount().doubleValue()) --- 179,212 ---- receiptRow.setQuantity(quantity.doubleValue()); ! Double price; ! ! try ! { ! price = Double.valueOf(priceString); ! ! if(price.doubleValue() >= 10000) ! { ! // send message to ui ! String message = getLanguageString( ! "ui.main.message.editreceiptrow4.text", ! "You have to enter a valid price"); ! sendUIMessage(message); ! ! ui.setFocusInPrice(); ! return; ! } ! } ! catch (NumberFormatException e) { ! String message = ""; ! message = getLanguageString("ui.main.message.editreceiptrow4.text", ! "You have to enter a valid price"); + sendUIMessage(message); ui.setFocusInPrice(); return; } ! // if price has changed, update tax amount if(price.doubleValue() != receiptRow.getAmount().doubleValue()) *************** *** 186,190 **** receiptRow.setTaxAmount(taxAmount); } ! // call update receipt row in receipt service // --- 218,222 ---- receiptRow.setTaxAmount(taxAmount); } ! // call update receipt row in receipt service // Index: RowDiscountAmount.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin/function/RowDiscountAmount.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** RowDiscountAmount.java 3 Jan 2005 12:15:34 -0000 1.2 --- RowDiscountAmount.java 18 Jan 2005 15:31:56 -0000 1.3 *************** *** 123,129 **** 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); --- 123,144 ---- if (in.length() != 0) { ! Amount amount; ! try ! { ! // convert to amount ! amount = new Amount(Double.valueOf(in).doubleValue()); + } + catch (NumberFormatException e) + { + String message = ""; + message = getLanguageString("ui.main.message.rowdiscountamount5.text", + "You have to enter a valid value"); + + sendUIMessage(message); + input.setFocus(); + return; + } + // calls POS engine method and add the discount boolean ok = addRowDiscount(amount); Index: RowDiscountPercent.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin/function/RowDiscountPercent.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** RowDiscountPercent.java 3 Jan 2005 12:15:34 -0000 1.2 --- RowDiscountPercent.java 18 Jan 2005 15:31:57 -0000 1.3 *************** *** 123,130 **** 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)); --- 123,144 ---- if (in.length() != 0) { ! double percent; ! try ! { ! // convert to percent ! percent = Double.valueOf(in).doubleValue(); ! percent = percent / 100; ! } ! catch (NumberFormatException e) ! { ! String message = ""; ! message = getLanguageString("ui.main.message.rowdiscountamount5.text", ! "You have to enter a valid value"); + sendUIMessage(message); + input.setFocus(); + return; + } + // calls POS engine method and add the discount boolean ok = addRowDiscount(new Double(percent)); Index: TotalDiscountPercent.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin/function/TotalDiscountPercent.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TotalDiscountPercent.java 3 Jan 2005 12:15:34 -0000 1.2 --- TotalDiscountPercent.java 18 Jan 2005 15:31:57 -0000 1.3 *************** *** 141,148 **** 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)); --- 141,162 ---- if (in.length() != 0) { ! double percent; ! try ! { ! // convert to percent ! percent = Double.valueOf(in).doubleValue(); ! percent = percent / 100; ! } ! catch (NumberFormatException e) ! { ! String message = ""; ! message = getLanguageString("ui.main.message.totaldiscountpercent4.text", ! "You have to enter a valid value"); + sendUIMessage(message); + input.setFocus(); + return; + } + // calls POS engine method and add the discount boolean ok = addTotalDiscount(new Double(percent)); |
From: Anneli <an...@us...> - 2005-01-18 15:32:19
|
Update of /cvsroot/redpos/RedPOS/lang/conf In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30990/lang/conf Modified Files: lang-en-EN.xml lang-sv-SE.xml Log Message: Better handling of NumberFormatException Index: lang-sv-SE.xml =================================================================== RCS file: /cvsroot/redpos/RedPOS/lang/conf/lang-sv-SE.xml,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** lang-sv-SE.xml 17 Jan 2005 10:23:21 -0000 1.5 --- lang-sv-SE.xml 18 Jan 2005 15:31:58 -0000 1.6 *************** *** 151,158 **** --- 151,160 ---- <string desc="UI main window message" name="ui.main.message.rowdiscountamount3.text">* För stort belopp angivet *</string> <string desc="UI main window message" name="ui.main.message.rowdiscountamount4.text">! Det går inte att lägga till rabatten !</string> + <string desc="UI main window message" name="ui.main.message.rowdiscountamount5.text">! Ange giltigt värde !</string> <string desc="UI main window message" name="ui.main.message.rowdiscountpercent1.text">* Du måste välja en rad först *</string> <string desc="UI main window message" name="ui.main.message.rowdiscountpercent2.text">* Vald rad tillåter ingen rabatt *</string> <string desc="UI main window message" name="ui.main.message.rowdiscountpercent3.text">* För hög procent angiven *</string> <string desc="UI main window message" name="ui.main.message.rowdiscountpercent4.text">! Det gick inte att lägga till rabatten !</string> + <string desc="UI main window message" name="ui.main.message.rowdiscountpercent5.text">! Ange giltigt värde !</string> <string desc="UI main window message" name="ui.main.message.startcomplaint1.text">* Kan inte starta reklamation när ett annat kvitto pågår *</string> <string desc="UI main window message" name="ui.main.message.startcomplaint2.text">! Kan inte starta reklamationskvitto !</string> *************** *** 164,170 **** --- 166,174 ---- <string desc="UI main window message" name="ui.main.message.totaldiscountamount2.text">* För stort belopp angivet *</string> <string desc="UI main window message" name="ui.main.message.totaldiscountamount3.text">! Det går inte att lägga till rabatten !</string> + <string desc="UI main window message" name="ui.main.message.totaldiscountamount4.text">! Ange giltigt värde !</string> <string desc="UI main window message" name="ui.main.message.totaldiscountpercent1.text">* Kan inte att registrera rabatt om inte kvitto pågår *</string> <string desc="UI main window message" name="ui.main.message.totaldiscountpercent2.text">* För hög procent angiven *</string> <string desc="UI main window message" name="ui.main.message.totaldiscountpercent3.text">! Det går inte att lägga till rabatten !</string> + <string desc="UI main window message" name="ui.main.message.totaldiscountpercent4.text">! Ange giltigt värde !</string> <string desc="UI main window message" name="ui.main.message.printreceiptagain1.text">* Det finns inget föregående kvitto att skriva ut *</string> Index: lang-en-EN.xml =================================================================== RCS file: /cvsroot/redpos/RedPOS/lang/conf/lang-en-EN.xml,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** lang-en-EN.xml 17 Jan 2005 10:23:20 -0000 1.5 --- lang-en-EN.xml 18 Jan 2005 15:31:58 -0000 1.6 *************** *** 149,156 **** --- 149,158 ---- <string desc="UI main window message" name="ui.main.message.rowdiscountamount3.text">* The amount is to large *</string> <string desc="UI main window message" name="ui.main.message.rowdiscountamount4.text">! The discount could not be performed !</string> + <string desc="UI main window message" name="ui.main.message.rowdiscountamount5.text">! You have to enter a valid value !</string> <string desc="UI main window message" name="ui.main.message.rowdiscountpercent1.text">* You need to select a receipt row first *</string> <string desc="UI main window message" name="ui.main.message.rowdiscountpercent2.text">* Selected row does not allow discount *</string> <string desc="UI main window message" name="ui.main.message.rowdiscountpercent3.text">* The percent value is to high *</string> <string desc="UI main window message" name="ui.main.message.rowdiscountpercent4.text">! The discount could not be performed !</string> + <string desc="UI main window message" name="ui.main.message.rowdiscountpercent5.text">! You have to enter a valid value !</string> <string desc="UI main window message" name="ui.main.message.startcomplaint1.text">* Can not start a Complaint Receipt until the current receipt have been finished *</string> <string desc="UI main window message" name="ui.main.message.startcomplaint2.text">! Could not start Compaint Receipt !</string> *************** *** 162,168 **** --- 164,172 ---- <string desc="UI main window message" name="ui.main.message.totaldiscountamount2.text">* The amount is to large *</string> <string desc="UI main window message" name="ui.main.message.totaldiscountamount3.text">! Could not perform discount !</string> + <string desc="UI main window message" name="ui.main.message.totaldiscountamount4.text">! You have to enter a valid value !</string> <string desc="UI main window message" name="ui.main.message.totaldiscountpercent1.text">* Can not enter a discount unless a receipt have been created *</string> <string desc="UI main window message" name="ui.main.message.totaldiscountpercent2.text">* the percent value is to high *</string> <string desc="UI main window message" name="ui.main.message.totaldiscountpercent3.text">! Could not perform discount !</string> + <string desc="UI main window message" name="ui.main.message.totaldiscountpercent4.text">! You have to enter a valid value !</string> <string desc="UI main window message" name="ui.main.message.printreceiptagain1.text">* No previous receipt exists and can therefore not be printed *</string> |
From: Anneli <an...@us...> - 2005-01-18 15:32:19
|
Update of /cvsroot/redpos/RedPOS/src/org/redpos/client/ui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30990/src/org/redpos/client/ui Modified Files: POSDashboardProductPriceReceiver.java Log Message: Better handling of NumberFormatException Index: POSDashboardProductPriceReceiver.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/POSDashboardProductPriceReceiver.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** POSDashboardProductPriceReceiver.java 23 Nov 2004 16:02:09 -0000 1.1 --- POSDashboardProductPriceReceiver.java 18 Jan 2005 15:31:58 -0000 1.2 *************** *** 255,273 **** if(amountString != null && amountString.length() > 0) { // convert input to double, this throws NumberFormatException // which is handled in the catch clause below // replace ',' with '.' in string amountString = amountString.replace(',', '.'); - Double amountDouble = Double.valueOf(amountString); - - if(amountDouble.doubleValue() >= 10000) - { - setFocus(); - return; - } - - Amount amount = new Amount(amountDouble.doubleValue()); try { // call POS engine service // --- 255,275 ---- if(amountString != null && amountString.length() > 0) { + // convert input to double, this throws NumberFormatException // which is handled in the catch clause below // replace ',' with '.' in string amountString = amountString.replace(',', '.'); try { + Double amountDouble = Double.valueOf(amountString); + + if(amountDouble.doubleValue() >= 10000) + { + setFocus(); + return; + } + + Amount amount = new Amount(amountDouble.doubleValue()); + // call POS engine service // |
From: Anneli <an...@us...> - 2005-01-17 15:49:02
|
Update of /cvsroot/redpos/RedPOS In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14308 Modified Files: build.xml Log Message: New version number 1_6_0_0 Index: build.xml =================================================================== RCS file: /cvsroot/redpos/RedPOS/build.xml,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** build.xml 13 Jan 2005 15:52:49 -0000 1.13 --- build.xml 17 Jan 2005 15:48:49 -0000 1.14 *************** *** 73,83 **** <!-- Version identifiers for the project --> <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"/> --- 73,83 ---- <!-- Version identifiers for the project --> <property name="version.major" value="1"/> ! <property name="version.minor" value="6"/> ! <property name="version.revision" value="0"/> <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_6_0_0"/> <property name="version.appname" value="RedPOS"/> <property name="version.url" value="http://www.redpos.org"/> |
From: Anneli <an...@us...> - 2005-01-17 10:35:40
|
Update of /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin/function In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19693/src/org/redpos/client/ui/plugin/function Modified Files: FindSaveReceipt.java Log Message: When choosing back on the question about save receipt the ongoing receipt gets focus. Index: FindSaveReceipt.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin/function/FindSaveReceipt.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FindSaveReceipt.java 11 Jan 2005 17:11:39 -0000 1.1 --- FindSaveReceipt.java 17 Jan 2005 10:35:28 -0000 1.2 *************** *** 86,107 **** 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); ! } } --- 86,139 ---- public void selectionMade(int selection) { ! switch(selection) { ! case ConfirmActionUI.YES_OPTION: ! 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); ! } ! break; ! ! case ConfirmActionUI.NO_OPTION: ! UIDisabler.getInstance().fireEnable(); ! // send notification ! fireNotification( ! PluginFunctionConstants.NOTIFICATION_FUNCTION_FINISHED, null); ! ! break; ! ! default: ! // send notification ! 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); ! } ! break; ! } ! } *************** *** 272,279 **** amount.subtract(receiptRowData.getAmount()); } ! else { ! */ amount.add(receiptRowData.getAmount()); ! // } } --- 304,320 ---- amount.subtract(receiptRowData.getAmount()); } ! */ ! if (receiptRowData.getStatus() != ReceiptConstants.STATUS_RECEIPTROW_CANCELLED) { ! Amount rowSum = new Amount(0.0); ! if (receiptRowData.getQuantity() != 1) ! { ! rowSum = (Amount)receiptRowData.getAmount().clone(); ! rowSum.multiply(receiptRowData.getQuantity()); ! amount.add(rowSum); ! } ! else ! amount.add(receiptRowData.getAmount()); ! } } |
From: Anneli <an...@us...> - 2005-01-17 10:28:31
|
Update of /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin/function In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18475/src/org/redpos/client/ui/plugin/function Modified Files: FindReceiptUI.java FindProductUI.java Log Message: The choosen product/receipt can now be added to receipt even if the user has moved focus to the input field, and then presses add. Index: FindProductUI.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin/function/FindProductUI.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** FindProductUI.java 12 Jan 2005 15:43:21 -0000 1.3 --- FindProductUI.java 17 Jan 2005 10:28:15 -0000 1.4 *************** *** 88,91 **** --- 88,93 ---- private Integer productSearch; + + private ProductTableItemData productTableItemData; /** *************** *** 390,396 **** private void productInfoToRegisterSelected() { ! ProductTableItemData product = getSelectedProduct(); ! listener.addProductToReceiptSelected(product.productData, ! product.priceData); } --- 392,398 ---- private void productInfoToRegisterSelected() { ! listener.addProductToReceiptSelected(productTableItemData.productData, ! productTableItemData.priceData); ! } *************** *** 506,517 **** { // get product data ! ProductTableItemData product = (ProductTableItemData)item.getData(); // set product info String priceText; ! if(product.priceData != null) { ! Amount amount = new Amount(product.priceData.getGrossPrice(), ! product.priceData.getCurrency()); priceText = amount.toString(); } --- 508,519 ---- { // get product data ! productTableItemData = (ProductTableItemData)item.getData(); // set product info String priceText; ! if(productTableItemData.priceData != null) { ! Amount amount = new Amount(productTableItemData.priceData.getGrossPrice(), ! productTableItemData.priceData.getCurrency()); priceText = amount.toString(); } *************** *** 519,532 **** priceText = noPriceText; ! productInfoName.setText(product.productData.getProductText()); productInfoPrice.setText(priceText); ! if(product.productData.getProductId() != null) ! productInfoId.setText(product.productData.getBarcode1()); else productInfoId.setText(""); ! if(product.productData.getSalesupport() != null) ! productInfoSalesupport.setText(product.productData.getSalesupport()); else productInfoSalesupport.setText(""); --- 521,534 ---- priceText = noPriceText; ! productInfoName.setText(productTableItemData.productData.getProductText()); productInfoPrice.setText(priceText); ! if(productTableItemData.productData.getProductId() != null) ! productInfoId.setText(productTableItemData.productData.getBarcode1()); else productInfoId.setText(""); ! if(productTableItemData.productData.getSalesupport() != null) ! productInfoSalesupport.setText(productTableItemData.productData.getSalesupport()); else productInfoSalesupport.setText(""); Index: FindReceiptUI.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin/function/FindReceiptUI.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FindReceiptUI.java 12 Jan 2005 15:43:21 -0000 1.2 --- FindReceiptUI.java 17 Jan 2005 10:28:15 -0000 1.3 *************** *** 82,85 **** --- 82,86 ---- private Label receiptTypeText; private Label receiptType; + private ReceiptTableItemData receiptTableItemData; *************** *** 422,427 **** private void receiptInfoToRegisterSelected() { ! ReceiptTableItemData receipt = getSelectedReceipt(); ! listener.addReceiptSelected(receipt); } --- 423,427 ---- private void receiptInfoToRegisterSelected() { ! listener.addReceiptSelected(receiptTableItemData); } *************** *** 492,514 **** { // 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()); String type = ""; ! if (receipt.receiptData.getReceiptType() == ReceiptConstants.TYPE_RECEIPT_NORMAL) type = language.getString( "ui.plugin.receipt.findreceipt.string3.text", "Sale"); ! if (receipt.receiptData.getReceiptType() == ReceiptConstants.TYPE_RECEIPT_COMPLAINT) type = language.getString( "ui.plugin.receipt.findreceipt.string4.text", "Complaint"); ! if (receipt.receiptData.getReceiptType() == ReceiptConstants.TYPE_RECEIPT_CORRECTION) type = language.getString( "ui.plugin.receipt.findreceipt.string5.text", "Correction"); ! if (receipt.receiptData.getReceiptType() == ReceiptConstants.TYPE_RECEIPT_RETURN) type = language.getString( "ui.plugin.receipt.findreceipt.string6.text", "Return"); --- 492,514 ---- { // get receipt data ! receiptTableItemData = (ReceiptTableItemData)item.getData(); // set receipt info ! receiptId.setText(receiptTableItemData.receiptData.getReceiptId()); SimpleDateFormat sdf = new SimpleDateFormat("yyMMd hh:mm:ss"); ! String date = sdf.format(receiptTableItemData.receiptData.getAddedDate()); receiptDate.setText(date); ! receiptCashier.setText(receiptTableItemData.receiptData.getCashier()); ! receiptAmount.setText(receiptTableItemData.amountTotal.toString()); String type = ""; ! if (receiptTableItemData.receiptData.getReceiptType() == ReceiptConstants.TYPE_RECEIPT_NORMAL) type = language.getString( "ui.plugin.receipt.findreceipt.string3.text", "Sale"); ! if (receiptTableItemData.receiptData.getReceiptType() == ReceiptConstants.TYPE_RECEIPT_COMPLAINT) type = language.getString( "ui.plugin.receipt.findreceipt.string4.text", "Complaint"); ! if (receiptTableItemData.receiptData.getReceiptType() == ReceiptConstants.TYPE_RECEIPT_CORRECTION) type = language.getString( "ui.plugin.receipt.findreceipt.string5.text", "Correction"); ! if (receiptTableItemData.receiptData.getReceiptType() == ReceiptConstants.TYPE_RECEIPT_RETURN) type = language.getString( "ui.plugin.receipt.findreceipt.string6.text", "Return"); |
From: Anneli <an...@us...> - 2005-01-17 10:25:55
|
Update of /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin/function In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18200/src/org/redpos/client/ui/plugin/function Modified Files: CustomerService.java Log Message: When we have an ongoing receipt the test of login per receipt is not made Index: CustomerService.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin/function/CustomerService.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CustomerService.java 11 Jan 2005 17:14:15 -0000 1.1 --- CustomerService.java 17 Jan 2005 10:25:41 -0000 1.2 *************** *** 29,32 **** --- 29,33 ---- import org.eclipse.swt.widgets.Composite; import org.redpos.client.contract.POSEngineUtility; + import org.redpos.client.contract.receipt.ReceiptSessionUtility; import org.redpos.client.ui.plugin.PluginFunctionMBeanSupport; import org.redpos.client.ui.plugin.contract.PluginFunctionConstants; *************** *** 48,51 **** --- 49,55 ---- private POSEngineUtility posEngineUtility = null; + /** Receipt session service utility instance * */ + private ReceiptSessionUtility receiptSessionUtility = null; + /** *************** *** 64,77 **** PluginFunctionConstants.NOTIFICATION_FUNCTION_FINISHED, null); ! try { ! if (posEngineUtility.getLoginPerReceipt()) ! { ! fireNotification(PluginFunctionConstants.NOTIFICATION_LOGIN_PER_RECEIPT, null); ! } } ! catch(JMException e) { ! log.error(e.getMessage(), e); } } --- 68,88 ---- PluginFunctionConstants.NOTIFICATION_FUNCTION_FINISHED, null); ! if(isReceiptStarted()) { ! // } ! else { ! try ! { ! if (posEngineUtility.getLoginPerReceipt()) ! { ! fireNotification(PluginFunctionConstants.NOTIFICATION_LOGIN_PER_RECEIPT, null); ! } ! } ! catch(JMException e) ! { ! log.error(e.getMessage(), e); ! } } } *************** *** 97,100 **** --- 108,123 ---- } + public boolean isReceiptStarted() + { + try + { + return receiptSessionUtility.isReceiptStarted(); + } + catch(JMException e) + { + log.error(e.getMessage(), e); + return false; + } + } /** * Invoked when service is started *************** *** 108,111 **** --- 131,135 ---- "Customer Service")); posEngineUtility = new POSEngineUtility(getServer()); + receiptSessionUtility = new ReceiptSessionUtility(getServer()); } |