From 642fee1e4421071fd23348091d074a887327e195 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sat, 24 Mar 2018 23:05:59 +0100 Subject: [PATCH] Don' cherry-pick: - added more i18n strings (non-generic) - receiptNumber may not be all-numbers, so changed type to java.lang.String - removed p:message as this is no need for (anymore) - incomeSingleAmount is now java.math.BigDecimal as this is more precise than java.lang.Float is - having getter/setter for backing bean properties in interface may ask other developers to invoke them from other beans, this is bad as it may cause problems when code grows - so the interface FinancialsIncomeWebRequestController is now cleared and all documentation is moved to backing bean class - added itemNumber to same backing bean - ADMIN_LINK_SHOW_RECEIPT_TITLE is a project-specific i18n key, not generic (msg) - so ADMIN_LINK_SHOW_RECEIPT_ITEM_PRODUCT_TITLE is ... - added missing navigation rules from admin_receipt_list - fixed name for getter of filteredReceiptItems property - renamed companyEmployee -> employee in JSF views/templates - let's use beanHelper.renderBranchOffice() instead of outputting only plain id number - added TODOs of unfinished/hard-coded stuff - updated/changed copyright to Free Software Foundation MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- .../FinancialsIncomeWebRequestBean.java | 53 +++++-- .../FinancialsIncomeWebRequestController.java | 53 +------ .../FinancialAdminReceiptWebRequestBean.java | 8 +- ...ncialAdminReceiptWebRequestController.java | 2 +- .../FinancialsReceiptWebRequestBean.java | 8 +- ...FinancialsReceiptWebRequestController.java | 2 +- ...nancialAdminReceiptItemWebRequestBean.java | 144 ++++++++++++------ ...lAdminReceiptItemWebRequestController.java | 2 +- .../FinancialsReceiptItemWebRequestBean.java | 5 +- ...ncialsReceiptItemWebRequestController.java | 2 +- .../receipt/FinancialsReceiptConverter.java | 2 +- .../localization/project_de_DE.properties | 67 +++++--- .../localization/project_en_US.properties | 38 +++-- web/WEB-INF/faces-config.xml | 12 ++ web/WEB-INF/project-links.jsf.taglib.xml | 2 +- .../receipt/admin_form_financial_receipt.tpl | 8 +- .../admin_form_financial_receipt_item.tpl | 57 +++++-- .../receipt/login_form_financial_receipt.tpl | 9 +- .../receipt/admin_receipt_list.xhtml | 16 +- .../admin_receipt_item_list.xhtml | 23 +-- 20 files changed, 318 insertions(+), 195 deletions(-) diff --git a/src/java/org/mxchange/jfinancials/beans/financial/model/income/FinancialsIncomeWebRequestBean.java b/src/java/org/mxchange/jfinancials/beans/financial/model/income/FinancialsIncomeWebRequestBean.java index 20c6795c..c02bcf3b 100644 --- a/src/java/org/mxchange/jfinancials/beans/financial/model/income/FinancialsIncomeWebRequestBean.java +++ b/src/java/org/mxchange/jfinancials/beans/financial/model/income/FinancialsIncomeWebRequestBean.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016, 2017 Roland Häder + * Copyright (C) 2016 - 2018 Free Software Foundation * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -16,6 +16,7 @@ */ package org.mxchange.jfinancials.beans.financial.model.income; +import java.math.BigDecimal; import java.text.MessageFormat; import java.util.Arrays; import java.util.List; @@ -58,7 +59,7 @@ public class FinancialsIncomeWebRequestBean extends BaseFinancialsBean implement /** * Income single amount */ - private Float incomeSingleAmount; + private BigDecimal incomeSingleAmount; /** * Income (type) title @@ -95,7 +96,7 @@ public class FinancialsIncomeWebRequestBean extends BaseFinancialsBean implement } else if (null == this.getIncomeSingleAmount()) { // Throw again throw new NullPointerException("incomeSingleAmount is null"); //NOI18N - } else if (this.getIncomeSingleAmount() < 0) { + } else if (this.getIncomeSingleAmount().doubleValue() < 0) { // Not allowed value throw new IllegalArgumentException(MessageFormat.format("incomeSingleAmount={0} is not valid.", this.getIncomeSingleAmount())); //NOI18N } else if (null == this.getIncomeTitle()) { @@ -117,38 +118,66 @@ public class FinancialsIncomeWebRequestBean extends BaseFinancialsBean implement return "add_user_fiancial_income"; //NOI18N } - @Override + /** + * Returns a list of all all income intervals + *

+ * @return Income intervals + */ public List allIncomeIntervals () { // Return list from enum values return Arrays.asList(FinancialInterval.values()); } - @Override + /** + * Getter for income interval + *

+ * @return Income interval + */ public FinancialInterval getIncomeInterval () { return this.incomeInterval; } - @Override + /** + * Setter for income (type) interval + *

+ * @param incomeInterval Income interval + */ public void setIncomeInterval (final FinancialInterval incomeInterval) { this.incomeInterval = incomeInterval; } - @Override - public Float getIncomeSingleAmount () { + /** + * Getter for income single amount + *

+ * @return Income single amount + */ + public BigDecimal getIncomeSingleAmount () { return this.incomeSingleAmount; } - @Override - public void setIncomeSingleAmount (final Float incomeSingleAmount) { + /** + * Setter for income single amount + *

+ * @param incomeSingleAmount Income single amount + */ + public void setIncomeSingleAmount (final BigDecimal incomeSingleAmount) { this.incomeSingleAmount = incomeSingleAmount; } - @Override + /** + * Getter for income (type) title + *

+ * @return Income title + */ public String getIncomeTitle () { return this.incomeTitle; } - @Override + /** + * Setter for income (type) title + *

+ * @param incomeTitle Income title + */ public void setIncomeTitle (final String incomeTitle) { this.incomeTitle = incomeTitle; } diff --git a/src/java/org/mxchange/jfinancials/beans/financial/model/income/FinancialsIncomeWebRequestController.java b/src/java/org/mxchange/jfinancials/beans/financial/model/income/FinancialsIncomeWebRequestController.java index e885949a..179e0275 100644 --- a/src/java/org/mxchange/jfinancials/beans/financial/model/income/FinancialsIncomeWebRequestController.java +++ b/src/java/org/mxchange/jfinancials/beans/financial/model/income/FinancialsIncomeWebRequestController.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016, 2017 Roland Häder + * Copyright (C) 2016 - 2018 Free Software Foundation * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -17,8 +17,6 @@ package org.mxchange.jfinancials.beans.financial.model.income; import java.io.Serializable; -import java.util.List; -import org.mxchange.jfinancials.model.income.interval.FinancialInterval; /** * An administrative interface for financial income beans @@ -27,53 +25,4 @@ import org.mxchange.jfinancials.model.income.interval.FinancialInterval; */ public interface FinancialsIncomeWebRequestController extends Serializable { - /** - * Getter for income single amount - *

- * @return Income single amount - */ - Float getIncomeSingleAmount (); - - /** - * Setter for income single amount - *

- * @param incomeSingleAmount Income single amount - */ - void setIncomeSingleAmount (final Float incomeSingleAmount); - - /** - * Getter for income (type) title - *

- * @return Income title - */ - String getIncomeTitle (); - - /** - * Setter for income (type) title - *

- * @param incomeTitle Income title - */ - void setIncomeTitle (final String incomeTitle); - - /** - * Getter for income interval - *

- * @return Income interval - */ - FinancialInterval getIncomeInterval (); - - /** - * Setter for income (type) interval - *

- * @param incomeInterval Income interval - */ - void setIncomeInterval (final FinancialInterval incomeInterval); - - /** - * Returns a list of all all income intervals - *

- * @return Income intervals - */ - List allIncomeIntervals (); - } 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 d6a60773..fa714108 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 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2017 Roland Häder + * Copyright (C) 2017, 2018 Free Software Foundation * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -88,7 +88,7 @@ public class FinancialAdminReceiptWebRequestBean extends BaseFinancialsBean impl /** * Receipt number (only numbers) */ - private Long receiptNumber; + private String receiptNumber; /** * Payment type being used for this receipt @@ -240,7 +240,7 @@ public class FinancialAdminReceiptWebRequestBean extends BaseFinancialsBean impl *

* @return Receipt number */ - public Long getReceiptNumber () { + public String getReceiptNumber () { return this.receiptNumber; } @@ -249,7 +249,7 @@ public class FinancialAdminReceiptWebRequestBean extends BaseFinancialsBean impl *

* @param receiptNumber Receipt number */ - public void setReceiptNumber (final Long receiptNumber) { + public void setReceiptNumber (final String receiptNumber) { this.receiptNumber = receiptNumber; } diff --git a/src/java/org/mxchange/jfinancials/beans/financial/model/receipt/FinancialAdminReceiptWebRequestController.java b/src/java/org/mxchange/jfinancials/beans/financial/model/receipt/FinancialAdminReceiptWebRequestController.java index 6ae4ff0d..1a109464 100644 --- a/src/java/org/mxchange/jfinancials/beans/financial/model/receipt/FinancialAdminReceiptWebRequestController.java +++ b/src/java/org/mxchange/jfinancials/beans/financial/model/receipt/FinancialAdminReceiptWebRequestController.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2017 Roland Häder + * Copyright (C) 2017, 2018 Free Software Foundation * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as 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 ce89849d..dd67e95f 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 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016, 2017 Roland Häder + * Copyright (C) 2016 - 2018 Free Software Foundation * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -110,7 +110,7 @@ public class FinancialsReceiptWebRequestBean extends BaseFinancialsBean implemen /** * Receipt number (only numbers) */ - private Long receiptNumber; + private String receiptNumber; /** * Payment type being used for this receipt @@ -385,7 +385,7 @@ public class FinancialsReceiptWebRequestBean extends BaseFinancialsBean implemen *

* @return Receipt number */ - public Long getReceiptNumber () { + public String getReceiptNumber () { return this.receiptNumber; } @@ -394,7 +394,7 @@ public class FinancialsReceiptWebRequestBean extends BaseFinancialsBean implemen *

* @param receiptNumber Receipt number */ - public void setReceiptNumber (final Long receiptNumber) { + public void setReceiptNumber (final String receiptNumber) { this.receiptNumber = receiptNumber; } diff --git a/src/java/org/mxchange/jfinancials/beans/financial/model/receipt/FinancialsReceiptWebRequestController.java b/src/java/org/mxchange/jfinancials/beans/financial/model/receipt/FinancialsReceiptWebRequestController.java index 43adb376..23a72051 100644 --- a/src/java/org/mxchange/jfinancials/beans/financial/model/receipt/FinancialsReceiptWebRequestController.java +++ b/src/java/org/mxchange/jfinancials/beans/financial/model/receipt/FinancialsReceiptWebRequestController.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016, 2017 Roland Häder + * Copyright (C) 2016 - 2018 Free Software Foundation * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as 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 efa822b6..b114fafc 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 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2017 Roland Häder + * Copyright (C) 2017, 2018 Free Software Foundation * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -16,6 +16,7 @@ */ package org.mxchange.jfinancials.beans.financial.model.receipt_item; +import java.math.BigDecimal; import java.text.MessageFormat; import javax.ejb.EJB; import javax.enterprise.context.RequestScoped; @@ -68,15 +69,29 @@ public class FinancialAdminReceiptItemWebRequestBean extends BaseFinancialsBean private String itemBrandName; /** - * Fixed discount on product price (if any) + * Coupon number assigned with item */ - private Float itemDiscountFixed; + private String itemCouponNumber; /** - * Percentage discount on product price (if any) Valid: values 0...1 (1=100% - * discount) + * Whether the item is a discount on whole receipt or item */ - private Float itemDiscountPercent; + private Boolean itemIsDiscount; + + /** + * Whether the item is a refund + */ + private Boolean itemIsRefund; + + /** + * Item manufacturer/producer + */ + private BasicData itemManufacturer; + + /** + * Item's number + */ + private Long itemNumber; /** * Item product @@ -86,7 +101,7 @@ public class FinancialAdminReceiptItemWebRequestBean extends BaseFinancialsBean /** * Quantity of item */ - private Short itemQuantity; + private BigDecimal itemQuantity; /** * Assigned receipt @@ -101,22 +116,17 @@ public class FinancialAdminReceiptItemWebRequestBean extends BaseFinancialsBean /** * Product's gross price */ - private Float productGrossPrice; - - /** - * Item manufacturer/producer - */ - private BasicData itemManufacturer; + private BigDecimal productGrossPrice; /** * Product's net price */ - private Float productNetPrice; + private BigDecimal productNetPrice; /** * Tax rate for this item */ - private Float productTaxRate; + private BigDecimal productTaxRate; /** * General receipt item controller @@ -192,39 +202,58 @@ public class FinancialAdminReceiptItemWebRequestBean extends BaseFinancialsBean } /** - * Getter for item discount (fixed) + * Getter for item's coupon number + *

+ * @return Item's coupon number + */ + public String getItemCouponNumber () { + return this.itemCouponNumber; + } + + /** + * Setter for item's coupon number *

- * @return Item discount (fixed) + * @param itemCouponNumber Item's coupon number */ - public Float getItemDiscountFixed () { - return this.itemDiscountFixed; + public void setItemCouponNumber (final String itemCouponNumber) { + this.itemCouponNumber = itemCouponNumber; } /** - * Setter for item discount (fixed) + * Getter for whether the item is a discount on whole receipt or item *

- * @param itemDiscountFixed Item discount (fixed) + * @return Whether the item is a discount on whole receipt or item */ - public void setItemDiscountFixed (final Float itemDiscountFixed) { - this.itemDiscountFixed = itemDiscountFixed; + public Boolean getItemIsDiscount () { + return this.itemIsDiscount; } /** - * Getter for item discount (percent) + * Setter for whether the item is a discount on whole receipt or item *

- * @return Item discount (percent) + * @param itemIsDiscount Whether the item is a discount on whole receipt or + * item */ - public Float getItemDiscountPercent () { - return this.itemDiscountPercent; + public void setItemIsDiscount (final Boolean itemIsDiscount) { + this.itemIsDiscount = itemIsDiscount; } /** - * Setter for item discount (percent) + * Getter for whether the item is a refund *

- * @param itemDiscountPercent Item discount (percent) + * @return Whether the item is a refund */ - public void setItemDiscountPercent (final Float itemDiscountPercent) { - this.itemDiscountPercent = itemDiscountPercent; + public Boolean getItemIsRefund () { + return this.itemIsRefund; + } + + /** + * Setter for whether the item is a refund + *

+ * @param itemIsRefund Whether the item is a refund + */ + public void setItemIsRefund (final Boolean itemIsRefund) { + this.itemIsRefund = itemIsRefund; } /** @@ -245,6 +274,24 @@ public class FinancialAdminReceiptItemWebRequestBean extends BaseFinancialsBean this.itemManufacturer = itemManufacturer; } + /** + * Getter for item's number + *

+ * @return Item's number + */ + public Long getItemNumber () { + return this.itemNumber; + } + + /** + * Setter for item's number + *

+ * @param itemNumber Item's number + */ + public void setItemNumber (final Long itemNumber) { + this.itemNumber = itemNumber; + } + /** * Getter for assigned product *

@@ -268,7 +315,7 @@ public class FinancialAdminReceiptItemWebRequestBean extends BaseFinancialsBean *

* @return Item quantity */ - public Short getItemQuantity () { + public BigDecimal getItemQuantity () { return this.itemQuantity; } @@ -277,7 +324,7 @@ public class FinancialAdminReceiptItemWebRequestBean extends BaseFinancialsBean *

* @param itemQuantity Item quantity */ - public void setItemQuantity (final Short itemQuantity) { + public void setItemQuantity (final BigDecimal itemQuantity) { this.itemQuantity = itemQuantity; } @@ -322,7 +369,7 @@ public class FinancialAdminReceiptItemWebRequestBean extends BaseFinancialsBean *

* @return Product's gross price */ - public Float getProductGrossPrice () { + public BigDecimal getProductGrossPrice () { return this.productGrossPrice; } @@ -331,7 +378,7 @@ public class FinancialAdminReceiptItemWebRequestBean extends BaseFinancialsBean *

* @param productGrossPrice Product's gross price */ - public void setProductGrossPrice (final Float productGrossPrice) { + public void setProductGrossPrice (final BigDecimal productGrossPrice) { this.productGrossPrice = productGrossPrice; } @@ -340,7 +387,7 @@ public class FinancialAdminReceiptItemWebRequestBean extends BaseFinancialsBean *

* @return Product's net price */ - public Float getProductNetPrice () { + public BigDecimal getProductNetPrice () { return this.productNetPrice; } @@ -349,7 +396,7 @@ public class FinancialAdminReceiptItemWebRequestBean extends BaseFinancialsBean *

* @param productNetPrice Product's net price */ - public void setProductNetPrice (final Float productNetPrice) { + public void setProductNetPrice (final BigDecimal productNetPrice) { this.productNetPrice = productNetPrice; } @@ -358,7 +405,7 @@ public class FinancialAdminReceiptItemWebRequestBean extends BaseFinancialsBean *

* @return Product's tax rate */ - public Float getProductTaxRate () { + public BigDecimal getProductTaxRate () { return this.productTaxRate; } @@ -367,7 +414,7 @@ public class FinancialAdminReceiptItemWebRequestBean extends BaseFinancialsBean *

* @param productTaxRate Product's tax rate */ - public void setProductTaxRate (final Float productTaxRate) { + public void setProductTaxRate (final BigDecimal productTaxRate) { this.productTaxRate = productTaxRate; } @@ -377,12 +424,18 @@ public class FinancialAdminReceiptItemWebRequestBean extends BaseFinancialsBean private void clear () { // Clear all fields this.setItemBrandName(null); - this.setItemDiscountFixed(null); - this.setItemDiscountPercent(null); + this.setItemCouponNumber(null); + this.setItemIsDiscount(null); + this.setItemIsRefund(null); this.setItemManufacturer(null); + this.setItemNumber(null); this.setItemProduct(null); this.setItemQuantity(null); this.setItemReceipt(null); + this.setProductCurrencyCode(null); + this.setProductGrossPrice(null); + this.setProductNetPrice(null); + this.setProductTaxRate(null); } /** @@ -396,9 +449,14 @@ public class FinancialAdminReceiptItemWebRequestBean extends BaseFinancialsBean // Set optional data receiptItem.setItemBrandName(this.getItemBrandName()); - receiptItem.setItemDiscountFixed(this.getItemDiscountFixed()); - receiptItem.setItemDiscountPercent(this.getItemDiscountPercent()); + receiptItem.setItemCouponNumber(this.getItemCouponNumber()); + receiptItem.setItemIsDiscount(this.getItemIsDiscount()); + receiptItem.setItemIsRefund(this.getItemIsRefund()); receiptItem.setItemManufacturer(this.getItemManufacturer()); + receiptItem.setItemNumber(this.getItemNumber()); + receiptItem.setItemGrossPrice(this.getProductGrossPrice()); + receiptItem.setItemNetPrice(this.getProductNetPrice()); + receiptItem.setItemTaxRate(this.getProductTaxRate()); // Return prepared instance return receiptItem; diff --git a/src/java/org/mxchange/jfinancials/beans/financial/model/receipt_item/FinancialAdminReceiptItemWebRequestController.java b/src/java/org/mxchange/jfinancials/beans/financial/model/receipt_item/FinancialAdminReceiptItemWebRequestController.java index db4a5e6a..e963e48a 100644 --- a/src/java/org/mxchange/jfinancials/beans/financial/model/receipt_item/FinancialAdminReceiptItemWebRequestController.java +++ b/src/java/org/mxchange/jfinancials/beans/financial/model/receipt_item/FinancialAdminReceiptItemWebRequestController.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2017 Roland Häder + * Copyright (C) 2017, 2018 Free Software Foundation * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as 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 5456d7d0..8bdb93a0 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 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016, 2017 Roland Häder + * Copyright (C) 2016 - 2018 Free Software Foundation * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -235,7 +235,7 @@ public class FinancialsReceiptItemWebRequestBean extends BaseFinancialsBean impl * @param filteredReceiptItems Filtered receipt items */ @SuppressWarnings ("AssignmentToCollectionOrArrayFieldFromParameter") - public void setFilteredReceipts (final List filteredReceiptItems) { + public void setFilteredReceiptItems (final List filteredReceiptItems) { this.filteredReceiptItems = filteredReceiptItems; } @@ -298,6 +298,7 @@ public class FinancialsReceiptItemWebRequestBean extends BaseFinancialsBean impl */ private BillableReceiptItem createReceiptInstance () { // Init receipt instance + // @TODO Unfinished: final BillableReceiptItem receiptItem = new FinancialReceiptItem(); // Set optional fields diff --git a/src/java/org/mxchange/jfinancials/beans/financial/model/receipt_item/FinancialsReceiptItemWebRequestController.java b/src/java/org/mxchange/jfinancials/beans/financial/model/receipt_item/FinancialsReceiptItemWebRequestController.java index a6853be0..aaa3bb03 100644 --- a/src/java/org/mxchange/jfinancials/beans/financial/model/receipt_item/FinancialsReceiptItemWebRequestController.java +++ b/src/java/org/mxchange/jfinancials/beans/financial/model/receipt_item/FinancialsReceiptItemWebRequestController.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016, 2017 Roland Häder + * Copyright (C) 2016 - 2018 Free Software Foundation * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as diff --git a/src/java/org/mxchange/jfinancials/converter/financial/receipt/FinancialsReceiptConverter.java b/src/java/org/mxchange/jfinancials/converter/financial/receipt/FinancialsReceiptConverter.java index 33d444d5..08a3c41d 100644 --- a/src/java/org/mxchange/jfinancials/converter/financial/receipt/FinancialsReceiptConverter.java +++ b/src/java/org/mxchange/jfinancials/converter/financial/receipt/FinancialsReceiptConverter.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016, 2017 Roland Häder + * Copyright (C) 2016 - 2018 Free Software Foundation * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as diff --git a/src/java/org/mxchange/localization/project_de_DE.properties b/src/java/org/mxchange/localization/project_de_DE.properties index 19aec461..41417042 100644 --- a/src/java/org/mxchange/localization/project_de_DE.properties +++ b/src/java/org/mxchange/localization/project_de_DE.properties @@ -1,4 +1,4 @@ -# Copyright (C) 2016, 2017 Roland H\u00e4der +# Copyright (C) 2016 - 2018 Free Software Foundation # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as @@ -53,10 +53,11 @@ 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 ein. +ADMIN_RECEIPT_BASIC_LEGEND_TITLE=Bitte 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. +#@TODO Please fix German umlauts! +ENTERED_RECEIPT_NUMBER_INVALID=Die eingegebene Bonnummer/Rechnungsnummer ist kleiner 1 oder groesser 9223372036854775807. ADMIN_SELECT_RECEIPT_USER_OWNER=Kassenbon einem Benutzer zuweisen: ENTER_RECEIPT_REGISTER_NUMBER=Kassennummer eingeben: ENTER_RECEIPT_BARCODE_NUMBER=Barcode-Nummer eingeben: @@ -84,30 +85,25 @@ 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: +SELECT_RECEIPT_ITEM_PRODUCT=Produkt zum Artikel 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. +PAGE_TITLE_ADMIN_FINANCIALS_RECEIPT_ITEM_LIST=Artikel auflisten #@TODO Please fix German umlauts! -ADMIN_EMPTY_LIST_RECEIPT_ITEM=Es befinden sich keine Kassenboneintraege in der Datenbank. Oder Ihre Suche ergab keine Uebereinstimmungen. +CONTENT_TITLE_ADMIN_FINANCIALS_RECEIPT_ITEM_LIST=Artikel auflisten: +TABLE_SUMMARY_ADMIN_LIST_RECEIPT_ITEMS=Diese Tabelle listet alle eingetragenen Artikel auf. #@TODO Please fix German umlauts! -ADMIN_LIST_RECEIPT_ITEMS_HEADER=Alle Kassenboneintraege auflisten +ADMIN_EMPTY_LIST_RECEIPT_ITEM=Es befinden sich keine Artikel in der Datenbank. Oder Ihre Suche ergab keine Uebereinstimmungen. +ADMIN_LIST_RECEIPT_ITEMS_HEADER=Alle Artikel 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. +ADMIN_ADD_RECEIPT_ITEM_TITLE=Neuen Artikel hinzufuegen +ADMIN_RECEIPT_ITEM_LEGEND=Daten des Artikels: +ADMIN_RECEIPT_ITEM_BASIC_LEGEND_TITLE=Bitte geben Sie hier die Daten des neuen Artikels ein. SELECT_ITEM_RECEIPT=Kassenbon auswaehlen: #@TODO Please fix German umlauts! -BUTTON_ADMIN_ADD_RECEIPT_TEM=Kassenboneintrag hinzufuegen +BUTTON_ADMIN_ADD_RECEIPT_TEM=Artikel hinzufuegen LABEL_RECEIPTS=Kassenbons LABEL_PRODUCTS=Produkte #@TODO Please fix German umlauts! @@ -218,3 +214,38 @@ 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. +ENTER_RECEIPT_ITEM_NUMBER=Artikelnumber: +ENTER_RECEIPT_ITEM_NUMBER_TITLE=Geben Sie die Artikelnummer vom Kassenbon ein. +#@TODO Please fix German umlauts! +CHOOSE_RECEIPT_ITEM_IS_A_REFUND=Ist dieser Artikel eine Rueckgabe? +#@TODO Please fix German umlauts! +CHOOSE_RECEIPT_ITEM_IS_A_REFUND_REQUIRED=Bitte waehlen Sie aus, ob der Artikel eine Rueckgabe ist. +#@TODO Please fix German umlauts! +CHOOSE_RECEIPT_ITEM_IS_A_REFUND_TITLE=Gibt an, ob der Artikel eine Rueckgabe, zum Beispiel zurueckgegebenes Flaschenpfand, ist. +ADMIN_LINK_SHOW_RECEIPT_ITEM_PRODUCT_TITLE=Zeigt Produktdaten des Artikels an. +ENTER_RECEIPT_ITEM_COUPON_NUMBER=Coupon-Nummer eingeben: +#@TODO Please fix German umlauts! +ENTER_RECEIPT_ITEM_COUPON_NUMBER_TITLE=Geben Sie die Nummer des eingeloesten Coupons ein. +ADMIN_RECEIPT_DATE_OF_ISSUE_TITLE=Bitte geben Sie das Ausstellungsdatum mit Uhrzeit fuer den Kassenbon ein. Falls Sie keine Uhrzeit haben, einfach auf 00:00 Uhr lassen. +#@TODO Please fix German umlauts! +ENTERED_RECEIPT_REGISTER_NUMBER_INVALID=Die eingegebene Kassennummer ist kleiner 1 oder groesser 999. +CHOOSE_RECEIPT_ITEM_IS_A_DISCOUNT=Ist dies ein Nachlass? +#@TODO Please fix German umlauts! +CHOOSE_RECEIPT_ITEM_IS_A_DISCOUNT_REQUIRED=Bitte waehlen Sie aus, ob dies ein Nachlass ist. +#@TODO Please fix German umlauts! +CHOOSE_RECEIPT_ITEM_IS_A_DISCOUNT_TITLE=Waehlen Sie aus, ob dies ein Nachlass auf einen Artikel ist. +#@TODO Please fix German umlauts! +ADMIN_SELECT_PRODUCT_AGE_GROUP=Altersklasse zum Produkt auswaehlen: +#@TODO Please fix German umlauts! +ADMIN_SELECT_PRODUCT_AGE_GROUP_TITLE=Bitte waehlen Sie wenn moeglich eine Altersklasse fuer dieses Produkt aus. Zum Beispiel haben Schuhe und Kleidung Altersklassen. +#@TODO Please fix German umlauts! +ADMIN_ENTER_GENERIC_PRODUCT_SIZE=Groesse des Produktes: +#@TODO Please fix German umlauts! +ADMIN_ENTER_GENERIC_PRODUCT_SIZE_TITLE=Geben Sie hier die Groesse des Produktes an. Zum Beispiel haben Schuhe oder Kleider Groessen. +AGE_GROUP_BABY=Age group "Baby" +AGE_GROUP_NEWBORN=Age group "Newborn" +AGE_GROUP_CHILD=Age group "Child" +lAGE_GROUP_YOUTH= +AGE_GROUP_YOUTH=Age group "Youth" +AGE_GROUP_ADULT=Age group "Adult" +AGE_GROUP_SENIOR=Age group "Senior" diff --git a/src/java/org/mxchange/localization/project_en_US.properties b/src/java/org/mxchange/localization/project_en_US.properties index 7a1c7b8f..d20bc35f 100644 --- a/src/java/org/mxchange/localization/project_en_US.properties +++ b/src/java/org/mxchange/localization/project_en_US.properties @@ -1,4 +1,4 @@ -# Copyright (C) 2016, 2017 Roland H\u00e4der +# Copyright (C) 2016 - 2018 Free Software Foundation # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as @@ -40,10 +40,10 @@ ADMIN_LINK_LIST_RECEIPTS_TITLE=Lists all registered receipts. ADMIN_LINK_LIST_RECEIPTS=Receipts ADMIN_LIST_RECEIPTS_HEADER=List all receipts ADMIN_RECEIPT_BASIC_LEGEND=Basic data of receipt: -ADMIN_RECEIPT_BASIC_LEGEND_TITLE=Enter here basic data of the new receipt. +ADMIN_RECEIPT_BASIC_LEGEND_TITLE=Please enter here basic data of the new receipt. ENTER_RECEIPT_ISSUE_DATE=Enter date of issue of receipt: ENTER_RECEIPT_NUMBER=Enter receipt number: -ENTERED_RECEIPT_NUMBER_INVALID=Your entered receipt number is smaller than 1 or larger than 9999999999. +ENTERED_RECEIPT_NUMBER_INVALID=Your entered receipt number is smaller than 1 or larger than 9223372036854775807. ADMIN_SELECT_RECEIPT_USER_OWNER=Assign receipt to user: ENTER_RECEIPT_REGISTER_NUMBER=Enter cash register number: ENTER_RECEIPT_BARCODE_NUMBER=Enter bar code number: @@ -65,10 +65,6 @@ 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. @@ -78,7 +74,7 @@ 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. +ADMIN_RECEIPT_ITEM_BASIC_LEGEND_TITLE=Please enter here data of the new receipt item. SELECT_ITEM_RECEIPT=Choose receipt: BUTTON_ADMIN_ADD_RECEIPT_TEM=Add receipt item LABEL_RECEIPTS=Receipts @@ -117,7 +113,7 @@ 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 +AGE_GROUP_YOUTH=Altersgruppe "Jungend" ADMIN_PRODUCT_CATEGORY_REQUIRED=Please choose a product category. ADMIN_PRODUCT_I18N_KEY_REQUIRED=Please enter a product i18n key. PAGE_TITLE_ADMIN_LIST_PRODUCT_CATEGORY=List product categories @@ -161,3 +157,27 @@ 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. +ENTER_RECEIPT_ITEM_NUMBER=Item number: +ENTER_RECEIPT_ITEM_NUMBER_TITLE=Enter receipt item's number. +CHOOSE_RECEIPT_ITEM_IS_A_REFUND=Is this item a refund? +CHOOSE_RECEIPT_ITEM_IS_A_REFUND_REQUIRED=Please choose whether the item is a refund. +CHOOSE_RECEIPT_ITEM_IS_A_REFUND_TITLE=Choose whether the item is a refund, like from a deposit of a bottle or can. +CHOOSE_RECEIPT_ITEM_IS_A_DISCOUNT=Is this item a discount? +CHOOSE_RECEIPT_ITEM_IS_A_DISCOUNT_REQUIRED=Please choose whether the item is a discount. +CHOOSE_RECEIPT_ITEM_IS_A_DISCOUNT_TITLE=Choose whether this is a discount on an item. +ADMIN_LINK_SHOW_RECEIPT_ITEM_PRODUCT_TITLE=Shows receipt item's product data. +ENTER_RECEIPT_ITEM_COUPON_NUMBER=Enter coupon number: +ENTER_RECEIPT_ITEM_COUPON_NUMBER_TITLE=Please enter the number of the used coupon. +ADMIN_RECEIPT_DATE_OF_ISSUE_TITLE=Please enter issue date of the receipt including time. In case you don't have time, set it to 00:00. +ENTERED_RECEIPT_REGISTER_NUMBER_INVALID=Your entered cash register number is smaller than 1 and larger than 999. +ADMIN_SELECT_PRODUCT_AGE_GROUP=Choose product's age group: +ADMIN_SELECT_PRODUCT_AGE_GROUP_TITLE=Please choose an age class for this product, if possible. For example shoes and clothing have age classes. +ADMIN_ENTER_GENERIC_PRODUCT_SIZE=Enter product's size: +ADMIN_ENTER_GENERIC_PRODUCT_SIZE_TITLE=Enter product's size, if available. For example shoes or clothing have sizes. +AGE_GROUP_BABY=Altersgruppe "Baby" +AGE_GROUP_NEWBORN=Altersgruppe "Neugeborene" +AGE_GROUP_CHILD=Altersgruppe "Kind" +lAGE_GROUP_YOUTH=Altersgruppe "Jugend" +BUTTON_ADMIN_ADD_GENERIC_PRODUCT=Add product +AGE_GROUP_ADULT=Altersgruppe "Erwachsene" +AGE_GROUP_SENIOR=Altersgruppe "Senioren" diff --git a/web/WEB-INF/faces-config.xml b/web/WEB-INF/faces-config.xml index c5844259..e0ce1167 100644 --- a/web/WEB-INF/faces-config.xml +++ b/web/WEB-INF/faces-config.xml @@ -988,6 +988,18 @@ admin_assign_receipt_user /admin/financial/receipt/admin_assign_receipt_user.xhtml + + admin_show_user + /admin/user/admin_user_show.xhtml + + + admin_show_employee + /admin/company_employee/admin_company_employee_show.xhtml + + + admin_assign_receipt_seller + /admin/financial/receipt/admin_assign_receipt_seller.xhtml + /admin/financial/receipt_item/admin_receipt_item_list.xhtml diff --git a/web/WEB-INF/project-links.jsf.taglib.xml b/web/WEB-INF/project-links.jsf.taglib.xml index 87439f51..c1cb5658 100644 --- a/web/WEB-INF/project-links.jsf.taglib.xml +++ b/web/WEB-INF/project-links.jsf.taglib.xml @@ -1,6 +1,6 @@ - - - + - + 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 6eab279b..668dc5ed 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,24 +1,35 @@ - + + + - + @@ -50,22 +61,40 @@ id="itemQuantity" value="#{adminReceiptItemController.itemQuantity}" required="true" + decimalPlaces="3" requiredMessage="#{project.ADMIN_RECEIPT_ITEM_QUANTITY_REQUIRED}" title="#{project.ENTER_RECEIPT_ITEM_QUANTITY_TITLE}" /> - - + + + + + - - + + + + + + + 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 7abedaea..bed85b7a 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 @@ -78,20 +78,15 @@ - - - - + - + - - diff --git a/web/admin/financial/receipt/admin_receipt_list.xhtml b/web/admin/financial/receipt/admin_receipt_list.xhtml index 93787826..6a521e30 100644 --- a/web/admin/financial/receipt/admin_receipt_list.xhtml +++ b/web/admin/financial/receipt/admin_receipt_list.xhtml @@ -69,12 +69,12 @@ - + - + - - + + - + - + - - + + diff --git a/web/admin/financial/receipt_item/admin_receipt_item_list.xhtml b/web/admin/financial/receipt_item/admin_receipt_item_list.xhtml index 78c3fd6d..bbc08f5c 100644 --- a/web/admin/financial/receipt_item/admin_receipt_item_list.xhtml +++ b/web/admin/financial/receipt_item/admin_receipt_item_list.xhtml @@ -1,13 +1,14 @@ - + @@ -70,7 +71,7 @@ - + @@ -91,7 +92,7 @@ - + -- 2.39.5