From 6c626e9b2094e536e7b0b49c183973b2e451d656 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Tue, 26 Jun 2018 21:46:41 +0200 Subject: [PATCH] Product-only: - added form field for product's bar-code number - added graphical bar-code of product's bar-code number to dialog box - added missing i18n language strings MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- .../FinancialAdminProductWebRequestBean.java | 29 +++++++++++++++++-- .../localization/project_de_DE.properties | 4 +++ .../localization/project_en_US.properties | 4 +++ .../admin_form_product_data.tpl | 9 ++++++ .../admin_generic_product_list.xhtml | 4 +++ 5 files changed, 48 insertions(+), 2 deletions(-) diff --git a/src/java/org/mxchange/jfinancials/beans/generic_product/FinancialAdminProductWebRequestBean.java b/src/java/org/mxchange/jfinancials/beans/generic_product/FinancialAdminProductWebRequestBean.java index b4a3c066..29444edd 100644 --- a/src/java/org/mxchange/jfinancials/beans/generic_product/FinancialAdminProductWebRequestBean.java +++ b/src/java/org/mxchange/jfinancials/beans/generic_product/FinancialAdminProductWebRequestBean.java @@ -75,10 +75,15 @@ public class FinancialAdminProductWebRequestBean extends BaseFinancialsBean impl private AgeGroup productAgeGroup; /** - * Available + * Availability */ private Boolean productAvailability; + /** + * Barcode number + */ + private String productBarCodeNumber; + /** * Category instance */ @@ -271,6 +276,24 @@ public class FinancialAdminProductWebRequestBean extends BaseFinancialsBean impl this.productAvailability = productAvailability; } + /** + * Getter for product's bar-code number + *

+ * @return Product's bar-code number + */ + public String getProductBarCodeNumber () { + return this.productBarCodeNumber; + } + + /** + * Setter for product's bar-code number + *

+ * @param productBarCodeNumber Product's bar-code number + */ + public void setProductBarCodeNumber (final String productBarCodeNumber) { + this.productBarCodeNumber = productBarCodeNumber; + } + /** * Getter for product's category *

@@ -533,6 +556,7 @@ public class FinancialAdminProductWebRequestBean extends BaseFinancialsBean impl // Clear all data this.setProductAgeGroup(null); this.setProductAvailability(Boolean.FALSE); + this.setProductBarCodeNumber(null); this.setProductCategory(null); this.setProductGrossPrice(null); this.setProductI18nKey(null); @@ -552,11 +576,12 @@ public class FinancialAdminProductWebRequestBean extends BaseFinancialsBean impl * @return Product instance */ private Product createProductInstance () { -// Create product instance + // Create product instance final Product product = new GenericProduct(this.getProductI18nKey(), this.getProductGrossPrice(), this.getProductCurrencyCode(), this.getProductCategory(), this.getProductAvailability(), this.getProductUnitAmount(), this.getProductUnitI18nKey()); // Set all optional fields product.setProductAgeGroup(this.getProductAgeGroup()); + product.setProductBarCodeNumber(this.getProductBarCodeNumber()); product.setProductManufacturer(this.getProductManufacturer()); product.setProductNumber(this.getProductNumber()); product.setProductNetPrice(this.getProductNetPrice()); diff --git a/src/java/org/mxchange/localization/project_de_DE.properties b/src/java/org/mxchange/localization/project_de_DE.properties index adc0b337..eb41a166 100644 --- a/src/java/org/mxchange/localization/project_de_DE.properties +++ b/src/java/org/mxchange/localization/project_de_DE.properties @@ -370,3 +370,7 @@ RECEIPT_REGISTER_NUMBER_TITLE=Kassenummer des Kassenbons. ADMIN_PRODUCT_NUMBER_HEADER=Produktnummer: RECEIPT_NO_BARCODE_ASSIGNED=Dem Kassenbon wurde kein Barcode zugewiesen. NO_PRODUCT_NUMBER_ASSIGNED=Keine Produktnummer zugewiesen. +ADMIN_ENTER_GENERIC_PRODUCT_BARCODE_NUMBER=Geben Sie die Balkencodenummer des Produktes ein: +BARCODE_NUMBER_HEADER=Barcode-Nummer: +PRODUCT_NO_BARCODE_NUMBER_ASSIGNED=Das Produkt hat keine Barcode-Nummer zugewiesen. +PRODUCT_BARCODE_NUMBER_TITLE=Barcode Nummer des Produktes. diff --git a/src/java/org/mxchange/localization/project_en_US.properties b/src/java/org/mxchange/localization/project_en_US.properties index aa106f1b..5596651a 100644 --- a/src/java/org/mxchange/localization/project_en_US.properties +++ b/src/java/org/mxchange/localization/project_en_US.properties @@ -276,3 +276,7 @@ RECEIPT_REGISTER_NUMBER_TITLE=Register's number of receipt. ADMIN_PRODUCT_NUMBER_HEADER=Product number: RECEIPT_NO_BARCODE_ASSIGNED=No barcode has been assigned to the receipt. NO_PRODUCT_NUMBER_ASSIGNED=No product number assigned. +ADMIN_ENTER_GENERIC_PRODUCT_BARCODE_NUMBER=Enter product's barcode number: +BARCODE_NUMBER_HEADER=Barcode number: +PRODUCT_NO_BARCODE_NUMBER_ASSIGNED=Product has no bar-code number assigned. +PRODUCT_BARCODE_NUMBER_TITLE=Bar-code number of product. diff --git a/web/WEB-INF/templates/admin/generic_product/admin_form_product_data.tpl b/web/WEB-INF/templates/admin/generic_product/admin_form_product_data.tpl index 27d5372c..cd134128 100644 --- a/web/WEB-INF/templates/admin/generic_product/admin_form_product_data.tpl +++ b/web/WEB-INF/templates/admin/generic_product/admin_form_product_data.tpl @@ -54,6 +54,15 @@ title="#{project.ADMIN_ENTER_GENERIC_PRODUCT_NUMBER_TITLE}" /> + + + + + + + -- 2.39.5