]> git.mxchange.org Git - jfinancials-war.git/commitdiff
Product-only:
authorRoland Häder <roland@mxchange.org>
Tue, 26 Jun 2018 19:46:41 +0000 (21:46 +0200)
committerRoland Häder <roland@mxchange.org>
Tue, 26 Jun 2018 19:55:38 +0000 (21:55 +0200)
- 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

Signed-off-by: Roland Häder <roland@mxchange.org>
src/java/org/mxchange/jfinancials/beans/generic_product/FinancialAdminProductWebRequestBean.java
src/java/org/mxchange/localization/project_de_DE.properties
src/java/org/mxchange/localization/project_en_US.properties
web/WEB-INF/templates/admin/generic_product/admin_form_product_data.tpl
web/admin/generic_product/admin_generic_product_list.xhtml

index b4a3c06630fd23224f485ba32b42c0c5ecb4e357..29444edde5c70614eebccb52263d8d92e7601774 100644 (file)
@@ -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
+        * <p>
+        * @return Product's bar-code number
+        */
+       public String getProductBarCodeNumber () {
+               return this.productBarCodeNumber;
+       }
+
+       /**
+        * Setter for product's bar-code number
+        * <p>
+        * @param productBarCodeNumber Product's bar-code number
+        */
+       public void setProductBarCodeNumber (final String productBarCodeNumber) {
+               this.productBarCodeNumber = productBarCodeNumber;
+       }
+
        /**
         * Getter for product's category
         * <p>
@@ -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());
index adc0b3375b4df6e5ad1c271f4615bcc5b865cd6b..eb41a166d75c6b9155a99d448169e89bf3fe7443 100644 (file)
@@ -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.
index aa106f1bf9aebd6c43c90f0eb15d6c15ac427bd8..5596651a61029ae1b7c89d51d505dd6bfcbda57a 100644 (file)
@@ -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.
index 27d5372cc122c662e884acc80f0c2abb2888e371..cd134128a27f2dc063b8a063aaaf9fcf148fa699 100644 (file)
                                title="#{project.ADMIN_ENTER_GENERIC_PRODUCT_NUMBER_TITLE}"
                                />
 
+                       <p:outputLabel for="productBarCodeNumber" value="#{project.ADMIN_ENTER_GENERIC_PRODUCT_BARCODE_NUMBER}" />
+                       <p:inputText
+                               id="productBarCodeNumber"
+                               value="#{adminProductController.productBarCodeNumber}"
+                               size="30"
+                               maxlength="255"
+                               title="#{project.ADMIN_ENTER_GENERIC_PRODUCT_BARCODE_NUMBER_TITLE}"
+                               />
+
                        <p:outputLabel for="productAgeGroup" value="#{project.ADMIN_SELECT_PRODUCT_AGE_GROUP}" />
                        <p:selectOneMenu
                                id="productAgeGroup"
index 10d94c302e3502a305928e20db66b42873d46f1d..cb85fbcd606cae12eefb4fe61c7fc6c7892457f0 100644 (file)
                                                <h:outputText value="#{productListController.selectedProduct.productNumber}" rendered="#{not empty productListController.selectedProduct.productNumber}" />
                                                <h:outputText value="#{project.NO_PRODUCT_NUMBER_ASSIGNED}" rendered="#{empty productListController.selectedProduct.productNumber}" />
 
+                                               <p:outputLabel value="#{project.BARCODE_NUMBER_HEADER}" title="#{project.PRODUCT_BARCODE_NUMBER_TITLE}" />
+                                               <h:outputText value="#{project.PRODUCT_NO_BARCODE_NUMBER_ASSIGNED}" rendered="#{empty productListController.selectedProduct.productBarCodeNumber}" />
+                                               <p:barcode format="svg" width="100%" type="#{initParam['product_barcode_type']}" value="#{productListController.selectedProduct.productBarCodeNumber}" rendered="#{not empty productListController.selectedProduct.productBarCodeNumber}" />
+
                                                <p:outputLabel value="#{project.PRODUCT_AVAILABILITY_HEADER}" title="#{project.PRODUCT_AVAILABILITY_TITLE}" />
                                                <h:outputText value="#{productListController.selectedProduct.productAvailability ? msg.CHOICE_YES : msg.CHOICE_NO}" />