]> git.mxchange.org Git - jfinancials-war.git/commitdiff
Don' cherry-pick:
authorRoland Häder <roland@mxchange.org>
Sat, 24 Mar 2018 22:05:59 +0000 (23:05 +0100)
committerRoland Häder <roland@mxchange.org>
Sat, 24 Mar 2018 22:15:23 +0000 (23:15 +0100)
- 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

Signed-off-by: Roland Häder <roland@mxchange.org>
20 files changed:
src/java/org/mxchange/jfinancials/beans/financial/model/income/FinancialsIncomeWebRequestBean.java
src/java/org/mxchange/jfinancials/beans/financial/model/income/FinancialsIncomeWebRequestController.java
src/java/org/mxchange/jfinancials/beans/financial/model/receipt/FinancialAdminReceiptWebRequestBean.java
src/java/org/mxchange/jfinancials/beans/financial/model/receipt/FinancialAdminReceiptWebRequestController.java
src/java/org/mxchange/jfinancials/beans/financial/model/receipt/FinancialsReceiptWebRequestBean.java
src/java/org/mxchange/jfinancials/beans/financial/model/receipt/FinancialsReceiptWebRequestController.java
src/java/org/mxchange/jfinancials/beans/financial/model/receipt_item/FinancialAdminReceiptItemWebRequestBean.java
src/java/org/mxchange/jfinancials/beans/financial/model/receipt_item/FinancialAdminReceiptItemWebRequestController.java
src/java/org/mxchange/jfinancials/beans/financial/model/receipt_item/FinancialsReceiptItemWebRequestBean.java
src/java/org/mxchange/jfinancials/beans/financial/model/receipt_item/FinancialsReceiptItemWebRequestController.java
src/java/org/mxchange/jfinancials/converter/financial/receipt/FinancialsReceiptConverter.java
src/java/org/mxchange/localization/project_de_DE.properties
src/java/org/mxchange/localization/project_en_US.properties
web/WEB-INF/faces-config.xml
web/WEB-INF/project-links.jsf.taglib.xml
web/WEB-INF/templates/admin/financial/receipt/admin_form_financial_receipt.tpl
web/WEB-INF/templates/admin/financial/receipt_item/admin_form_financial_receipt_item.tpl
web/WEB-INF/templates/user/financial/receipt/login_form_financial_receipt.tpl
web/admin/financial/receipt/admin_receipt_list.xhtml
web/admin/financial/receipt_item/admin_receipt_item_list.xhtml

index 20c6795c53942ab56aaafab698d18d2dec06b0f6..c02bcf3b842ad19d23c0c15948004be9ec19d5d5 100644 (file)
@@ -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
+        * <p>
+        * @return Income intervals
+        */
        public List<FinancialInterval> allIncomeIntervals () {
                // Return list from enum values
                return Arrays.asList(FinancialInterval.values());
        }
 
-       @Override
+       /**
+        * Getter for income interval
+        * <p>
+        * @return Income interval
+        */
        public FinancialInterval getIncomeInterval () {
                return this.incomeInterval;
        }
 
-       @Override
+       /**
+        * Setter for income (type) interval
+        * <p>
+        * @param incomeInterval Income interval
+        */
        public void setIncomeInterval (final FinancialInterval incomeInterval) {
                this.incomeInterval = incomeInterval;
        }
 
-       @Override
-       public Float getIncomeSingleAmount () {
+       /**
+        * Getter for income single amount
+        * <p>
+        * @return Income single amount
+        */
+       public BigDecimal getIncomeSingleAmount () {
                return this.incomeSingleAmount;
        }
 
-       @Override
-       public void setIncomeSingleAmount (final Float incomeSingleAmount) {
+       /**
+        * Setter for income single amount
+        * <p>
+        * @param incomeSingleAmount Income single amount
+        */
+       public void setIncomeSingleAmount (final BigDecimal incomeSingleAmount) {
                this.incomeSingleAmount = incomeSingleAmount;
        }
 
-       @Override
+       /**
+        * Getter for income (type) title
+        * <p>
+        * @return Income title
+        */
        public String getIncomeTitle () {
                return this.incomeTitle;
        }
 
-       @Override
+       /**
+        * Setter for income (type) title
+        * <p>
+        * @param incomeTitle Income title
+        */
        public void setIncomeTitle (final String incomeTitle) {
                this.incomeTitle = incomeTitle;
        }
index e885949a118c0f753d5e82404746dbfdd271f9ce..179e02752f486b2b1895a5bad79b5f981afeefeb 100644 (file)
@@ -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
-        * <p>
-        * @return Income single amount
-        */
-       Float getIncomeSingleAmount ();
-
-       /**
-        * Setter for income single amount
-        * <p>
-        * @param incomeSingleAmount Income single amount
-        */
-       void setIncomeSingleAmount (final Float incomeSingleAmount);
-
-       /**
-        * Getter for income (type) title
-        * <p>
-        * @return Income title
-        */
-       String getIncomeTitle ();
-
-       /**
-        * Setter for income (type) title
-        * <p>
-        * @param incomeTitle Income title
-        */
-       void setIncomeTitle (final String incomeTitle);
-
-       /**
-        * Getter for income interval
-        * <p>
-        * @return Income interval
-        */
-       FinancialInterval getIncomeInterval ();
-
-       /**
-        * Setter for income (type) interval
-        * <p>
-        * @param incomeInterval Income interval
-        */
-       void setIncomeInterval (final FinancialInterval incomeInterval);
-
-       /**
-        * Returns a list of all all income intervals
-        * <p>
-        * @return Income intervals
-        */
-       List<FinancialInterval> allIncomeIntervals ();
-
 }
index d6a607733eff319f8fa43fd9201f496ea7cb0d1b..fa714108d22b7983d1425923a0b38cde3b4859e7 100644 (file)
@@ -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
         * <p>
         * @return Receipt number
         */
-       public Long getReceiptNumber () {
+       public String getReceiptNumber () {
                return this.receiptNumber;
        }
 
@@ -249,7 +249,7 @@ public class FinancialAdminReceiptWebRequestBean extends BaseFinancialsBean impl
         * <p>
         * @param receiptNumber Receipt number
         */
-       public void setReceiptNumber (final Long receiptNumber) {
+       public void setReceiptNumber (final String receiptNumber) {
                this.receiptNumber = receiptNumber;
        }
 
index 6ae4ff0dad611c26a7c132b9b3369e25131e27af..1a1094643fecc2ced9a92c8b94caf5a249e6f319 100644 (file)
@@ -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
index ce89849d4f7ec9832f24e84c8ee8b057eece09a2..dd67e95fd09d6b113cbc7b5c920c6e15dcc186a0 100644 (file)
@@ -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
         * <p>
         * @return Receipt number
         */
-       public Long getReceiptNumber () {
+       public String getReceiptNumber () {
                return this.receiptNumber;
        }
 
@@ -394,7 +394,7 @@ public class FinancialsReceiptWebRequestBean extends BaseFinancialsBean implemen
         * <p>
         * @param receiptNumber Receipt number
         */
-       public void setReceiptNumber (final Long receiptNumber) {
+       public void setReceiptNumber (final String receiptNumber) {
                this.receiptNumber = receiptNumber;
        }
 
index 43adb37663a587f2937b096c8ba2c58df76d51c5..23a7205181c38294a6a3cebfaca94968cf24882c 100644 (file)
@@ -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
index efa822b62ed1eb9b639db6bafa0911a51f3ec7c4..b114fafca34d59adf7cc497de1959b2155f76f56 100644 (file)
@@ -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
+        * <p>
+        * @return Item's coupon number
+        */
+       public String getItemCouponNumber () {
+               return this.itemCouponNumber;
+       }
+
+       /**
+        * Setter for item's coupon number
         * <p>
-        * @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
         * <p>
-        * @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
         * <p>
-        * @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
         * <p>
-        * @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
+        * <p>
+        * @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
+        * <p>
+        * @return Item's number
+        */
+       public Long getItemNumber () {
+               return this.itemNumber;
+       }
+
+       /**
+        * Setter for item's number
+        * <p>
+        * @param itemNumber Item's number
+        */
+       public void setItemNumber (final Long itemNumber) {
+               this.itemNumber = itemNumber;
+       }
+
        /**
         * Getter for assigned product
         * <p>
@@ -268,7 +315,7 @@ public class FinancialAdminReceiptItemWebRequestBean extends BaseFinancialsBean
         * <p>
         * @return Item quantity
         */
-       public Short getItemQuantity () {
+       public BigDecimal getItemQuantity () {
                return this.itemQuantity;
        }
 
@@ -277,7 +324,7 @@ public class FinancialAdminReceiptItemWebRequestBean extends BaseFinancialsBean
         * <p>
         * @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
         * <p>
         * @return Product's gross price
         */
-       public Float getProductGrossPrice () {
+       public BigDecimal getProductGrossPrice () {
                return this.productGrossPrice;
        }
 
@@ -331,7 +378,7 @@ public class FinancialAdminReceiptItemWebRequestBean extends BaseFinancialsBean
         * <p>
         * @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
         * <p>
         * @return Product's net price
         */
-       public Float getProductNetPrice () {
+       public BigDecimal getProductNetPrice () {
                return this.productNetPrice;
        }
 
@@ -349,7 +396,7 @@ public class FinancialAdminReceiptItemWebRequestBean extends BaseFinancialsBean
         * <p>
         * @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
         * <p>
         * @return Product's tax rate
         */
-       public Float getProductTaxRate () {
+       public BigDecimal getProductTaxRate () {
                return this.productTaxRate;
        }
 
@@ -367,7 +414,7 @@ public class FinancialAdminReceiptItemWebRequestBean extends BaseFinancialsBean
         * <p>
         * @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;
index db4a5e6a032f0f62904725db5859daf9b79dbdc9..e963e48a0af7d5ce473212ec4c198db128c38de6 100644 (file)
@@ -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
index 5456d7d058781d4de192850589bbfd2163f827a5..8bdb93a027e39f6a7d910344d61174916984ea6a 100644 (file)
@@ -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<BillableReceiptItem> filteredReceiptItems) {
+       public void setFilteredReceiptItems (final List<BillableReceiptItem> 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
index a6853be052318458ba01c8738410709a08904659..aaa3bb033ee2e2cf7a6079c6f2ff6e48469fd08c 100644 (file)
@@ -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
index 33d444d5a97e7d59e716c63a525c3fe5e1719c59..08a3c41d9546c8f9e334e5bbc40206fe25626723 100644 (file)
@@ -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
index 19aec46123c1a1b27aa9e4bc63812bcbff40b79b..4141704266f230adeb20bbaff9bb7a938423551c 100644 (file)
@@ -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"
index 7a1c7b8f7aefea2dfd74cdbfd4a9e4b88c08d9ef..d20bc35fe419c01e580de13749bf09583be9dc89 100644 (file)
@@ -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"
index c584425990d751d2ab2a79c0be3eec035e0d0226..e0ce1167953967dd28daf77ba26f5a2743011143 100644 (file)
                        <from-outcome>admin_assign_receipt_user</from-outcome>
                        <to-view-id>/admin/financial/receipt/admin_assign_receipt_user.xhtml</to-view-id>
                </navigation-case>
+               <navigation-case>
+                       <from-outcome>admin_show_user</from-outcome>
+                       <to-view-id>/admin/user/admin_user_show.xhtml</to-view-id>
+               </navigation-case>
+               <navigation-case>
+                       <from-outcome>admin_show_employee</from-outcome>
+                       <to-view-id>/admin/company_employee/admin_company_employee_show.xhtml</to-view-id>
+               </navigation-case>
+               <navigation-case>
+                       <from-outcome>admin_assign_receipt_seller</from-outcome>
+                       <to-view-id>/admin/financial/receipt/admin_assign_receipt_seller.xhtml</to-view-id>
+               </navigation-case>
        </navigation-rule>
        <navigation-rule>
                <from-view-id>/admin/financial/receipt_item/admin_receipt_item_list.xhtml</from-view-id>
index 87439f517f53f1d83466a19bc01a4c93aa496651..c1cb5658e3cda91668f193b13d1b7fe8c7be8278 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-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
index e21501e10d9250c16cd3f725ecce52adccabdd0e..ed14abc481ed0482422cc60842e006067c3576ef 100644 (file)
@@ -62,7 +62,7 @@
                                >
                                <f:converter converterId="EmployeeConverter" />
                                <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
-                               <f:selectItems value="#{employeeController.allEmployees()}" var="companyEmployee" itemValue="#{companyEmployee}" itemLabel="#{companyEmployee.employeeNumber} #{beanHelper.renderContact(companyEmployee.employeePersonalData)}" itemDescription="#{companyEmployee.employeeCompany.companyName}, #{beanHelper.renderBranchOffice(companyEmployee.employeeBranchOffice)}" />
+                               <f:selectItems value="#{employeeController.allEmployees()}" var="employee" itemValue="#{employee}" itemLabel="#{beanHelper.renderEmployee(employee)}" itemDescription="#{employee.employeeBasicData.companyName}, #{beanHelper.renderBranchOffice(employee.employeeBranchOffice)}" />
                        </p:selectOneMenu>
 
                        <p:outputLabel for="receiptUser" value="#{project.ADMIN_SELECT_RECEIPT_USER_OWNER}" />
                -->
                <p:panelGrid layout="grid" columns="2" columnClasses="ui-grid-col-4,ui-grid-col-8" styleClass="table table-full ui-noborder">
                        <p:outputLabel for="receiptNumber" value="#{project.ENTER_RECEIPT_NUMBER}" />
-                       <p:inputText id="receiptNumber" size="10" maxlength="20" value="#{adminReceiptController.receiptNumber}" validatorMessage="#{msg.ENTERED_RECEIPT_NUMBER_INVALID}">
-                               <f:validateLongRange minimum="1" maximum="9999999999" />
-                       </p:inputText>
+                       <p:inputText id="receiptNumber" size="10" maxlength="20" value="#{adminReceiptController.receiptNumber}" validatorMessage="#{project.ENTERED_RECEIPT_NUMBER_INVALID}" />
 
                        <p:outputLabel for="receiptRegisterNumber" value="#{project.ENTER_RECEIPT_REGISTER_NUMBER}" />
-                       <p:inputText id="receiptRegisterNumber" size="3" maxlength="10" value="#{adminReceiptController.receiptRegisterNumber}" validatorMessage="#{msg.ENTERED_RECEIPT_REGISTER_NUMBER_INVALID}">
+                       <p:inputText id="receiptRegisterNumber" size="3" maxlength="10" value="#{adminReceiptController.receiptRegisterNumber}" validatorMessage="#{project.ENTERED_RECEIPT_REGISTER_NUMBER_INVALID}">
                                <f:validateLongRange minimum="1" maximum="999" />
                        </p:inputText>
 
index 6eab279b90cabb31170fdeb7eb2c0aae2f93605d..668dc5ed9447b3a29a6e4562d9c67a1943d8ed94 100644 (file)
@@ -1,24 +1,35 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!--
 @TODO: title="#{project.ADMIN_RECEIPT_ITEM_LEGEND_TITLE}"
+@TODO: Hard-coded values
 -->
 <ui:composition
        xmlns="http://www.w3.org/1999/xhtml"
        xmlns:product="http://mxchange.org/jsf/jproduct/widgets"
        xmlns:f="http://xmlns.jcp.org/jsf/core"
-       xmlns:h="http://xmlns.jcp.org/jsf/html"
        xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
        xmlns:p="http://primefaces.org/ui">
 
        <p:fieldset legend="#{project.ADMIN_RECEIPT_ITEM_LEGEND}">
                <p:panelGrid layout="grid" columns="2" columnClasses="ui-grid-col-4,ui-grid-col-8" styleClass="table table-full ui-noborder">
                        <p:outputLabel for="itemBrandName" value="#{project.ENTER_RECEIPT_ITEM_BRAND_NAME}" />
-                       <p:inputNumber
+                       <p:inputText
                                id="itemBrandName"
+                               maxlength="255"
                                value="#{adminReceiptItemController.itemBrandName}"
                                title="#{project.ENTER_RECEIPT_ITEM_BRAND_NAME_TITLE}"
                                />
 
+                       <p:outputLabel for="itemNumber" value="#{project.ENTER_RECEIPT_ITEM_NUMBER}" />
+                       <p:inputNumber
+                               id="itemNumber"
+                               maxlength="20"
+                               decimalPlaces="0"
+                               thousandSeparator=","
+                               value="#{adminReceiptItemController.itemNumber}"
+                               title="#{project.ENTER_RECEIPT_ITEM_NUMBER_TITLE}"
+                               />
+
                        <p:outputLabel for="itemProduct" value="#{project.SELECT_RECEIPT_ITEM_PRODUCT}" />
                        <p:selectOneMenu
                                id="itemProduct"
@@ -41,7 +52,7 @@
                                filterMatchMode="contains"
                                >
                                <f:converter converterId="BasicCompanyDataConverter" />
-                               <f:selectItem itemValue="#{null}" itemLabel="#{msg.PLEASE_SELECT}" noSelectionOption="true" itemDisabled="true" />
+                               <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
                                <f:selectItems value="#{basicCompanyDataController.allBasicData()}" var="basicData" itemValue="#{basicData}" itemLabel="#{basicData.companyName}" />
                        </p:selectOneMenu>
 
                                id="itemQuantity"
                                value="#{adminReceiptItemController.itemQuantity}"
                                required="true"
+                               decimalPlaces="3"
                                requiredMessage="#{project.ADMIN_RECEIPT_ITEM_QUANTITY_REQUIRED}"
                                title="#{project.ENTER_RECEIPT_ITEM_QUANTITY_TITLE}"
                                />
 
-                       <p:outputLabel for="itemDiscountPercent" value="#{project.ENTER_RECEIPT_ITEM_DISCOUNT_PERCENT}" />
-                       <p:inputNumber
-                               id="itemDiscountPercent"
-                               value="#{adminReceiptItemController.itemDiscountPercent}"
-                               title="#{project.ENTER_RECEIPT_ITEM_DISCOUNT_PERCENT_TITLE}"
-                               />
+                       <p:outputLabel for="itemIsRefund" value="#{project.CHOOSE_RECEIPT_ITEM_IS_A_REFUND}" title="#{project.CHOOSE_RECEIPT_ITEM_IS_A_REFUND_TITLE}" />
+                       <p:selectOneRadio
+                               id="itemIsRefund"
+                               value="#{adminReceiptItemController.itemIsRefund}"
+                               required="true"
+                               requiredMessage="#{project.CHOOSE_RECEIPT_ITEM_IS_A_REFUND_REQUIRED}"
+                               >
+                               <f:selectItem itemValue="#{false}" itemLabel="#{msg.CHOICE_NO}" />
+                               <f:selectItem itemValue="#{true}" itemLabel="#{msg.CHOICE_YES}" />
+                       </p:selectOneRadio>
 
-                       <p:outputLabel for="itemDiscountFixed" value="#{project.ENTER_RECEIPT_ITEM_DISCOUNT_FIXED}" />
-                       <p:inputNumber
-                               id="itemDiscountFixed"
-                               value="#{adminReceiptItemController.itemDiscountPercent}"
-                               title="#{project.ENTER_RECEIPT_ITEM_DISCOUNT_FIXED_TITLE}"
+                       <p:outputLabel for="itemIsDiscount" value="#{project.CHOOSE_RECEIPT_ITEM_IS_A_DISCOUNT}" title="#{project.CHOOSE_RECEIPT_ITEM_IS_A_DISCOUNT_TITLE}" />
+                       <p:selectOneRadio
+                               id="itemIsDiscount"
+                               value="#{adminReceiptItemController.itemIsDiscount}"
+                               required="true"
+                               requiredMessage="#{project.CHOOSE_RECEIPT_ITEM_IS_A_DISCOUNT_REQUIRED}"
+                               >
+                               <f:selectItem itemValue="#{false}" itemLabel="#{msg.CHOICE_NO}" />
+                               <f:selectItem itemValue="#{true}" itemLabel="#{msg.CHOICE_YES}" />
+                       </p:selectOneRadio>
+
+                       <p:outputLabel for="itemCouponNumber" value="#{project.ENTER_RECEIPT_ITEM_COUPON_NUMBER}" />
+                       <p:inputText
+                               id="itemCouponNumber"
+                               size="10"
+                               maxlength="255"
+                               value="#{adminReceiptItemController.itemCouponNumber}"
+                               title="#{project.ENTER_RECEIPT_ITEM_COUPON_NUMBER_TITLE}"
                                />
 
                        <p:outputLabel for="itemReceipt" value="#{project.SELECT_ITEM_RECEIPT}" />
index 7abedaeac8ea1e0ec0b54f286e60a8f4aed3b13c..bed85b7aac844acb44b5d7d16913ca95ecdfd2dc 100644 (file)
 
                <p:panelGrid layout="grid" columns="2" columnClasses="ui-grid-col-4,ui-grid-col-8" styleClass="table table-full">
                        <p:outputLabel for="receiptNumber" value="#{project.RECEIPT_NUMBER}" />
-                       <p:inputText id="receiptNumber" size="10" maxlength="20" value="#{receiptController.receiptNumber}" validatorMessage="#{msg.ENTERED_RECEIPT_NUMBER_INVALID}">
-                               <f:validateLongRange minimum="1" maximum="9999999999" />
-                       </p:inputText>
-                       <p:message for="receiptNumber" />
+                       <p:inputText id="receiptNumber" size="10" maxlength="20" value="#{receiptController.receiptNumber}" validatorMessage="#{project.ENTERED_RECEIPT_NUMBER_INVALID}" />
 
                        <p:outputLabel for="receiptRegisterNumber" value="#{project.RECEIPT_REGISTER_NUMBER}" />
-                       <p:inputText id="receiptRegisterNumber" size="3" maxlength="10" value="#{receiptController.receiptRegisterNumber}" validatorMessage="#{msg.ENTERED_RECEIPT_REGISTER_NUMBER_INVALID}">
+                       <p:inputText id="receiptRegisterNumber" size="3" maxlength="10" value="#{receiptController.receiptRegisterNumber}" validatorMessage="#{project.ENTERED_RECEIPT_REGISTER_NUMBER_INVALID}">
                                <f:validateLongRange minimum="1" maximum="999" />
                        </p:inputText>
-                       <p:message for="receiptRegisterNumber" />
 
                        <p:outputLabel for="receiptBarCodeNumber" value="#{project.RECEIPT_BARCODE_NUMBER}" />
                        <p:inputText id="receiptBarCodeNumber" size="24" maxlength="24" value="#{receiptController.receiptBarCodeNumber}" />
-                       <p:message for="receiptBarCodeNumber" />
                </p:panelGrid>
        </fieldset>
 </ui:composition>
index 937878267211baae0bb7aaacb56d176c0cd5aa94..6a521e30a6b2f6d983ec32f2369938570e661a33 100644 (file)
                                                </p:selectCheckboxMenu>
                                        </f:facet>
 
-                                       <p:link outcome="admin_show_branch_office" title="#{msg.ADMIN_LINK_SHOW_BRANCH_OFFICE_TITLE}" value="#{receipt.receiptBranchOffice.branchId}">
+                                       <p:link outcome="admin_show_branch_office" title="#{msg.ADMIN_LINK_SHOW_BRANCH_OFFICE_TITLE}" value="#{beanHelper.renderBranchOffice(receipt.receiptBranchOffice)}">
                                                <f:param name="branchId" value="#{receipt.receiptBranchOffice.branchId}" />
                                        </p:link>
                                </p:column>
 
-                               <p:column headerText="#{project.ADMIN_ASSIGNED_RECEIPT_SELLER}" sortBy="#{receipt.receiptUser.userName}" filterBy="#{receipt.receiptUser}" filterMatchMode="in">
+                               <p:column headerText="#{project.ADMIN_ASSIGNED_RECEIPT_SELLER}" sortBy="#{receipt.receiptUser}" filterBy="#{receipt.receiptUser}" filterMatchMode="in">
                                        <f:facet name="filter">
                                                <p:selectCheckboxMenu
                                                        filter="true"
                                                </p:selectCheckboxMenu>
                                        </f:facet>
 
-                                       <p:link outcome="admin_show_user" title="#{msg.ADMIN_LINK_SHOW_RECEIPT_OWNER_RECEIPT_SELLER_TITLE}" value="#{receipt.receiptUser.userId}" rendered="#{not empty receipt.receiptUser}">
-                                               <f:param name="userId" value="#{receipt.receiptUser.userId}" />
+                                       <p:link outcome="admin_show_employee" title="#{msg.ADMIN_LINK_SHOW_RECEIPT_SELLER_EMPLOYEE_TITLE}" value="#{beanHelper.renderEmployee(receipt.receiptSellerEmployee)}" rendered="#{not empty receipt.receiptSellerEmployee}">
+                                               <f:param name="userId" value="#{receipt.receiptSellerEmployee.employeeId}" />
                                        </p:link>
 
-                                       <p:link outcome="admin_assign_receipt_user" title="#{msg.ADMIN_LINK_ASSIGN_RECEIPT_OWNER_RECEIPT_SELLER_TITLE}" value="#{msg.ADMIN_LINK_ASSIGN}" rendered="#{empty receipt.receiptUser}">
+                                       <p:link outcome="admin_assign_receipt_seller" title="#{msg.ADMIN_LINK_ASSIGN_RECEIPT_SELLER_EMPLOYEE_TITLE}" value="#{msg.ADMIN_LINK_ASSIGN}" rendered="#{empty receipt.receiptSellerEmployee}">
                                                <f:param name="receiptId" value="#{receipt.receiptId}" />
                                        </p:link>
                                </p:column>
 
-                               <p:column headerText="#{msg.ADMIN_HEADER_ASSIGNED_USER}" sortBy="#{receipt.receiptUser.userName}" filterBy="#{receipt.receiptUser}" filterMatchMode="in">
+                               <p:column headerText="#{msg.ADMIN_HEADER_ASSIGNED_USER}" sortBy="#{receipt.receiptUser}" filterBy="#{receipt.receiptUser}" filterMatchMode="in">
                                        <f:facet name="filter">
                                                <p:selectCheckboxMenu
                                                        filter="true"
                                                        title="#{msg.FILTER_BY_MULTIPLE_PAYMENT_TYPES_TITLE}"
                                                        >
                                                        <f:converter converterId="PaymentTypeConverter" />
-                                                       <f:selectItem itemValue="#{null}" itemLabel="#{msg.PLEASE_SELECT}" noSelectionOption="true" itemDisabled="true" />
-                                                       <f:selectItems value="#{dataController.paymentTypes}" var="receiptPaymentType" itemValue="#{paymentType}" itemLabel="#{msg[paymentType.i18nKey]}" />
+                                                       <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
+                                                       <f:selectItems value="#{dataController.paymentTypes}" var="paymentType" itemValue="#{paymentType}" itemLabel="#{msg[paymentType.i18nKey]}" />
                                                </p:selectOneMenu>
                                        </f:facet>
 
index 78c3fd6db0e7eb3c42c7fefd6129ec32d5518828..bbc08f5c51c1e051f93800eb0da837a6a606a187 100644 (file)
@@ -1,13 +1,14 @@
 <?xml version="1.0" encoding="UTF-8" ?>
-<ui:composition template="/WEB-INF/templates/admin/admin_base.tpl"
-                               xmlns="http://www.w3.org/1999/xhtml"
-                               xmlns:core="http://mxchange.org/jsf/core/widgets"
-                               xmlns:pl="http://mxchange.org/jsf/jfinancials/links"
-                               xmlns:links="http://mxchange.org/jsf/core/links"
-                               xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
-                               xmlns:h="http://xmlns.jcp.org/jsf/html"
-                               xmlns:f="http://xmlns.jcp.org/jsf/core"
-                               xmlns:p="http://primefaces.org/ui">
+<ui:composition
+       template="/WEB-INF/templates/admin/admin_base.tpl"
+       xmlns="http://www.w3.org/1999/xhtml"
+       xmlns:core="http://mxchange.org/jsf/core/widgets"
+       xmlns:pl="http://mxchange.org/jsf/jfinancials/links"
+       xmlns:links="http://mxchange.org/jsf/core/links"
+       xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
+       xmlns:h="http://xmlns.jcp.org/jsf/html"
+       xmlns:f="http://xmlns.jcp.org/jsf/core"
+       xmlns:p="http://primefaces.org/ui">
 
        <ui:define name="document_admin_title">
                <h:outputText value="#{project.PAGE_TITLE_ADMIN_FINANCIALS_RECEIPT_ITEM_LIST}" />
@@ -70,7 +71,7 @@
                                                </p:selectCheckboxMenu>
                                        </f:facet>
 
-                                       <p:link outcome="admin_show_receipt" title="#{msg.ADMIN_LINK_SHOW_RECEIPT_TITLE}" value="#{beanHelper.renderReceipt(receiptItem.itemReceipt)}">
+                                       <p:link outcome="admin_show_receipt" title="#{project.ADMIN_LINK_SHOW_RECEIPT_TITLE}" value="#{beanHelper.renderReceipt(receiptItem.itemReceipt)}">
                                                <f:param name="receiptId" value="#{receiptItem.itemReceipt.receiptId}" />
                                        </p:link>
                                </p:column>
@@ -91,7 +92,7 @@
                                                </p:selectCheckboxMenu>
                                        </f:facet>
 
-                                       <p:link outcome="admin_show_generic_product" title="#{msg.ADMIN_LINK_SHOW_RECEIPT_ITEM_PRODUCT_TITLE}" value="#{beanHelper.renderGenericProduct(receiptItem.itemProduct)}">
+                                       <p:link outcome="admin_show_generic_product" title="#{project.ADMIN_LINK_SHOW_RECEIPT_ITEM_PRODUCT_TITLE}" value="#{beanHelper.renderGenericProduct(receiptItem.itemProduct)}">
                                                <f:param name="productId" value="#{receiptItem.itemProduct.productId}" />
                                        </p:link>
                                </p:column>