From: Roland Häder Date: Mon, 1 Jun 2020 13:35:31 +0000 (+0200) Subject: Product-only: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=2baa480743edcaef38be06fdd43a3a4fe343fa3b;p=jfinancials-war.git Product-only: - 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 --- diff --git a/src/java/org/mxchange/jfinancials/beans/helper/product/FinancialsProductWebViewHelperBean.java b/src/java/org/mxchange/jfinancials/beans/helper/product/FinancialsProductWebViewHelperBean.java index c70530ac..2d23d471 100644 --- a/src/java/org/mxchange/jfinancials/beans/helper/product/FinancialsProductWebViewHelperBean.java +++ b/src/java/org/mxchange/jfinancials/beans/helper/product/FinancialsProductWebViewHelperBean.java @@ -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 } diff --git a/src/java/org/mxchange/localization/product_de_DE.properties b/src/java/org/mxchange/localization/product_de_DE.properties index fd4ca7c6..ba8ae6d1 100644 --- a/src/java/org/mxchange/localization/product_de_DE.properties +++ b/src/java/org/mxchange/localization/product_de_DE.properties @@ -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. diff --git a/src/java/org/mxchange/localization/product_en_US.properties b/src/java/org/mxchange/localization/product_en_US.properties index 2bebb528..5563a5cf 100644 --- a/src/java/org/mxchange/localization/product_en_US.properties +++ b/src/java/org/mxchange/localization/product_en_US.properties @@ -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. diff --git a/web/admin/generic_product/admin_generic_product_list.xhtml b/web/admin/generic_product/admin_generic_product_list.xhtml index b13f54eb..52e639f0 100644 --- a/web/admin/generic_product/admin_generic_product_list.xhtml +++ b/web/admin/generic_product/admin_generic_product_list.xhtml @@ -330,14 +330,15 @@ - + - + +