TavernerPOS - Source Code

Clone: 

git clone http://www.librarysmith.co.uk/tavernerPOS

 

viewgit/viewgit/inc/functions.php:49 Function create_function() is deprecated [8192]

Index » tavernerPOS : Commitdiff ef64ca

Backport fix for menu-items import/export.

Matt Smith [15-12-07 11:24]
Backport fix for menu-items import/export.
diff --git a/src/com/floreantpos/bo/actions/DataExportAction.java b/src/com/floreantpos/bo/actions/DataExportAction.java
old mode 100644
new mode 100755
index 048f91b..7f75658
--- a/src/com/floreantpos/bo/actions/DataExportAction.java
+++ b/src/com/floreantpos/bo/actions/DataExportAction.java
@@ -113,8 +113,8 @@ public class DataExportAction extends AbstractAction {
 			POSMessageDialog.showMessage(com.floreantpos.util.POSUtil.getFocusedWindow(), Messages.getString("DataExportAction.4")); //$NON-NLS-1$

 		} catch (Exception e1) {
-			transaction.rollback();
 			e1.printStackTrace();
+			transaction.rollback();
 			POSMessageDialog.showMessage(com.floreantpos.util.POSUtil.getFocusedWindow(), e1.getMessage());
 		} finally {
 			IOUtils.closeQuietly(fileWriter);
diff --git a/src/com/floreantpos/model/MenuItem.java b/src/com/floreantpos/model/MenuItem.java
old mode 100644
new mode 100755
index 25376f6..2b4a86f
--- a/src/com/floreantpos/model/MenuItem.java
+++ b/src/com/floreantpos/model/MenuItem.java
@@ -1,3 +1,20 @@
+/**
+ * ************************************************************************
+ * * The contents of this file are subject to the MRPL 1.2
+ * * (the  "License"),  being   the  Mozilla   Public  License
+ * * Version 1.1  with a permitted attribution clause; you may not  use this
+ * * file except in compliance with the License. You  may  obtain  a copy of
+ * * the License at http://www.floreantpos.org/license.html
+ * * Software distributed under the License  is  distributed  on  an "AS IS"
+ * * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * * License for the specific  language  governing  rights  and  limitations
+ * * under the License.
+ * * The Original Code is FLOREANT POS.
+ * * The Initial Developer of the Original Code is OROCUBE LLC
+ * * All portions are Copyright (C) 2015 OROCUBE LLC
+ * * All Rights Reserved.
+ * ************************************************************************
+ */
 package com.floreantpos.model;

 import java.awt.Color;
@@ -6,6 +23,7 @@ import java.util.List;

 import javax.swing.ImageIcon;
 import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlTransient;

 import org.apache.commons.lang.StringUtils;

@@ -33,13 +51,21 @@ public class MenuItem extends BaseMenuItem {
 	/**
 	 * Constructor for required fields
 	 */
-	public MenuItem(java.lang.Integer id, java.lang.String name, java.lang.Double buyPrice, java.lang.Double price) {
+	public MenuItem(
+			java.lang.Integer id,
+			java.lang.String name,
+			java.lang.Double buyPrice,
+			java.lang.Double price) {

-		super(id, name, buyPrice, price);
+		super(
+				id,
+				name,
+				buyPrice,
+				price);
 	}

 	/*[CONSTRUCTOR MARKER END]*/
-
+	@XmlTransient
 	public ImageIcon getImageAsIcon() {
 		Image scaledInstance = null;
 		ImageIcon icon = null;
@@ -76,7 +102,7 @@ public class MenuItem extends BaseMenuItem {

 	}

-	@Override
+	@XmlTransient //@Override
 	public Integer getButtonColor() {
 		return buttonColor;
 	}
@@ -85,7 +111,8 @@ public class MenuItem extends BaseMenuItem {
 	public Integer getTextColor() {
 		return textColor;
 	}
-
+
+	@XmlTransient
 	public String getDisplayName() {
 		if (TerminalConfig.isUseTranslatedName() && StringUtils.isNotEmpty(getTranslatedName())) {
 			return getTranslatedName();

Add comment
These comments are moderated so so won't be published until reviewed.