From: Roland Häder Date: Sat, 28 Oct 2017 22:51:00 +0000 (+0200) Subject: Don't cherry-pick: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=ae9a6a0301330ebcf19611a701587ce4cbcc7546;p=jfinancials-war.git Don't cherry-pick: - moved out comment above ui:composition to not cause another ui-row being added - itemReceipt is a required field, marked it so in JSF view - form for adding receipt items is "basicaly finished" - there are now percentage and fixed discounts as some receipts has shown - added/renamed i18n strings - renamed 'financials' to 'financial' Signed-off-by: Roland Häder --- 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 3d21e850..34329211 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 @@ -62,9 +62,15 @@ public class FinancialAdminReceiptItemWebRequestBean extends BaseFinancialsBean private FinancialAdminReceiptItemSessionBeanRemote adminReceiptItemBean; /** - * Discount on product price (if any) Valid: values 0...1 (1=100% discount) + * Fixed discount on product price (if any) */ - private Float itemDiscount; + private Float itemDiscountFixed; + + /** + * Percentage discount on product price (if any) Valid: values 0...1 (1=100% + * discount) + */ + private Float itemDiscountPercent; /** * Item product @@ -157,21 +163,39 @@ public class FinancialAdminReceiptItemWebRequestBean extends BaseFinancialsBean } /** - * Getter for item discount + * Getter for item discount (fixed) + *

+ * @return Item discount (fixed) + */ + public Float getItemDiscountFixed () { + return this.itemDiscountFixed; + } + + /** + * Setter for item discount (fixed) + *

+ * @param itemDiscountFixed Item discount (fixed) + */ + public void setItemDiscountFixed (final Float itemDiscountFixed) { + this.itemDiscountFixed = itemDiscountFixed; + } + + /** + * Getter for item discount (percent) *

- * @return Item discount + * @return Item discount (percent) */ - public Float getItemDiscount () { - return this.itemDiscount; + public Float getItemDiscountPercent () { + return this.itemDiscountPercent; } /** - * Setter for item discount + * Setter for item discount (percent) *

- * @param itemDiscount Item discount + * @param itemDiscountPercent Item discount (percent) */ - public void setItemDiscount (final Float itemDiscount) { - this.itemDiscount = itemDiscount; + public void setItemDiscountPercent (final Float itemDiscountPercent) { + this.itemDiscountPercent = itemDiscountPercent; } /** @@ -305,7 +329,8 @@ public class FinancialAdminReceiptItemWebRequestBean extends BaseFinancialsBean */ private void clear () { // Clear all fields - this.setItemDiscount(null); + this.setItemDiscountFixed(null); + this.setItemDiscountPercent(null); this.setItemProduct(null); this.setItemQuantity(null); this.setItemReceipt(null); @@ -321,7 +346,8 @@ public class FinancialAdminReceiptItemWebRequestBean extends BaseFinancialsBean final BillableReceiptItem receiptItem = new FinancialReceiptItem(this.getItemProduct(), this.getItemQuantity(), this.getItemReceipt()); // Set optional data - receiptItem.setItemProductDiscount(this.getItemDiscount()); + receiptItem.setItemDiscountFixed(this.getItemDiscountFixed()); + receiptItem.setItemDiscountPercent(this.getItemDiscountPercent()); // Return prepared instance return receiptItem; diff --git a/src/java/org/mxchange/localization/project_de_DE.properties b/src/java/org/mxchange/localization/project_de_DE.properties index b7961692..5f498c6e 100644 --- a/src/java/org/mxchange/localization/project_de_DE.properties +++ b/src/java/org/mxchange/localization/project_de_DE.properties @@ -38,8 +38,8 @@ LOGIN_FINANCIAL_INCOME_TITLE=Bezeichnung der Einkommensart: FIELD_FINANCIAL_INCOME_TITLE_REQUIRED=Feld "Title" muss ausgefuellt werden. LOGIN_FINANCIAL_ENTER_RECEIPT_ISSUE_DATE_TITLE=Geben oder suchen Sie hier das genaue Datum aus, wann die Rechnung/der Kassenbon erstellt wurde. Dadurch kann ein genauer Zeitverlauf generiert werden. PAGE_TITLE_ADMIN_FINANCIALS_RECEIPT_LIST=Kassenbons auflisten -CONTENT_TITLE_ADMIN_FINANCIALS_RECEIPT_LIST=Listet Kassenbons auf: -TABLE_SUMMARY_ADMIN_LIST_RECEIPTS=Diese Tabelle listet bereits registrierte Kassenbons auf. +CONTENT_TITLE_ADMIN_FINANCIALS_RECEIPT_LIST=Kassenbons auflisten: +TABLE_SUMMARY_ADMIN_LIST_RECEIPTS=Diese Tabelle listet alle eingetragenen Kassenbons auf. #@TODO Please fix German umlauts! ADMIN_EMPTY_LIST_RECEIPT=Es befinden sich keine Kassenbons in der Datenbank. Oder Ihre Suche ergab keine Uebereinstimmungen. #@TODO Please fix German umlauts! @@ -52,7 +52,7 @@ ADMIN_LINK_LIST_RECEIPTS_TITLE=Listet alle registrierten Kassenbons/Rechnungen a ADMIN_LINK_LIST_RECEIPTS=Kassenbons/Rechnungen auflisten ADMIN_LIST_RECEIPTS_HEADER=Alle Kassenbons/Rechnungen auflisten ADMIN_RECEIPT_BASIC_LEGEND=Grunddaten des Kassenbons -ADMIN_RECEIPT_BASIC_LEGEND_TITLE=Geben Sie hier die Grunddaten des neuen Kassenbons einn. +ADMIN_RECEIPT_BASIC_LEGEND_TITLE=Geben Sie hier die Grunddaten des neuen Kassenbons ein. ENTER_RECEIPT_ISSUE_DATE=Ausstellungsdatum des Kassenbons eingeben: ENTER_RECEIPT_NUMBER=Rechnungsnummer eingeben: ENTERED_RECEIPT_NUMBER_INVALID=Die eingegebene Bonnummer/Rechnungsnummer ist kleiner 1 oder groesser 9999999999. @@ -71,4 +71,48 @@ ADMIN_LINK_LIST_RECEIPT_ITEMS=Eintraege auflisten ADMIN_LINK_LIST_RECEIPT_ITEMS_TITLE=Listet alle Eintraege aller Kassenbons auf. ADMIN_LINK_SHOW_RECEIPT_TITLE=Zeigt Daten des Kassenbons an. ADMIN_LINK_SHOW_RECEIPT_ITEM_TITLE=Zeigt Daten eines Eintrages eines Kassenbons an. -ADMIN_PRODUCT_GROSS_PRICE_REQUIRED=Bitte geben Sie den Bruttopreis des Produktes ein. +#@TODO Please fix German umlauts! +PRODUCT_GROSS_PRICE_REQUIRED=Bitte geben Sie den Bruttopreis des Produktes ein. +#@TODO Please fix German umlauts! +ENTER_PRODUCT_NET_PRICE_TITLE=Nettopreis fuer Produkt eingeben: +#@TODO Please fix German umlauts! +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: +ENTER_NET_PRICE=Nettopreis: +ENTER_TAX_RATE=Steuersatz: +ENTER_GROSS_PRICE=Bruttopreis: +#@TODO Please fix German umlauts! +SELECT_RECEIPT_ITEM_PRODUCT=Produkt zum Kassenboneintrag auswaehlen: +ENTER_RECEIPT_ITEM_QUANTITY=Stueckzahl eingeben: +ENTER_RECEIPT_ITEM_DISCOUNT_PERCENT=Prozentualen Nachlass eingeben: +ENTER_RECEIPT_ITEM_DISCOUNT_PERCENT_TITLE=Geben Sie hier den prozentualen Nachlass vom Kassenbon ein. Bitte leer lassen, falls keiner gegeben ist. +ENTER_RECEIPT_ITEM_DISCOUNT_FIXED=Festen Nachlass eingeben: +ENTER_RECEIPT_ITEM_DISCOUNT_FIXED_TITLE=Geben Sie den festen Nachlass vom Kassenbon ein. Bitte leer lassen, falls keiner gegeben ist. +#@TODO Please fix German umlauts! +PAGE_TITLE_ADMIN_FINANCIALS_RECEIPT_ITEM_LIST=Kassenboneintraege auflisten +#@TODO Please fix German umlauts! +CONTENT_TITLE_ADMIN_FINANCIALS_RECEIPT_ITEM_LIST=Kassenboneintraege auflisten: +TABLE_SUMMARY_ADMIN_LIST_RECEIPT_ITEMS=Diese Tabelle listet alle eingetragenen Kassenboneintraege auf. +#@TODO Please fix German umlauts! +ADMIN_EMPTY_LIST_RECEIPT_ITEM=Es befinden sich keine Kassenboneintraege in der Datenbank. Oder Ihre Suche ergab keine Uebereinstimmungen. +#@TODO Please fix German umlauts! +ADMIN_LIST_RECEIPT_ITEMS_HEADER=Alle Kassenboneintraege auflisten +ADMIN_ASSIGNED_ITEM_RECEIPT=Zugewiesener Kassenbon: +ADMIN_ASSIGNED_ITEM_PRODUCT=Zugewiesenes Produkt: +#@TODO Please fix German umlauts! +ADMIN_ADD_RECEIPT_ITEM_TITLE=Neues Kassenboneintrag hinzufuegen +ADMIN_RECEIPT_ITEM_LEGEND=Daten des Kassenboneintrages: +ADMIN_RECEIPT_ITEM_BASIC_LEGEND_TITLE=Geben Sie hier die Daten des neuen Kassenboneintrages ein. +SELECT_ITEM_RECEIPT=Kassenbon auswaehlen: +#@TODO Please fix German umlauts! +BUTTON_ADMIN_ADD_RECEIPT_TEM=Kassenboneintrag hinzufuegen +LABEL_RECEIPTS=Kassenbons +LABEL_PRODUCTS=Produkte +#@TODO Please fix German umlauts! +ADMIN_PRODUCT_REQUIRED=Bitte waehlen Sie ein Produkt aus. +#@TODO Please fix German umlauts! +ADMIN_RECEIPT_REQUIRED=Bitte waehlen Sie einen Kassenbon aus. +ADMIN_RECEIPT_ITEM_QUANTITY_REQUIRED=Bitte geben Sie die gekaufte Produktmenge ein. +ENTER_RECEIPT_ITEM_QUANTITY_TITLE=Geben Sie hier die Stueckanzahl an, wie sie auf dem Kassenbon steht. diff --git a/src/java/org/mxchange/localization/project_en_US.properties b/src/java/org/mxchange/localization/project_en_US.properties index 302118f4..5ca04273 100644 --- a/src/java/org/mxchange/localization/project_en_US.properties +++ b/src/java/org/mxchange/localization/project_en_US.properties @@ -30,7 +30,7 @@ FIELD_FINANCIAL_INCOME_TITLE_REQUIRED=Field "Title" must be filled out. LOGIN_FINANCIAL_ENTER_RECEIPT_ISSUE_DATE_TITLE=Please enter or select here the exact date when the receipt has been issue. Then an exact time-line can be generated. PAGE_TITLE_ADMIN_FINANCIALS_RECEIPT_LIST=List receipts CONTENT_TITLE_ADMIN_FINANCIALS_RECEIPT_LIST=Lists receipts: -TABLE_SUMMARY_ADMIN_LIST_RECEIPTS=This table lists already registered receipts. +TABLE_SUMMARY_ADMIN_LIST_RECEIPTS=This table lists all registered receipts. ADMIN_EMPTY_LIST_RECEIPT=There are no receipts in database. Or your search criteria doesn't match anything. ADMIN_ADD_RECEIPT_TITLE=Add new receipt BUTTON_ADMIN_ADD_RECEIPT=Add receipt @@ -56,4 +56,35 @@ ADMIN_LINK_LIST_RECEIPT_ITEMS=List receipt items ADMIN_LINK_LIST_RECEIPT_ITEMS_TITLE=Lists all receipt items. ADMIN_LINK_SHOW_RECEIPT_TITLE=Shows receipt data. ADMIN_LINK_SHOW_RECEIPT_ITEM_TITLE=Shows receipt item data. -ADMIN_PRODUCT_GROSS_PRICE_REQUIRED=Please enter product's gross price. +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: +ENTER_NET_PRICE=Net price: +ENTER_TAX_RATE=Tax rate: +ENTER_GROSS_PRICE=Gross price: +SELECT_RECEIPT_ITEM_PRODUCT=Choose product for receipt item: +ENTER_RECEIPT_ITEM_QUANTITY=Enter receipt item quantity: +ENTER_RECEIPT_ITEM_DISCOUNT_PERCENT=Enter percentage discount: +ENTER_RECEIPT_ITEM_DISCOUNT_PERCENT_TITLE=Enter here a percentage discount to the receipt's item. Leave empty if none is provided. +ENTER_RECEIPT_ITEM_DISCOUNT_FIXED=Enter fixed discount: +ENTER_RECEIPT_ITEM_DISCOUNT_FIXED_TITLE=Enter here a fixed discount to the receipt's item. Leave empty if none is provided. +PAGE_TITLE_ADMIN_FINANCIALS_RECEIPT_ITEM_LIST=List receipt items +CONTENT_TITLE_ADMIN_FINANCIALS_RECEIPT_ITEM_LIST=List receipt items: +TABLE_SUMMARY_ADMIN_LIST_RECEIPT_ITEMS=This table lists all registered receipt items. +ADMIN_EMPTY_LIST_RECEIPT_ITEM=There are no receipt items in database. Or your search criteria doesn't match anything. +ADMIN_LIST_RECEIPT_ITEMS_HEADER=List all receipt items +ADMIN_ASSIGNED_ITEM_RECEIPT=Assigned item's receipt: +ADMIN_ASSIGNED_ITEM_PRODUCT=Assigned product: +ADMIN_ADD_RECEIPT_ITEM_TITLE=Add new receipt item +ADMIN_RECEIPT_ITEM_LEGEND=Data of receipt item: +ADMIN_RECEIPT_ITEM_BASIC_LEGEND_TITLE=Enter here data of the new receipt item. +SELECT_ITEM_RECEIPT=Choose receipt: +BUTTON_ADMIN_ADD_RECEIPT_TEM=Add receipt item +LABEL_RECEIPTS=Receipts +LABEL_PRODUCTS=Products +ADMIN_PRODUCT_REQUIRED=Please choose a product. +ADMIN_RECEIPT_REQUIRED=Please choose a receipt. +ADMIN_RECEIPT_ITEM_QUANTITY_REQUIRED=Please enter product quantity. +ENTER_RECEIPT_ITEM_QUANTITY_TITLE=Enter here the amount of the choosen product that is shown on the receipt. diff --git a/web/WEB-INF/faces-config.xml b/web/WEB-INF/faces-config.xml index 5e4b319e..cab11327 100644 --- a/web/WEB-INF/faces-config.xml +++ b/web/WEB-INF/faces-config.xml @@ -166,11 +166,11 @@ admin_list_receipts - /admin/financials/receipts/admin_receipt_list.xhtml + /admin/financial/receipts/admin_receipt_list.xhtml admin_list_receipt_items - /admin/financials/receipt_items/admin_receipt_item_list.xhtml + /admin/financial/receipt_items/admin_receipt_item_list.xhtml diff --git a/web/WEB-INF/templates/admin/financial/receipt/admin_form_financial_receipt.tpl b/web/WEB-INF/templates/admin/financial/receipt/admin_form_financial_receipt.tpl index b07db952..72c5341b 100644 --- a/web/WEB-INF/templates/admin/financial/receipt/admin_form_financial_receipt.tpl +++ b/web/WEB-INF/templates/admin/financial/receipt/admin_form_financial_receipt.tpl @@ -1,17 +1,15 @@ + - - + --> - + diff --git a/web/WEB-INF/templates/admin/financial/receipt_item/admin_form_financial_receipt_item.tpl b/web/WEB-INF/templates/admin/financial/receipt_item/admin_form_financial_receipt_item.tpl index 68b2efb1..9b7486c3 100644 --- a/web/WEB-INF/templates/admin/financial/receipt_item/admin_form_financial_receipt_item.tpl +++ b/web/WEB-INF/templates/admin/financial/receipt_item/admin_form_financial_receipt_item.tpl @@ -1,4 +1,7 @@ + - - - - + + + - + - + + + + - + - + diff --git a/web/WEB-INF/templates/user/financial/receipt/login_form_financial_receipt.tpl b/web/WEB-INF/templates/user/financial/receipt/login_form_financial_receipt.tpl index 67ee3e43..d2d12b0e 100644 --- a/web/WEB-INF/templates/user/financial/receipt/login_form_financial_receipt.tpl +++ b/web/WEB-INF/templates/user/financial/receipt/login_form_financial_receipt.tpl @@ -12,7 +12,7 @@ - + - + diff --git a/web/admin/financial/receipt_items/admin_receipt_item_list.xhtml b/web/admin/financial/receipt_items/admin_receipt_item_list.xhtml new file mode 100644 index 00000000..71c0cb73 --- /dev/null +++ b/web/admin/financial/receipt_items/admin_receipt_item_list.xhtml @@ -0,0 +1,139 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+ +

+ + + + + + + + + + + + + diff --git a/web/admin/financial/receipts/admin_receipt_list.xhtml b/web/admin/financial/receipts/admin_receipt_list.xhtml new file mode 100644 index 00000000..f847ef8d --- /dev/null +++ b/web/admin/financial/receipts/admin_receipt_list.xhtml @@ -0,0 +1,185 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+ +

+
+ + + + + + + + +
+
+
+
diff --git a/web/admin/financials/receipt_items/admin_receipt_item_list.xhtml b/web/admin/financials/receipt_items/admin_receipt_item_list.xhtml deleted file mode 100644 index c6dd925e..00000000 --- a/web/admin/financials/receipt_items/admin_receipt_item_list.xhtml +++ /dev/null @@ -1,185 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

- -

-
- - - - - - - - -
-
-
-
diff --git a/web/admin/financials/receipts/admin_receipt_list.xhtml b/web/admin/financials/receipts/admin_receipt_list.xhtml deleted file mode 100644 index 46ba913c..00000000 --- a/web/admin/financials/receipts/admin_receipt_list.xhtml +++ /dev/null @@ -1,185 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

- -

-
- - - - - - - - -
-
-
-