merge main
This commit is contained in:
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
<groupId>com.unicenta</groupId>
|
<groupId>com.unicenta</groupId>
|
||||||
<artifactId>unicentaopos</artifactId>
|
<artifactId>unicentaopos</artifactId>
|
||||||
<version>5.3.2</version>
|
<version>5.4.0</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
<properties>
|
<properties>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
@@ -361,7 +361,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.unicenta</groupId>
|
<groupId>com.unicenta</groupId>
|
||||||
<artifactId>unicenta-plugins</artifactId>
|
<artifactId>unicenta-plugins</artifactId>
|
||||||
<version>1.3.0-SNAPSHOT</version>
|
<version>1.2.9-SNAPSHOT</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.gluonhq</groupId>
|
<groupId>com.gluonhq</groupId>
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ public class AppLocal {
|
|||||||
|
|
||||||
public static final String APP_NAME = "uniCenta oPOS";
|
public static final String APP_NAME = "uniCenta oPOS";
|
||||||
public static final String APP_ID = "unicentaopos";
|
public static final String APP_ID = "unicentaopos";
|
||||||
public static final String APP_VERSION = "5.3.2";
|
public static final String APP_VERSION = "5.4.0";
|
||||||
|
|
||||||
private static final LocaleResources m_resources;
|
private static final LocaleResources m_resources;
|
||||||
|
|
||||||
|
|||||||
@@ -197,7 +197,7 @@ public class DataLogicSales extends BeanFactoryDataSingle {
|
|||||||
, new SerializerWriteBasic(new Datas[]{
|
, new SerializerWriteBasic(new Datas[]{
|
||||||
Datas.STRING,
|
Datas.STRING,
|
||||||
Datas.STRING,
|
Datas.STRING,
|
||||||
Datas.BOOLEAN})
|
Datas.INT})
|
||||||
);
|
);
|
||||||
|
|
||||||
m_createSupp = new StaticSentence(s,
|
m_createSupp = new StaticSentence(s,
|
||||||
@@ -635,6 +635,22 @@ public class DataLogicSales extends BeanFactoryDataSingle {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public final CategoryInfo getCategoryInfoByName(String name) throws BasicException {
|
||||||
|
return (CategoryInfo) new PreparedSentence(s
|
||||||
|
, "SELECT "
|
||||||
|
+ "ID, "
|
||||||
|
+ "NAME, "
|
||||||
|
+ "IMAGE, "
|
||||||
|
+ "TEXTTIP, "
|
||||||
|
+ "CATSHOWNAME, "
|
||||||
|
+ "CATORDER "
|
||||||
|
+ "FROM categories "
|
||||||
|
+ "WHERE NAME = ? "
|
||||||
|
+ "ORDER BY CATORDER, NAME"
|
||||||
|
, SerializerWriteString.INSTANCE
|
||||||
|
, CategoryInfo.getSerializerRead()).find(name);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param id
|
* @param id
|
||||||
|
|||||||
@@ -129,7 +129,7 @@ public class StartPOS {
|
|||||||
metrics.setUniCentaVersion(AppLocal.APP_VERSION);
|
metrics.setUniCentaVersion(AppLocal.APP_VERSION);
|
||||||
Application application = new Application();
|
Application application = new Application();
|
||||||
application.postMetrics(metrics);
|
application.postMetrics(metrics);
|
||||||
application.startEventListener(host, jRootApp);
|
application.startEventListener(host, jRootApp, null);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("Problem with starting the uniCenta plugin application:${}", e.getMessage());
|
log.error("Problem with starting the uniCenta plugin application:${}", e.getMessage());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ public class JPanelCSVImport extends JPanel implements JPanelView {
|
|||||||
|
|
||||||
protected SaveProvider spr;
|
protected SaveProvider spr;
|
||||||
|
|
||||||
private String Category;
|
private String category;
|
||||||
private String categoryName;
|
private String categoryName;
|
||||||
private String categoryParentid;
|
private String categoryParentid;
|
||||||
private Integer categoryCatorder;
|
private Integer categoryCatorder;
|
||||||
@@ -374,7 +374,7 @@ public class JPanelCSVImport extends JPanel implements JPanelView {
|
|||||||
String SellPrice = products.get((String) jComboSell.getSelectedItem());
|
String SellPrice = products.get((String) jComboSell.getSelectedItem());
|
||||||
productTax = products.get((String) jComboTax.getSelectedItem());
|
productTax = products.get((String) jComboTax.getSelectedItem());
|
||||||
|
|
||||||
Category = products.get((String) jComboCategory.getSelectedItem());
|
category = products.get((String) jComboCategory.getSelectedItem());
|
||||||
Supplier = products.get((String) jComboSupplier.getSelectedItem());
|
Supplier = products.get((String) jComboSupplier.getSelectedItem());
|
||||||
|
|
||||||
currentRecord++;
|
currentRecord++;
|
||||||
@@ -518,17 +518,17 @@ public class JPanelCSVImport extends JPanel implements JPanelView {
|
|||||||
private String getCategory() {
|
private String getCategory() {
|
||||||
|
|
||||||
if (jComboCategory.getSelectedItem() != category_default) {
|
if (jComboCategory.getSelectedItem() != category_default) {
|
||||||
String cat = (String) cat_list.get(Category);
|
String cat = (String) cat_list.get(category);
|
||||||
|
|
||||||
if (cat != null) {
|
if (cat != null) {
|
||||||
return (cat);
|
return (cat);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!Category.equals("")) {
|
if (!category.equals("")) {
|
||||||
Object[] newcat = new Object[3];
|
Object[] newcat = new Object[3];
|
||||||
newcat[0] = UUID.randomUUID().toString();
|
newcat[0] = UUID.randomUUID().toString();
|
||||||
newcat[1] = Category;
|
newcat[1] = category;
|
||||||
newcat[2] = true;
|
newcat[2] = true;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@@ -539,15 +539,15 @@ public class JPanelCSVImport extends JPanel implements JPanelView {
|
|||||||
m_CategoryModel.setSelectedItem(category);
|
m_CategoryModel.setSelectedItem(category);
|
||||||
cat_list.put(category.toString(), m_CategoryModel.getSelectedKey().toString());
|
cat_list.put(category.toString(), m_CategoryModel.getSelectedKey().toString());
|
||||||
}
|
}
|
||||||
String cat = (String) cat_list.get(Category);
|
String cat = (String) cat_list.get(category);
|
||||||
return (cat);
|
return (cat);
|
||||||
} catch (BasicException ex) {
|
} catch (BasicException ex) {
|
||||||
log.error(ex.getMessage());
|
log.error(ex.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!badCategories.contains(Category)) {
|
if (!badCategories.contains(category)) {
|
||||||
badCategories.add(Category.trim()); // Save a list of the bad categories
|
badCategories.add(category.trim()); // Save a list of the bad categories
|
||||||
}
|
}
|
||||||
return ((jComboDefaultCategory.getSelectedItem()
|
return ((jComboDefaultCategory.getSelectedItem()
|
||||||
== reject_bad_category)
|
== reject_bad_category)
|
||||||
@@ -968,7 +968,7 @@ public class JPanelCSVImport extends JPanel implements JPanelView {
|
|||||||
myprod[7] = productSellPrice; // Sell price
|
myprod[7] = productSellPrice; // Sell price
|
||||||
myprod[8] = previousBuy; // Previous Buy price double
|
myprod[8] = previousBuy; // Previous Buy price double
|
||||||
myprod[9] = previousSell; // Previous Sell price double
|
myprod[9] = previousSell; // Previous Sell price double
|
||||||
myprod[10] = Category; // Category
|
myprod[10] = category; // Category
|
||||||
myprod[11] = productTax; // Tax
|
myprod[11] = productTax; // Tax
|
||||||
myprod[12] = Supplier; // Supplier
|
myprod[12] = Supplier; // Supplier
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -2221,13 +2221,14 @@ public abstract class JPanelTicket extends JPanel implements JPanelView, BeanFac
|
|||||||
|
|
||||||
if (checkProduct != null) {
|
if (checkProduct != null) {
|
||||||
|
|
||||||
if (checkProduct.getUnits() <= 0) {
|
if (checkProduct.getUnits() != null && checkProduct.getUnits() <= 0) {
|
||||||
jCheckStock.setForeground(Color.magenta);
|
jCheckStock.setForeground(Color.magenta);
|
||||||
} else {
|
} else {
|
||||||
jCheckStock.setForeground(Color.darkGray);
|
jCheckStock.setForeground(Color.darkGray);
|
||||||
}
|
}
|
||||||
|
|
||||||
double dUnits = checkProduct.getUnits();
|
double dUnits = checkProduct.getUnits() == null ? 0.0 : checkProduct.getUnits();
|
||||||
|
|
||||||
int iUnits;
|
int iUnits;
|
||||||
iUnits = (int) dUnits;
|
iUnits = (int) dUnits;
|
||||||
jCheckStock.setText(Integer.toString(iUnits));
|
jCheckStock.setText(Integer.toString(iUnits));
|
||||||
|
|||||||
@@ -7,6 +7,8 @@ package com.unicenta.pos.sales.restaurant;
|
|||||||
import com.unicenta.data.loader.Session;
|
import com.unicenta.data.loader.Session;
|
||||||
import com.unicenta.pos.forms.AppView;
|
import com.unicenta.pos.forms.AppView;
|
||||||
import com.unicenta.pos.forms.DataLogicSystem;
|
import com.unicenta.pos.forms.DataLogicSystem;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
import java.sql.Connection;
|
import java.sql.Connection;
|
||||||
import java.sql.PreparedStatement;
|
import java.sql.PreparedStatement;
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
@@ -18,7 +20,7 @@ import java.sql.Timestamp;
|
|||||||
*
|
*
|
||||||
* @author JDL
|
* @author JDL
|
||||||
*/
|
*/
|
||||||
|
@Slf4j
|
||||||
public class RestaurantDBUtils {
|
public class RestaurantDBUtils {
|
||||||
private Session s;
|
private Session s;
|
||||||
private Connection con;
|
private Connection con;
|
||||||
@@ -304,11 +306,11 @@ public class RestaurantDBUtils {
|
|||||||
rs = stmt.executeQuery(SQL);
|
rs = stmt.executeQuery(SQL);
|
||||||
|
|
||||||
if (rs.next()){
|
if (rs.next()){
|
||||||
String customer =rs.getString("TICKETID");
|
return(rs.getString("TICKETID"));
|
||||||
return(customer);
|
|
||||||
}
|
}
|
||||||
}catch(SQLException e){
|
}catch(SQLException e){
|
||||||
}
|
log.error("Error running SQL: {}{}", SQL, e.getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
@@ -553,6 +555,21 @@ public class RestaurantDBUtils {
|
|||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getTableId (String nameOfTable){
|
||||||
|
try{
|
||||||
|
SQL = "SELECT ID FROM places WHERE NAME='"+ nameOfTable + "'";
|
||||||
|
stmt = con.createStatement();
|
||||||
|
rs = stmt.executeQuery(SQL);
|
||||||
|
|
||||||
|
if (rs.next()){
|
||||||
|
return(rs.getString("ID"));
|
||||||
|
}
|
||||||
|
}catch(SQLException e){
|
||||||
|
log.error("Error running SQL: {}{}", SQL, e.getMessage());
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param tableID
|
* @param tableID
|
||||||
|
|||||||
@@ -133,7 +133,7 @@ public class JTicketsBagShared extends JTicketsBag {
|
|||||||
m_App.getAppUserView().getUser().getName(),
|
m_App.getAppUserView().getUser().getName(),
|
||||||
"Void",
|
"Void",
|
||||||
"Ticket Deleted",
|
"Ticket Deleted",
|
||||||
(Object) 0.0
|
0.0
|
||||||
});
|
});
|
||||||
|
|
||||||
m_sCurrentTicket = null;
|
m_sCurrentTicket = null;
|
||||||
@@ -245,7 +245,7 @@ public class JTicketsBagShared extends JTicketsBag {
|
|||||||
m_jListTickets.setText("");
|
m_jListTickets.setText("");
|
||||||
newTicket();
|
newTicket();
|
||||||
} else {
|
} else {
|
||||||
showList = (Boolean) m_App.getAppUserView().getUser().hasPermission("sales.ShowList");
|
showList = m_App.getAppUserView().getUser().hasPermission("sales.ShowList");
|
||||||
if (showList) {
|
if (showList) {
|
||||||
m_jListTickets.doClick();
|
m_jListTickets.doClick();
|
||||||
}
|
}
|
||||||
@@ -500,7 +500,7 @@ public class JTicketsBagShared extends JTicketsBag {
|
|||||||
if (m_sCurrentTicket != null) {
|
if (m_sCurrentTicket != null) {
|
||||||
|
|
||||||
if (m_App.getProperties().getProperty("override.check").equals("true")) {
|
if (m_App.getProperties().getProperty("override.check").equals("true")) {
|
||||||
Integer secret = (Integer) Integer.parseInt(m_App.getProperties().getProperty("override.pin"));
|
Integer secret = Integer.parseInt(m_App.getProperties().getProperty("override.pin"));
|
||||||
Integer iValue = JNumberPop.showEditNumber(this, AppLocal.getIntString("title.override.enterpin"));
|
Integer iValue = JNumberPop.showEditNumber(this, AppLocal.getIntString("title.override.enterpin"));
|
||||||
|
|
||||||
if (iValue == null ? secret == null : iValue.equals(secret)) {
|
if (iValue == null ? secret == null : iValue.equals(secret)) {
|
||||||
|
|||||||
@@ -881,7 +881,7 @@ message.email=Desktop email app' not found
|
|||||||
message.emptycustomer=Customer cannot be empty
|
message.emptycustomer=Customer cannot be empty
|
||||||
message.emptynumber=Number cannot be empty
|
message.emptynumber=Number cannot be empty
|
||||||
message.enterbuyprice=Enter new Buy Price
|
message.enterbuyprice=Enter new Buy Price
|
||||||
message.eolupdate=<html><center><h2>Version 5.3.2 Upgrade!</h2></br><h3>Your current database version is {0}</h3><br>For version 5.3 click <b>YES</b><br/><br/>For any other version click <b>NO</b> and get to 5.3 first<br><br/>
|
message.eolupdate=<html><center><h2>Version 5.4.0 Upgrade!</h2></br><h3>Your current database version is {0}</h3><br>For version 5.3 and above click <b>YES</b><br/><br/>For any other version click <b>NO</b> and get to 5.3 first<br><br/>
|
||||||
message.ibuttonassign=<html><center>Get the iButton ID<br>Place iButton onto the reader then click OK
|
message.ibuttonassign=<html><center>Get the iButton ID<br>Place iButton onto the reader then click OK
|
||||||
message.ibuttonnotassign=<html><center>The iButton used is not yet assigned to anyone
|
message.ibuttonnotassign=<html><center>The iButton used is not yet assigned to anyone
|
||||||
message.ibuttonnotfound=No iButton adapter found. Key fobs will be disabled.
|
message.ibuttonnotfound=No iButton adapter found. Key fobs will be disabled.
|
||||||
|
|||||||
Reference in New Issue
Block a user