TavernerPOS - Source Code

Clone: 

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

 

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();

Comments   
# Kitchen-receipt not printingJulio Ponce 2016-08-01 16:37
Good day I was Wondering if the button add in home screen to print kitchen receipt is avaliable in version 1.4, after clicking SAVE button wont print kitchen receipt, any help you can provide is welcome.

Best regards Julio
Reply | Reply with quote | Quote
# RE: Kitchen-receipt not printingMatt Smith 2016-08-01 17:52
Quoting Julio Ponce:
Good day I was Wondering if the button add in home screen to print kitchen receipt is avaliable in version 1.4, after clicking SAVE button wont print kitchen receipt, any help you can provide is welcome.

Best regards Julio


Hi,

As far as I'm aware none of that code has been changed that pertains to kitchen printers. Was it working on a previous build of TavernerPos?

Matt
Reply | Reply with quote | Quote
# printing on saveNathaniel Gabriel 2018-01-18 21:52
I was Wondering if the print on save could be done, if yes how please.
Reply | Reply with quote | Quote
Add comment