]> git.mxchange.org Git - jfinancials-war.git/commitdiff
Product-only:
authorRoland Häder <roland@mxchange.org>
Mon, 1 Jun 2020 13:35:31 +0000 (15:35 +0200)
committerRoland Häder <roland@mxchange.org>
Mon, 1 Jun 2020 13:35:31 +0000 (15:35 +0200)
- show tax rate to user and format the number as a float when entered
- renamed NO_PRODUCT_NUMBER_ASSIGNED to ADMIN_NO_PRODUCT_NUMBER_ASSIGNED
- added missing i18n key for the case when no FSC number is entered

Signed-off-by: Roland Häder <roland@mxchange.org>
src/java/org/mxchange/jfinancials/beans/helper/product/FinancialsProductWebViewHelperBean.java
src/java/org/mxchange/localization/product_de_DE.properties
src/java/org/mxchange/localization/product_en_US.properties
web/admin/generic_product/admin_generic_product_list.xhtml

index c70530ac3413b90089f212d7218b3a0e2942fe6e..2d23d471ce0691e9869e259c1a4f1fa64360d62d 100644 (file)
@@ -68,7 +68,7 @@ public class FinancialsProductWebViewHelperBean extends BaseFinancialsBean imple
                // Is a product set?
                if (product instanceof Product) {
                        // Is product number given?
-                       if (product.getProductBarCodeNumber()!= null) {
+                       if (product.getProductBarCodeNumber() != null) {
                                // Prepend it
                                sb.append(this.getMessageFromBundle("BARCODE")).append(" "); //NOI18N
                                sb.append(product.getProductBarCodeNumber());
@@ -103,9 +103,17 @@ public class FinancialsProductWebViewHelperBean extends BaseFinancialsBean imple
 
                        // Add price
                        sb.append(" ("); //NOI18N
-                       sb.append(this.localizationController.formatCurrency(product.getProductGrossPrice().floatValue()));
+                       sb.append(this.localizationController.formatFloatNumber(product.getProductGrossPrice().floatValue()));
                        sb.append(" "); //NOI18N
                        sb.append(product.getProductCurrencyCode());
+
+                       // Is tax rate given?
+                       if (product.getProductTaxRate() != null) {
+                               // Add tax rate, formatted after current locale
+                               sb.append(", ").append(this.localizationController.formatFloatNumber(product.getProductTaxRate().floatValue())).append("%"); //NOI18N
+                       }
+
+                       // Close bracket
                        sb.append(")"); //NOI18N
                }
 
index fd4ca7c67f7b80c928ce29f1545b5b3b27f33a7f..ba8ae6d1da1c84d901c222000cb5274f49feaaab 100644 (file)
@@ -184,7 +184,7 @@ ADMIN_EDIT_GENERIC_PRODUCT_TITLE=Produkt-Id {0} editieren
 ADMIN_EDIT_GENERIC_PRODUCT_MINIMUM_DATA=Sie koennen hier alle Werte \u00e4ndern aber geben oder waehlen Sie mindestens die markierten (*) ein/aus.
 BUTTON_ADMIN_EDIT_GENERIC_PRODUCT=Allgemeines Produkt \u00e4ndern
 ADMIN_PRODUCT_NUMBER_HEADER=Produktnummer:
-NO_PRODUCT_NUMBER_ASSIGNED=Keine Produktnummer zugewiesen.
+ADMIN_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.
@@ -214,3 +214,4 @@ BUTTON_ADMIN_EDIT_PRODUCT_CATEGORY=Produktkategorie \u00e4ndern
 ADMIN_EDIT_PRODUCT_CATEGORY_TITLE=Produktkategorie mit Id {0} editieren:
 ADMIN_PRODUCT_CATEGORY_NOT_UPDATED=Sie haben die Produktkategorie nicht ge\u00e4ndert.
 SHOWN_IN_STATISTICS_HEADER=In Statistiken angezeigt:
+ADMIN_NO_PRODUCT_FSC_NUMBER_ASSIGNED=Das Produkt hat keine FSC-Nummer zugewiesen.
index 2bebb528e034b3b684e01bb57c1a0fbfa57ca8d8..5563a5cfb181c821bbc4792a0ede9a63e09b3e5b 100644 (file)
@@ -148,7 +148,7 @@ ADMIN_EDIT_GENERIC_PRODUCT_TITLE=Edit product id {0}
 ADMIN_EDIT_GENERIC_PRODUCT_MINIMUM_DATA=You can edit all values here but enter or select at least all marked (*) values.
 BUTTON_ADMIN_EDIT_GENERIC_PRODUCT=Change generic product
 ADMIN_PRODUCT_NUMBER_HEADER=Product number:
-NO_PRODUCT_NUMBER_ASSIGNED=No product number assigned.
+ADMIN_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.
@@ -173,3 +173,4 @@ BUTTON_ADMIN_EDIT_PRODUCT_CATEGORY=Change product category
 ADMIN_EDIT_PRODUCT_CATEGORY_TITLE=Edit product category Id {0}:
 ADMIN_PRODUCT_CATEGORY_NOT_UPDATED=You have not changed the product category.
 SHOWN_IN_STATISTICS_HEADER=Shown in statistics:
+ADMIN_NO_PRODUCT_FSC_NUMBER_ASSIGNED=The product has no FSC number assigned.
index b13f54eb18388c8e5253c9cb93df8970b2279252..52e639f0552616094b695be1284f6bb00a19aaa4 100644 (file)
 
                                                <p:outputLabel value="#{product.PRODUCT_NUMBER_HEADER}" title="#{product.PRODUCT_NUMBER_TITLE}" />
                                                <h:outputText value="#{productListController.selectedProduct.productNumber}" rendered="#{not empty productListController.selectedProduct.productNumber}" />
-                                               <h:outputText value="#{product.NO_PRODUCT_NUMBER_ASSIGNED}" rendered="#{empty productListController.selectedProduct.productNumber}" />
+                                               <h:outputText value="#{product.ADMIN_NO_PRODUCT_NUMBER_ASSIGNED}" rendered="#{empty productListController.selectedProduct.productNumber}" />
 
                                                <p:outputLabel value="#{product.BARCODE_NUMBER_HEADER}" title="#{product.PRODUCT_BARCODE_NUMBER_TITLE}" />
                                                <h:outputText value="#{product.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="#{product.ADMIN_PRODUCT_FSC_NUMBER_HEADER}" title="#{product.PRODUCT_FSC_NUMBER_TITLE}" />
-                                               <h:outputText value="#{productListController.selectedProduct.productFscNumber}" />
+                                               <h:outputText value="#{productListController.selectedProduct.productFscNumber}" rendered="#{not empty productListController.selectedProduct.productFscNumber}" />
+                                               <h:outputText value="#{product.ADMIN_NO_PRODUCT_FSC_NUMBER_ASSIGNED}" rendered="#{empty productListController.selectedProduct.productFscNumber}" />
 
                                                <p:outputLabel value="#{msg.AVAILABLE_HEADER}" title="#{product.PRODUCT_AVAILABILITY_TITLE}" />
                                                <h:outputText value="#{productListController.selectedProduct.productAvailability ? msg.CHOICE_YES : msg.CHOICE_NO}" />