From 1b34fdabb03d97cd2009613dc729dde4c3ca2cc5 Mon Sep 17 00:00:00 2001 From: hugh-unicenta Date: Fri, 29 Dec 2023 17:09:58 +0000 Subject: [PATCH 1/2] product api --- pom.xml | 2 +- .../pos/inventory/ProductsEditor.java | 2 +- .../unicenta/pos/ticket/ProductInfoExt.java | 35 +++++++++++++++++-- .../unicenta/pos/scripts/MariaDB-create.sql | 2 +- 4 files changed, 36 insertions(+), 5 deletions(-) diff --git a/pom.xml b/pom.xml index 54c4bbd..5b4ba4b 100644 --- a/pom.xml +++ b/pom.xml @@ -325,7 +325,7 @@ com.unicenta unicenta-plugins - 1.2.4 + 1.2.5-SNAPSHOT com.gluonhq diff --git a/src/main/java/com/unicenta/pos/inventory/ProductsEditor.java b/src/main/java/com/unicenta/pos/inventory/ProductsEditor.java index 416cb63..c36c00c 100644 --- a/src/main/java/com/unicenta/pos/inventory/ProductsEditor.java +++ b/src/main/java/com/unicenta/pos/inventory/ProductsEditor.java @@ -487,7 +487,7 @@ public final class ProductsEditor extends javax.swing.JPanel implements EditorRe myprod[28] = m_UomModel.getSelectedKey(); myprod[29] = Formats.TIMESTAMP.parseValue(m_jdate.getText()); - myprod[30] = m_jInCatalog.isSelected(); + myprod [30] = m_jInCatalog.isSelected(); myprod[31] = Formats.INT.parseValue(m_jCatalogOrder.getText()); if (m_jName.getText().contains("&")) { diff --git a/src/main/java/com/unicenta/pos/ticket/ProductInfoExt.java b/src/main/java/com/unicenta/pos/ticket/ProductInfoExt.java index dedcbe3..f55f6e6 100644 --- a/src/main/java/com/unicenta/pos/ticket/ProductInfoExt.java +++ b/src/main/java/com/unicenta/pos/ticket/ProductInfoExt.java @@ -378,7 +378,38 @@ public class ProductInfoExt { } @Override - public final String toString() { - return m_sRef + " - " + m_sName; + public String toString() { + return "ProductInfoExt{" + + "m_ID='" + m_ID + '\'' + + ", m_sRef='" + m_sRef + '\'' + + ", m_sCode='" + m_sCode + '\'' + + ", m_sCodetype='" + m_sCodetype + '\'' + + ", m_sName='" + m_sName + '\'' + + ", m_dPriceBuy=" + m_dPriceBuy + + ", m_dPriceSell=" + m_dPriceSell + + ", categoryid='" + categoryid + '\'' + + ", taxcategoryid='" + taxcategoryid + '\'' + + ", attributesetid='" + attributesetid + '\'' + + ", m_stockCost=" + m_stockCost + + ", m_stockVolume=" + m_stockVolume + + ", m_Image=" + m_Image + + ", m_bCom=" + m_bCom + + ", m_bScale=" + m_bScale + + ", m_bConstant=" + m_bConstant + + ", m_bPrintKB=" + m_bPrintKB + + ", m_bSendStatus=" + m_bSendStatus + + ", m_bService=" + m_bService + + ", attributes=" + attributes + + ", m_sDisplay='" + m_sDisplay + '\'' + + ", m_bVprice=" + m_bVprice + + ", m_bVerpatrib=" + m_bVerpatrib + + ", m_sTextTip='" + m_sTextTip + '\'' + + ", m_bWarranty=" + m_bWarranty + + ", m_dStockUnits=" + m_dStockUnits + + ", m_sPrinter='" + m_sPrinter + '\'' + + ", supplierid='" + supplierid + '\'' + + ", uomid='" + uomid + '\'' + + ", memodate='" + memodate + '\'' + + '}'; } } \ No newline at end of file diff --git a/src/main/resources/com/unicenta/pos/scripts/MariaDB-create.sql b/src/main/resources/com/unicenta/pos/scripts/MariaDB-create.sql index 76e76f6..db99881 100644 --- a/src/main/resources/com/unicenta/pos/scripts/MariaDB-create.sql +++ b/src/main/resources/com/unicenta/pos/scripts/MariaDB-create.sql @@ -336,7 +336,7 @@ CREATE TABLE `products` ( `stockunits` double NOT NULL default '0', `printto` varchar(255) default '1', `supplier` varchar(255) default NULL, - `uom` varchar(255) default '0', + `uom` varchar(255) default '0', `memodate` datetime default '2018-01-01 00:00:01', PRIMARY KEY ( `id` ), From 763c06f0c9c07761d4c35d7832dcc7ef06d5cb70 Mon Sep 17 00:00:00 2001 From: hugh-unicenta Date: Sat, 27 Jan 2024 14:44:13 +0000 Subject: [PATCH 2/2] teya fix working --- pom.xml | 7 +++- .../unicenta/pos/ticket/ProductInfoExt.java | 35 ++----------------- 2 files changed, 8 insertions(+), 34 deletions(-) diff --git a/pom.xml b/pom.xml index 5b4ba4b..0171d69 100644 --- a/pom.xml +++ b/pom.xml @@ -153,7 +153,7 @@ org.jpos jpos - 2.0.10 + 2.1.9 org.slf4j @@ -391,6 +391,11 @@ 2.1.3 jar + + com.google.code.gson + gson + 2.8.9 + junit diff --git a/src/main/java/com/unicenta/pos/ticket/ProductInfoExt.java b/src/main/java/com/unicenta/pos/ticket/ProductInfoExt.java index f55f6e6..dedcbe3 100644 --- a/src/main/java/com/unicenta/pos/ticket/ProductInfoExt.java +++ b/src/main/java/com/unicenta/pos/ticket/ProductInfoExt.java @@ -378,38 +378,7 @@ public class ProductInfoExt { } @Override - public String toString() { - return "ProductInfoExt{" + - "m_ID='" + m_ID + '\'' + - ", m_sRef='" + m_sRef + '\'' + - ", m_sCode='" + m_sCode + '\'' + - ", m_sCodetype='" + m_sCodetype + '\'' + - ", m_sName='" + m_sName + '\'' + - ", m_dPriceBuy=" + m_dPriceBuy + - ", m_dPriceSell=" + m_dPriceSell + - ", categoryid='" + categoryid + '\'' + - ", taxcategoryid='" + taxcategoryid + '\'' + - ", attributesetid='" + attributesetid + '\'' + - ", m_stockCost=" + m_stockCost + - ", m_stockVolume=" + m_stockVolume + - ", m_Image=" + m_Image + - ", m_bCom=" + m_bCom + - ", m_bScale=" + m_bScale + - ", m_bConstant=" + m_bConstant + - ", m_bPrintKB=" + m_bPrintKB + - ", m_bSendStatus=" + m_bSendStatus + - ", m_bService=" + m_bService + - ", attributes=" + attributes + - ", m_sDisplay='" + m_sDisplay + '\'' + - ", m_bVprice=" + m_bVprice + - ", m_bVerpatrib=" + m_bVerpatrib + - ", m_sTextTip='" + m_sTextTip + '\'' + - ", m_bWarranty=" + m_bWarranty + - ", m_dStockUnits=" + m_dStockUnits + - ", m_sPrinter='" + m_sPrinter + '\'' + - ", supplierid='" + supplierid + '\'' + - ", uomid='" + uomid + '\'' + - ", memodate='" + memodate + '\'' + - '}'; + public final String toString() { + return m_sRef + " - " + m_sName; } } \ No newline at end of file