From 7f567e225d205e2f1b5e282c5c0b3fc29ba0d7c0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sun, 5 Nov 2017 12:39:46 +0100 Subject: [PATCH] Don't cherry-pick: - renamed receipts -> receipt receipt_items -> receipt_item - formatted issue date and shown correctly payment type - added/fixed i18n strings, sometimes wrong bundle - fixed navigation outcomes, was a copy-paste mistake - added missing navigation rules MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- .../FinancialAdminReceiptWebRequestBean.java | 2 +- .../FinancialsReceiptWebRequestBean.java | 2 +- ...nancialAdminReceiptItemWebRequestBean.java | 2 +- .../FinancialsReceiptItemWebRequestBean.java | 2 +- .../FinancialsWebRequestHelperBean.java | 5 +- .../localization/project_de_DE.properties | 22 ++++---- .../localization/project_en_US.properties | 24 +++++---- web/WEB-INF/faces-config.xml | 50 ++++++++++++++++++- .../receipt_item/admin_receipt_item_links.tpl | 6 +-- .../receipt/admin_form_financial_receipt.tpl | 2 +- .../admin_form_financial_receipt_item.tpl | 2 +- .../receipt/login_form_financial_receipt.tpl | 2 +- .../admin_receipt_list.xhtml | 0 .../admin_receipt_item_list.xhtml | 18 +++++-- 14 files changed, 102 insertions(+), 37 deletions(-) rename web/admin/financial/{receipts => receipt}/admin_receipt_list.xhtml (100%) rename web/admin/financial/{receipt_items => receipt_item}/admin_receipt_item_list.xhtml (90%) diff --git a/src/java/org/mxchange/jfinancials/beans/financial/model/receipt/FinancialAdminReceiptWebRequestBean.java b/src/java/org/mxchange/jfinancials/beans/financial/model/receipt/FinancialAdminReceiptWebRequestBean.java index 9d8606af..d6a60773 100644 --- a/src/java/org/mxchange/jfinancials/beans/financial/model/receipt/FinancialAdminReceiptWebRequestBean.java +++ b/src/java/org/mxchange/jfinancials/beans/financial/model/receipt/FinancialAdminReceiptWebRequestBean.java @@ -176,7 +176,7 @@ public class FinancialAdminReceiptWebRequestBean extends BaseFinancialsBean impl this.clear(); // Return redirect outcome - return "add_receipt_item?faces-redirect=true"; //NOI18N + return ""; //NOI18N } /** diff --git a/src/java/org/mxchange/jfinancials/beans/financial/model/receipt/FinancialsReceiptWebRequestBean.java b/src/java/org/mxchange/jfinancials/beans/financial/model/receipt/FinancialsReceiptWebRequestBean.java index 16b180a9..ce89849d 100644 --- a/src/java/org/mxchange/jfinancials/beans/financial/model/receipt/FinancialsReceiptWebRequestBean.java +++ b/src/java/org/mxchange/jfinancials/beans/financial/model/receipt/FinancialsReceiptWebRequestBean.java @@ -207,7 +207,7 @@ public class FinancialsReceiptWebRequestBean extends BaseFinancialsBean implemen this.clear(); // Return redirect outcome - return "add_receipt_item?faces-redirect=true"; //NOI18N + return "admin_list_receipts?faces-redirect=true"; //NOI18N } /** diff --git a/src/java/org/mxchange/jfinancials/beans/financial/model/receipt_item/FinancialAdminReceiptItemWebRequestBean.java b/src/java/org/mxchange/jfinancials/beans/financial/model/receipt_item/FinancialAdminReceiptItemWebRequestBean.java index 298e7b12..efa822b6 100644 --- a/src/java/org/mxchange/jfinancials/beans/financial/model/receipt_item/FinancialAdminReceiptItemWebRequestBean.java +++ b/src/java/org/mxchange/jfinancials/beans/financial/model/receipt_item/FinancialAdminReceiptItemWebRequestBean.java @@ -170,7 +170,7 @@ public class FinancialAdminReceiptItemWebRequestBean extends BaseFinancialsBean this.clear(); // Return redirect outcome - return "add_receipt_item?faces-redirect=true"; //NOI18N + return ""; //NOI18N } /** diff --git a/src/java/org/mxchange/jfinancials/beans/financial/model/receipt_item/FinancialsReceiptItemWebRequestBean.java b/src/java/org/mxchange/jfinancials/beans/financial/model/receipt_item/FinancialsReceiptItemWebRequestBean.java index 52768d3c..5456d7d0 100644 --- a/src/java/org/mxchange/jfinancials/beans/financial/model/receipt_item/FinancialsReceiptItemWebRequestBean.java +++ b/src/java/org/mxchange/jfinancials/beans/financial/model/receipt_item/FinancialsReceiptItemWebRequestBean.java @@ -152,7 +152,7 @@ public class FinancialsReceiptItemWebRequestBean extends BaseFinancialsBean impl this.clear(); // Return redirect outcome - return "add_receipt_item?faces-redirect=true"; //NOI18N + return "admin_list_receipt_items?faces-redirect=true"; //NOI18N } /** diff --git a/src/java/org/mxchange/jfinancials/beans/helper/FinancialsWebRequestHelperBean.java b/src/java/org/mxchange/jfinancials/beans/helper/FinancialsWebRequestHelperBean.java index b0e407f9..bae27edf 100644 --- a/src/java/org/mxchange/jfinancials/beans/helper/FinancialsWebRequestHelperBean.java +++ b/src/java/org/mxchange/jfinancials/beans/helper/FinancialsWebRequestHelperBean.java @@ -16,6 +16,7 @@ */ package org.mxchange.jfinancials.beans.helper; +import java.text.DateFormat; import java.text.MessageFormat; import javax.enterprise.context.RequestScoped; import javax.enterprise.event.Event; @@ -678,12 +679,14 @@ public class FinancialsWebRequestHelperBean extends BaseFinancialsBean implement */ public String renderReceipt (final BillableReceipt receipt) { // Default is empty string, so let's get started - final StringBuilder sb = new StringBuilder(10); + final StringBuilder sb = new StringBuilder(50); // Is receipt set? if (receipt instanceof BillableReceipt) { // Add relevant data sb.append(this.getMessageFromBundle("RECEIPT_ISSUED")).append(" "); //NOI18N + sb.append(DateFormat.getInstance().format(receipt.getReceiptIssued())).append(", "); //NOI18N + sb.append(this.getMessageFromBundle("PAYMENT_TYPE")).append(" "); //NOI18N sb.append(this.getMessageFromBundle(receipt.getReceiptPaymentType().getI18nKey())); // Is receipt number included? diff --git a/src/java/org/mxchange/localization/project_de_DE.properties b/src/java/org/mxchange/localization/project_de_DE.properties index 39c1dea5..19aec461 100644 --- a/src/java/org/mxchange/localization/project_de_DE.properties +++ b/src/java/org/mxchange/localization/project_de_DE.properties @@ -79,7 +79,7 @@ ENTER_PRODUCT_NET_PRICE_TITLE=Nettopreis fuer Produkt eingeben. ENTER_PRODUCT_TAX_RATE_TITLE=Steuersatz fuer Produkt eingeben. #@TODO Please fix German umlauts! ENTER_PRODUCT_GROSS_PRICE_TITLE=Brutto-Preis fuer Produkt eingeben. -ADMIN_ENTER_PRODUCT_PRICE=Preis des Produktes eingeben: +ADMIN_ENTER_GENERIC_PRODUCT_PRICE=Preis des Produktes eingeben: ENTER_NET_PRICE=Nettopreis: ENTER_TAX_RATE=Steuersatz: ENTER_GROSS_PRICE=Bruttopreis: @@ -142,21 +142,21 @@ ADMIN_ADD_GENERIC_PRODUCT_MINIMUM_DATA=Bitte waehlen Sie eine Produktkategorie a ADMIN_GENERIC_PRODUCT_DATA_LEGEND=Produktdaten eingeben: ADMIN_ASSIGN_PRODUCT_CATEGORY=Zum Produkt zugewiesene Kategorie: #@TODO Please fix German umlauts! -ADMIN_ENTER_PRODUCT_I18N_KEY=Uebersetzungsschluessel zum Produkt eingeben: +ADMIN_ENTER_GENERIC_PRODUCT_I18N_KEY=Uebersetzungsschluessel zum Produkt eingeben: #@TODO Please fix German umlauts! ADMIN_ENABLE_PRODUCT_AVAILABILITY=Ist das Produkt verfuegbar: ADMIN_ASSIGN_PRODUCT_CATEGORY_TITLE=Waehlen Sie die Produktkategorie zum neu hinzuzufuegenden Produkt aus. #@TODO Please fix German umlauts! -ADMIN_ENTER_PRODUCT_I18N_KEY_TITLE=Geben Sie den Uebersetzungsschluessel zum Produkt ein. Dieser darf nur einmal existieren. +ADMIN_ENTER_GENERIC_PRODUCT_I18N_KEY_TITLE=Geben Sie den Uebersetzungsschluessel zum Produkt ein. Dieser darf nur einmal existieren. #@TODO Please fix German umlauts! ADMIN_ENABLE_PRODUCT_AVAILABILITY_TITLE=Waehlen Sie aus, ob das Produkt verfuegbar/aktiv ist. #@TODO Please fix German umlauts! -ADMIN_ENTER_PRODUCT_CURRENCY_CODE=Waehrungscode eingeben: +ADMIN_ENTER_GENERIC_PRODUCT_CURRENCY_CODE=Waehrungscode eingeben: #@TODO Please fix German umlauts! -ADMIN_ENTER_PRODUCT_CURRENCY_CODE_TITLE=Geben Sie den Waehrungscode fuer das Produkt ein. Beispiele: EUR, USD, PHP +ADMIN_ENTER_GENERIC_PRODUCT_CURRENCY_CODE_TITLE=Geben Sie den Waehrungscode fuer das Produkt ein. Beispiele: EUR, USD, PHP #@TODO Please fix German umlauts! -ADMIN_ENTER_PRODUCT_UNIT_AMOUNT=Produktstueckzahl eingeben: -ADMIN_ENTER_PRODUCT_UNIT_AMOUNT_TITLE=Geben Sie hier die Stueckzahl des Produktes ein. Zum Beispiel 500 fuer 500 Gramm. Unter Stueckzahleinheit geben Sie dann einfach nur "g" ein. +ADMIN_ENTER_GENERIC_PRODUCT_UNIT_AMOUNT=Produktstueckzahl eingeben: +ADMIN_ENTER_GENERIC_PRODUCT_UNIT_AMOUNT_TITLE=Geben Sie hier die Stueckzahl des Produktes ein. Zum Beispiel 500 fuer 500 Gramm. Unter Stueckzahleinheit geben Sie dann einfach nur "g" ein. #@TODO Please fix German umlauts! BUTTON_ADMIN_ADD_GENERIC_PRODUCT=Produkt hinzufuegen #@TODO Please fix German umlauts! @@ -196,9 +196,9 @@ ADMIN_ENTERED_CATEGORY_I18N_KEY_ALREADY_ADDED=Der von Ihnen eingegebene Ueberset #@TODO Please fix German umlauts! ADMIN_ENTERED_PRODUCT_I18N_KEY_ALREADY_ADDED=Der von Ihnen eingegebene Uebersetzungsschluessel fuer das Produkt ist bereits vorhanden. Bitte gebene Sie einen anderen an. #@TODO Please fix German umlauts! -ADMIN_ENTER_PRODUCT_UNIT_I18N_KEY=Uebersetzungschluessel der Einheit fuer Stueckzahl eingeben: +ADMIN_ENTER_GENERIC_PRODUCT_UNIT_I18N_KEY=Uebersetzungschluessel der Einheit fuer Stueckzahl eingeben: #@TODO Please fix German umlauts! -ADMIN_ENTER_PRODUCT_UNIT_I18N_KEY_TITLE=Geben Sie hier die Einheit fuer die Produktstueckzahl ein, wie z.B. "l" fuer Liter oder "kg" fuer Kilogramm. +ADMIN_ENTER_GENERIC_PRODUCT_UNIT_I18N_KEY_TITLE=Geben Sie hier die Einheit fuer die Produktstueckzahl ein, wie z.B. "l" fuer Liter oder "kg" fuer Kilogramm. ADMIN_ASSIGN_PRODUCT_MANUFACTURER=Produktehersteller dem Produkt zuweisen: #@TODO Please fix German umlauts! ADMIN_ASSIGN_PRODUCT_MANUFACTURER_TITLE=Zweisen Sie hier ein Hersteller dem Produkt zu. Supermaerke verkaufen oefters nur die Produkte, die ein anderes Unternehmen hergestellt hat. @@ -214,3 +214,7 @@ ADMIN_PRODUCT_UNIT_AMOUNT_REQUIRED=Bitte geben Sie die Stueckanzahl des Produkte ADMIN_PRODUCT_UNIT_I18N_KEY_REQUIRED=Bitte geben Sie den Uebersetzungschluessel zur Stueckzahl ein. Beispiel: UNIT_TYPE_GRAMS fuer Gramm ADMIN_HEADER_PRODUCT_MANUFACTURER_NAME=Produktehersteller: ADMIN_NO_PRODUCT_MANUFACTURER_ASSIGNED_TITLE=Es ist kein Hersteller dem Produkt zugewiesen. +RECEIPT_ISSUED=Ausgestellt: +RECEIPT_NUMBER=Kassenbonnummer: +ADMIN_ENTER_GENERIC_PRODUCT_NUMBER=Geben Sie die Produktnummer ein: +ADMIN_ENTER_GENERIC_PRODUCT_NUMBER_TITLE=Geben Sie die Nummer des Produktes ein. diff --git a/src/java/org/mxchange/localization/project_en_US.properties b/src/java/org/mxchange/localization/project_en_US.properties index c6fd9879..7a1c7b8f 100644 --- a/src/java/org/mxchange/localization/project_en_US.properties +++ b/src/java/org/mxchange/localization/project_en_US.properties @@ -59,7 +59,7 @@ PRODUCT_GROSS_PRICE_REQUIRED=Please enter product's gross price. ENTER_PRODUCT_NET_PRICE_TITLE=Enter product net price. ENTER_PRODUCT_TAX_RATE_TITLE=Enter product tax rate. ENTER_PRODUCT_GROSS_PRICE_TITLE=Enter product gross price. -ADMIN_ENTER_PRODUCT_PRICE=Enter product's price: +ADMIN_ENTER_GENERIC_PRODUCT_PRICE=Enter product's price: ENTER_NET_PRICE=Net price: ENTER_TAX_RATE=Tax rate: ENTER_GROSS_PRICE=Gross price: @@ -108,15 +108,15 @@ ADMIN_ADD_GENERIC_PRODUCT_TITLE=Add new product ADMIN_ADD_GENERIC_PRODUCT_MINIMUM_DATA=Please choose a product category and enter product title, unit amount and type, gross price and currency code (e.g. USD). ADMIN_GENERIC_PRODUCT_DATA_LEGEND=Product data: ADMIN_ASSIGN_PRODUCT_CATEGORY=Assign category to product: -ADMIN_ENTER_PRODUCT_I18N_KEY=Enter product's i8n key: +ADMIN_ENTER_GENERIC_PRODUCT_I18N_KEY=Enter product's i8n key: ADMIN_ENABLE_PRODUCT_AVAILABILITY=Is the product available: ADMIN_ASSIGN_PRODUCT_CATEGORY_TITLE=Choose the product category for the to be added product. -ADMIN_ENTER_PRODUCT_I18N_KEY_TITLE=Enter product unit's i18n key. This must be unique. +ADMIN_ENTER_GENERIC_PRODUCT_I18N_KEY_TITLE=Enter product unit's i18n key. This must be unique. ADMIN_ENABLE_PRODUCT_AVAILABILITY_TITLE=Choose if the product is available/active. -ADMIN_ENTER_PRODUCT_CURRENCY_CODE=Enter currency code: -ADMIN_ENTER_PRODUCT_CURRENCY_CODE=Enter currency code: -ADMIN_ENTER_PRODUCT_UNIT_AMOUNT=Enter product's unit amount: -ADMIN_ENTER_PRODUCT_UNIT_AMOUNT_TITLE=Enter the product's unit amount. For example 500 for 500 grams. Under i18n key, then just enter "g". +ADMIN_ENTER_GENERIC_PRODUCT_CURRENCY_CODE=Enter currency code: +ADMIN_ENTER_GENERIC_PRODUCT_CURRENCY_CODE=Enter currency code: +ADMIN_ENTER_GENERIC_PRODUCT_UNIT_AMOUNT=Enter product's unit amount: +ADMIN_ENTER_GENERIC_PRODUCT_UNIT_AMOUNT_TITLE=Enter the product's unit amount. For example 500 for 500 grams. Under i18n key, then just enter "g". BUTTON_ADMIN_ADD_GENERIC_PRODUCT=Add product ADMIN_PRODUCT_CATEGORY_REQUIRED=Please choose a product category. ADMIN_PRODUCT_I18N_KEY_REQUIRED=Please enter a product i18n key. @@ -143,13 +143,13 @@ ADMIN_ENABLE_CATEGORY_IN_STATISTICS_REQUIRED=Please choose if this category shou ENTER_RECEIPT_SEQUENCE_NUMBER=Enter sequence number: ADMIN_ENTERED_CATEGORY_I18N_KEY_ALREADY_ADDED=Your entered category i18n key is already added. Please enter an other one. ADMIN_ENTERED_PRODUCT_I18N_KEY_ALREADY_ADDED=Your entered product i18n key is already added. Please enter an other one. -ADMIN_ENTER_PRODUCT_UNIT_I18N_KEY=Enter product unit's i18n key: -ADMIN_ENTER_PRODUCT_UNIT_I18N_KEY_TITLE=Enter the product unit's i18n key, like "l" for liter or "kg" for kilo grams. +ADMIN_ENTER_GENERIC_PRODUCT_UNIT_I18N_KEY=Enter product unit's i18n key: +ADMIN_ENTER_GENERIC_PRODUCT_UNIT_I18N_KEY_TITLE=Enter the product unit's i18n key, like "l" for liter or "kg" for kilo grams. ADMIN_ASSIGN_PRODUCT_MANUFACTURER=Assign product's manufacturing/producing company: ADMIN_ASSIGN_PRODUCT_MANUFACTURER_TITLE=Assign a manufacturing/producing company to this product. Supermarkets are often only selling products other companies have produced. SELECT_RECEIPT_ITEM_MANUFACTURER=Choose manufacturer for receipt item: ADMIN_HEADER_RECEIPT_ITEM_MANUFACTURER_NAME=Manufacturer of product item: -ADMIN_ENTER_PRODUCT_CURRENCY_CODE_TITLE=Enter the currency code for product. Examples: EUR, USD, PHP +ADMIN_ENTER_GENERIC_PRODUCT_CURRENCY_CODE_TITLE=Enter the currency code for product. Examples: EUR, USD, PHP ENTER_RECEIPT_ITEM_BRAND_NAME=Enter item's brand name: ENTER_RECEIPT_ITEM_BRAND_NAME_TITLE=Enter the item's brand name found on receipt. ADMIN_PRODUCT_CURRENCY_CODE_REQUIRED=Please enter current code for product. Example: EUR, USD, PHP @@ -157,3 +157,7 @@ ADMIN_PRODUCT_UNIT_AMOUNT_REQUIRED=Please enter a unit amount. Example 500 for 5 ADMIN_PRODUCT_UNIT_I18N_KEY_REQUIRED=Please enter unit's i18n key. Example: UNIT_TYPE_GRAMS for grams ADMIN_HEADER_PRODUCT_MANUFACTURER_NAME=Product manufacturer: ADMIN_NO_PRODUCT_MANUFACTURER_ASSIGNED_TITLE=No manufacturer is assigned with this product. +RECEIPT_ISSUED=Issued at: +RECEIPT_NUMBER=Receipt number: +ADMIN_ENTER_GENERIC_PRODUCT_NUMBER=Enter product number: +ADMIN_ENTER_GENERIC_PRODUCT_NUMBER_TITLE=Enter number of product. diff --git a/web/WEB-INF/faces-config.xml b/web/WEB-INF/faces-config.xml index 442d848a..827e7fbd 100644 --- a/web/WEB-INF/faces-config.xml +++ b/web/WEB-INF/faces-config.xml @@ -178,11 +178,11 @@ admin_list_receipts - /admin/financial/receipts/admin_receipt_list.xhtml + /admin/financial/receipt/admin_receipt_list.xhtml admin_list_receipt_items - /admin/financial/receipt_items/admin_receipt_item_list.xhtml + /admin/financial/receipt_item/admin_receipt_item_list.xhtml @@ -962,6 +962,52 @@ /admin/product_category/admin_product_category_show.xhtml + + /admin/financial/receipt/admin_receipt_list.xhtml + + admin_show_receipt + /admin/financial/receipt/admin_receipt_show.xhtml + + + admin_edit_receipt + /admin/financial/receipt/admin_receipt_edit.xhtml + + + admin_delete_receipt + /admin/financial/receipt/admin_receipt_delete.xhtml + + + admin_show_branch_office + /admin/branch_office/admin_branch_office_show.xhtml + + + admin_assign_receipt_user + /admin/financial/receipt/admin_assign_receipt_user.xhtml + + + + /admin/financial/receipt_item/admin_receipt_item_list.xhtml + + admin_show_receipt_item + /admin/financial/receipt_item/admin_receipt_item_show.xhtml + + + admin_edit_receipt_item + /admin/financial/receipt_item/admin_receipt_item_edit.xhtml + + + admin_delete_receipt_item + /admin/financial/receipt_item/admin_receipt_item_delete.xhtml + + + admin_show_receipt + /admin/financial/receipt/admin_receipt_show.xhtml + + + admin_show_generic_product + /admin/generic_product/admin_generic_product_show.xhtml + +