]> git.mxchange.org Git - jfinancials-war.git/commitdiff
Don't cherry-pick:
authorRoland Häder <roland@mxchange.org>
Tue, 17 Oct 2017 21:50:54 +0000 (23:50 +0200)
committerRoland Häder <roland@mxchange.org>
Tue, 17 Oct 2017 21:50:54 +0000 (23:50 +0200)
- switched converters/validators which are converting primary keys (id numbers)
  into entities from EJB-based lookup to backing-bean-based lookup as this is
  much better performing (EJB calls are relative "expensive")
- the backing bean will then check cache which is basically a distributed Map
  (Cache interface) where the primary key is also the key for cache entries
- a SomeEntityNotFoundException is being thrown when containsKey() returns
  false which is then caught by the calling method
- fixed imports from "renaming season" ;-)
- added missing JSF tag template admin_receipt_item_links.tpl
- added converter for receipt, generic product and product category
- receipts/receipt items will always (?) be jfinancials ;-)
- some messages needed to be switch msg -> project as they are project-specific

Signed-off-by: Roland Häder <roland@mxchange.org>
24 files changed:
src/java/org/mxchange/jfinancials/beans/category/FinancialAdminCategoryWebRequestBean.java
src/java/org/mxchange/jfinancials/beans/category/FinancialCategoryWebRequestBean.java
src/java/org/mxchange/jfinancials/beans/category/FinancialCategoryWebRequestController.java
src/java/org/mxchange/jfinancials/beans/financial/model/receipt/FinancialAdminReceiptWebRequestBean.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/product/FinancialAdminProductWebRequestBean.java
src/java/org/mxchange/jfinancials/beans/product/FinancialProductWebRequestBean.java
src/java/org/mxchange/jfinancials/beans/product/FinancialProductWebRequestController.java
src/java/org/mxchange/jfinancials/converter/financial/receipt/FinancialsReceiptConverter.java [new file with mode: 0644]
src/java/org/mxchange/jfinancials/converter/generic_product/FinancialsGenericProductConverter.java [new file with mode: 0644]
src/java/org/mxchange/jfinancials/converter/product_category/FinancialsProductCategoryConverter.java [new file with mode: 0644]
src/java/org/mxchange/localization/project_de_DE.properties
src/java/org/mxchange/localization/project_en_US.properties
web/WEB-INF/resources/tags/admin/links/mini/financial/receipt/admin_receipt_links.tpl
web/WEB-INF/resources/tags/admin/links/mini/financial/receipt_item/admin_receipt_item_links.tpl [new file with mode: 0644]
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/admin/menu/project.tpl
web/WEB-INF/templates/user/financial/receipt/login_form_financial_receipt.tpl
web/admin/financials/receipt_items/admin_receipt_item_list.xhtml
web/admin/financials/receipts/admin_receipt_list.xhtml
web/user/financials/login_financials_add_receipt.xhtml

index 3725f6707dddc779a899a1a6ce4a901252a1ff06..8acb6c5261bfdcae16228e487c6dc243ec856138 100644 (file)
@@ -26,8 +26,7 @@ import javax.inject.Named;
 import org.mxchange.jfinancials.beans.BaseFinancialsBean;
 import org.mxchange.jproduct.events.category.AddedCategoryEvent;
 import org.mxchange.jproduct.events.category.CategoryAddedEvent;
-import org.mxchange.jproduct.exceptions.CannotAddCategoryException;
-import org.mxchange.jproduct.exceptions.CategoryTitleAlreadyUsedException;
+import org.mxchange.jproduct.exceptions.category.CategoryAlreadyAddedException;
 import org.mxchange.jproduct.model.category.AdminCategorySessionBeanRemote;
 import org.mxchange.jproduct.model.category.Category;
 import org.mxchange.jproduct.model.category.ProductCategory;
@@ -100,7 +99,7 @@ public class FinancialAdminCategoryWebRequestBean extends BaseFinancialsBean imp
 
                        // Unset all older values
                        this.clear();
-               } catch (final CategoryTitleAlreadyUsedException | CannotAddCategoryException ex) {
+               } catch (final CategoryAlreadyAddedException ex) {
                        // Continue to throw
                        throw new FaceletException(ex);
                }
index bf1f9615b6a7fa606039269e780dfd2da2e9d8a5..506e99b83a6841f5e85100aa4c4d6da41b05e4b3 100644 (file)
@@ -30,6 +30,7 @@ import javax.inject.Inject;
 import javax.inject.Named;
 import org.mxchange.jfinancials.beans.BaseFinancialsBean;
 import org.mxchange.jproduct.events.category.AddedCategoryEvent;
+import org.mxchange.jproduct.exceptions.category.CategoryNotFoundException;
 import org.mxchange.jproduct.model.category.Category;
 import org.mxchange.jproduct.model.category.CategorySessionBeanRemote;
 
@@ -101,6 +102,27 @@ public class FinancialCategoryWebRequestBean extends BaseFinancialsBean implemen
                return this.allCategories;
        }
 
+       @Override
+       public Category findCategoryById (final Long categoryId) throws CategoryNotFoundException {
+               // Validate parameter
+               if (null == categoryId) {
+                       // Throw NPE
+                       throw new NullPointerException("categoryId is null"); //NOI18N
+               } else if (categoryId < 1) {
+                       // Throw IAE
+                       throw new IllegalArgumentException("categoryId=" + categoryId + " is invalid"); //NOI18N
+               } else if (!this.categoryCache.containsKey(categoryId)) {
+                       // Not found
+                       throw new CategoryNotFoundException(categoryId);
+               }
+
+               // Get it from cache
+               final Category category = this.categoryCache.get(categoryId);
+
+               // Return it
+               return category;
+       }
+
        /**
         * Initialization of this bean
         */
index ac32de13b1f94ec37d1abd884002ae607ad7ef13..c8caa54e0492024e0d6a6c2f91278c159217c889 100644 (file)
@@ -17,6 +17,8 @@
 package org.mxchange.jfinancials.beans.category;
 
 import java.io.Serializable;
+import org.mxchange.jproduct.exceptions.category.CategoryNotFoundException;
+import org.mxchange.jproduct.model.category.Category;
 
 /**
  * An interface for (product) categories
@@ -25,4 +27,17 @@ import java.io.Serializable;
  */
 public interface FinancialCategoryWebRequestController extends Serializable {
 
+       /**
+        * Returns a category instance (entity) for given primary key. If not found,
+        * a proper exception is thrown.
+        * <p>
+        * @param categoryId Category id (primary key)
+        * <p>
+        * @return Category entity matching to primary key
+        * <p>
+        * @throws CategoryNotFoundException If a category with given primary key
+        * could not be found
+        */
+       Category findCategoryById (final Long categoryId) throws CategoryNotFoundException;
+
 }
index c16267223650c859da6af8789799ea6f01e08c2c..fc178db0f916139ad4b59b7f865c28fdfb89453a 100644 (file)
@@ -26,7 +26,6 @@ import javax.faces.view.facelets.FaceletException;
 import javax.inject.Inject;
 import javax.inject.Named;
 import org.mxchange.jcontactsbusiness.model.branchoffice.BranchOffice;
-import org.mxchange.jcontactsbusiness.model.employee.Employee;
 import org.mxchange.jfinancials.beans.BaseFinancialsBean;
 import org.mxchange.jfinancials.events.receipt.added.ObservableReceiptAddedEvent;
 import org.mxchange.jfinancials.events.receipt.added.ReceiptAddedEvent;
@@ -36,6 +35,7 @@ import org.mxchange.jfinancials.model.receipt.FinancialAdminReceiptSessionBeanRe
 import org.mxchange.jfinancials.model.receipt.FinancialReceipt;
 import org.mxchange.jproduct.model.payment.PaymentType;
 import org.mxchange.jusercore.model.user.User;
+import org.mxchange.jcontactsbusiness.model.employee.Employable;
 
 /**
  * An administrative backing bean for receipts
@@ -103,7 +103,7 @@ public class FinancialAdminReceiptWebRequestBean extends BaseFinancialsBean impl
        /**
         * Selling employee
         */
-       private Employee receiptSellerEmployee;
+       private Employable receiptSellerEmployee;
 
        /**
         * User who "owns" this receipt
@@ -289,7 +289,7 @@ public class FinancialAdminReceiptWebRequestBean extends BaseFinancialsBean impl
         * <p>
         * @return Receipt seller employee
         */
-       public Employee getReceiptSellerEmployee () {
+       public Employable getReceiptSellerEmployee () {
                return this.receiptSellerEmployee;
        }
 
@@ -298,7 +298,7 @@ public class FinancialAdminReceiptWebRequestBean extends BaseFinancialsBean impl
         * <p>
         * @param receiptSellerEmployee Receipt seller employee
         */
-       public void setReceiptSellerEmployee (final Employee receiptSellerEmployee) {
+       public void setReceiptSellerEmployee (final Employable receiptSellerEmployee) {
                this.receiptSellerEmployee = receiptSellerEmployee;
        }
 
index 9ff56943943aaa982d5b0e99501ed0304147be6a..1ee5fbda4714049770ba1d3b7850a79340f413bb 100644 (file)
@@ -35,12 +35,13 @@ import javax.faces.view.facelets.FaceletException;
 import javax.inject.Inject;
 import javax.inject.Named;
 import org.mxchange.jcontactsbusiness.model.branchoffice.BranchOffice;
-import org.mxchange.jcontactsbusiness.model.employee.Employee;
+import org.mxchange.jcontactsbusiness.model.employee.Employable;
 import org.mxchange.jfinancials.beans.BaseFinancialsBean;
 import org.mxchange.jfinancials.beans.user.login.FinancialsUserLoginWebSessionController;
 import org.mxchange.jfinancials.events.receipt.added.ObservableReceiptAddedEvent;
 import org.mxchange.jfinancials.events.receipt.added.ReceiptAddedEvent;
 import org.mxchange.jfinancials.exceptions.receipt.ReceiptAlreadyAddedException;
+import org.mxchange.jfinancials.exceptions.receipt.ReceiptNotFoundException;
 import org.mxchange.jfinancials.model.receipt.BillableReceipt;
 import org.mxchange.jfinancials.model.receipt.FinancialReceipt;
 import org.mxchange.jfinancials.model.receipt.FinancialReceiptSessionBeanRemote;
@@ -124,7 +125,7 @@ public class FinancialsReceiptWebRequestBean extends BaseFinancialsBean implemen
        /**
         * Selling employee
         */
-       private Employee receiptSellerEmployee;
+       private Employable receiptSellerEmployee;
 
        /**
         * User instance
@@ -282,6 +283,27 @@ public class FinancialsReceiptWebRequestBean extends BaseFinancialsBean implemen
                return this.allReceipts;
        }
 
+       @Override
+       public BillableReceipt findReceiptById (final Long receiptId) throws ReceiptNotFoundException {
+               // Validate parameter
+               if (null == receiptId) {
+                       // Throw NPE
+                       throw new NullPointerException("receiptId is null"); //NOI18N
+               } else if (receiptId < 1) {
+                       // Throw IAE
+                       throw new IllegalArgumentException("receiptId=" + receiptId + " is invalid."); //NOI18N
+               } else if (!this.receiptCache.containsKey(receiptId)) {
+                       // Not found
+                       throw new ReceiptNotFoundException(receiptId);
+               }
+
+               // Get it from cache
+               final BillableReceipt receipt = this.receiptCache.get(receiptId);
+
+               // Return it
+               return receipt;
+       }
+
        /**
         * Getter for filtered receipts
         * <p>
@@ -417,7 +439,7 @@ public class FinancialsReceiptWebRequestBean extends BaseFinancialsBean implemen
         * <p>
         * @return Receipt seller employee
         */
-       public Employee getReceiptSellerEmployee () {
+       public Employable getReceiptSellerEmployee () {
                return this.receiptSellerEmployee;
        }
 
@@ -426,7 +448,7 @@ public class FinancialsReceiptWebRequestBean extends BaseFinancialsBean implemen
         * <p>
         * @param receiptSellerEmployee Receipt seller employee
         */
-       public void setReceiptSellerEmployee (final Employee receiptSellerEmployee) {
+       public void setReceiptSellerEmployee (final Employable receiptSellerEmployee) {
                this.receiptSellerEmployee = receiptSellerEmployee;
        }
 
index a79d5549adb3e50e19110d082cd97fd31317e968..43adb37663a587f2937b096c8ba2c58df76d51c5 100644 (file)
@@ -17,6 +17,7 @@
 package org.mxchange.jfinancials.beans.financial.model.receipt;
 
 import java.io.Serializable;
+import org.mxchange.jfinancials.exceptions.receipt.ReceiptNotFoundException;
 import org.mxchange.jfinancials.model.receipt.BillableReceipt;
 
 /**
@@ -26,6 +27,19 @@ import org.mxchange.jfinancials.model.receipt.BillableReceipt;
  */
 public interface FinancialsReceiptWebRequestController extends Serializable {
 
+       /**
+        * Returns a receipt instance (entity) for given primary key. If not found,
+        * a proper exception is thrown.
+        * <p>
+        * @param receiptId Receipt id (primary key)
+        * <p>
+        * @return Receipt entity matching to primary key
+        * <p>
+        * @throws ReceiptNotFoundException If a receipt with given primary key
+        * could not be found
+        */
+       BillableReceipt findReceiptById (final Long receiptId) throws ReceiptNotFoundException;
+
        /**
         * Checks if receipt has already been added to database
         * <p>
index df8336da5de48786e72bd9f7fea2500319a4d396..9c8af28c865298d1066b3729d5f53e8e50162f6b 100644 (file)
@@ -28,9 +28,11 @@ import org.mxchange.jfinancials.beans.BaseFinancialsBean;
 import org.mxchange.jfinancials.events.receipt_item.added.ObservableReceiptItemAddedEvent;
 import org.mxchange.jfinancials.events.receipt_item.added.ReceiptItemAddedEvent;
 import org.mxchange.jfinancials.exceptions.receipt_item.ReceiptItemAlreadyAddedException;
+import org.mxchange.jfinancials.model.receipt.BillableReceipt;
 import org.mxchange.jfinancials.model.receipt.item.BillableReceiptItem;
 import org.mxchange.jfinancials.model.receipt.item.FinancialReceiptItem;
 import org.mxchange.jfinancials.model.receipt_item.FinancialAdminReceiptItemSessionBeanRemote;
+import org.mxchange.jproduct.model.product.Product;
 
 /**
  * An administrative backing bean for receipt items
@@ -59,6 +61,26 @@ public class FinancialAdminReceiptItemWebRequestBean extends BaseFinancialsBean
        @EJB (lookup = "java:global/jfinancials-ejb/adminFinancialReceiptItem!org.mxchange.jfinancials.model.receipt.item.FinancialAdminReceiptItemSessionBeanRemote")
        private FinancialAdminReceiptItemSessionBeanRemote adminReceiptItemBean;
 
+       /**
+        * Discount on product price (if any) Valid: values 0...1 (1=100% discount)
+        */
+       private Float itemDiscount;
+
+       /**
+        * Item product
+        */
+       private Product itemProduct;
+
+       /**
+        * Quantity of item
+        */
+       private Long itemQuantity;
+
+       /**
+        * Assigned receipt
+        */
+       private BillableReceipt itemReceipt;
+
        /**
         * General receipt item controller
         */
@@ -114,11 +136,87 @@ public class FinancialAdminReceiptItemWebRequestBean extends BaseFinancialsBean
                return "add_receipt_item?faces-redirect=true"; //NOI18N
        }
 
+       /**
+        * Getter for item discount
+        * <p>
+        * @return Item discount
+        */
+       public Float getItemDiscount () {
+               return this.itemDiscount;
+       }
+
+       /**
+        * Setter for item discount
+        * <p>
+        * @param itemDiscount Item discount
+        */
+       public void setItemDiscount (final Float itemDiscount) {
+               this.itemDiscount = itemDiscount;
+       }
+
+       /**
+        * Getter for assigned product
+        * <p>
+        * @return Assigned product
+        */
+       public Product getItemProduct () {
+               return this.itemProduct;
+       }
+
+       /**
+        * Setter for assigned product
+        * <p>
+        * @param itemProduct Assigned product
+        */
+       public void setItemProduct (final Product itemProduct) {
+               this.itemProduct = itemProduct;
+       }
+
+       /**
+        * Getter for item quantity
+        * <p>
+        * @return Item quantity
+        */
+       public Long getItemQuantity () {
+               return this.itemQuantity;
+       }
+
+       /**
+        * Setter for item quantity
+        * <p>
+        * @param itemQuantity Item quantity
+        */
+       public void setItemQuantity (final Long itemQuantity) {
+               this.itemQuantity = itemQuantity;
+       }
+
+       /**
+        * Getter for assigned receipt
+        * <p>
+        * @return Assigned receipt
+        */
+       public BillableReceipt getItemReceipt () {
+               return this.itemReceipt;
+       }
+
+       /**
+        * Setter for assigned receipt
+        * <p>
+        * @param itemReceipt Assigned receipt
+        */
+       public void setItemReceipt (final BillableReceipt itemReceipt) {
+               this.itemReceipt = itemReceipt;
+       }
+
        /**
         * Clears this bean
         */
        private void clear () {
                // Clear all fields
+               this.setItemDiscount(null);
+               this.setItemProduct(null);
+               this.setItemQuantity(null);
+               this.setItemReceipt(null);
        }
 
        /**
@@ -128,9 +226,10 @@ public class FinancialAdminReceiptItemWebRequestBean extends BaseFinancialsBean
         */
        private BillableReceiptItem createReceiptItemInstance () {
                // Create new instance with minimum required data
-               final BillableReceiptItem receiptItem = new FinancialReceiptItem();
+               final BillableReceiptItem receiptItem = new FinancialReceiptItem(this.getItemProduct(), this.getItemQuantity(), this.getItemReceipt());
 
                // Set optional data
+               receiptItem.setItemProductDiscount(this.getItemDiscount());
 
                // Return prepared instance
                return receiptItem;
index 055aa89f5d3d7cfcf8575bf1e54545e5e7bb77cb..f22a312ef2bcb8a80e50f747bdc12ecce8b28424 100644 (file)
@@ -26,8 +26,7 @@ import javax.inject.Named;
 import org.mxchange.jfinancials.beans.BaseFinancialsBean;
 import org.mxchange.jproduct.events.product.AddedProductEvent;
 import org.mxchange.jproduct.events.product.ProductAddedEvent;
-import org.mxchange.jproduct.exceptions.CannotAddProductException;
-import org.mxchange.jproduct.exceptions.ProductTitleAlreadyUsedException;
+import org.mxchange.jproduct.exceptions.product.ProductAlreadyAddedException;
 import org.mxchange.jproduct.model.category.Category;
 import org.mxchange.jproduct.model.product.AdminProductSessionBeanRemote;
 import org.mxchange.jproduct.model.product.GenericProduct;
@@ -113,7 +112,7 @@ public class FinancialAdminProductWebRequestBean extends BaseFinancialsBean impl
 
                        // Set all to null
                        this.clear();
-               } catch (final ProductTitleAlreadyUsedException | CannotAddProductException ex) {
+               } catch (final ProductAlreadyAddedException ex) {
                        // Continue to throw
                        throw new FaceletException(ex);
                }
index e3553dc0c69c4cceb21315f685de03577d236115..9d9fb5322a4c7fd0c3e30644d9d9c8783e7f990d 100644 (file)
@@ -31,6 +31,7 @@ import javax.inject.Inject;
 import javax.inject.Named;
 import org.mxchange.jfinancials.beans.BaseFinancialsBean;
 import org.mxchange.jproduct.events.product.AddedProductEvent;
+import org.mxchange.jproduct.exceptions.product.ProductNotFoundException;
 import org.mxchange.jproduct.model.product.Product;
 import org.mxchange.jproduct.model.product.ProductSessionBeanRemote;
 
@@ -103,6 +104,27 @@ public class FinancialProductWebRequestBean extends BaseFinancialsBean implement
                return this.allProducts;
        }
 
+       @Override
+       public Product findProductById (final Long productId) throws ProductNotFoundException {
+               // Validate parameter
+               if (null == productId) {
+                       // Throw NPE
+                       throw new NullPointerException("productId is null"); //NOI18N
+               } else if (productId < 1) {
+                       // Throw IAE
+                       throw new IllegalArgumentException("productId=" + productId + " is invalid"); //NOI18N
+               } else if (!this.productCache.containsKey(productId)) {
+                       // Not found
+                       throw new ProductNotFoundException(productId);
+               }
+
+               // Get it from cache
+               final Product product = this.productCache.get(productId);
+
+               // Return it
+               return product;
+       }
+
        /**
         * Initialization of this bean
         */
index 7aff530145965a69d6774a230e8e85a41e3174fb..8543d3c1223c45c9e7624d8f8b6bd3b79bb08b54 100644 (file)
@@ -20,6 +20,7 @@ import java.io.Serializable;
 import java.util.List;
 import javax.ejb.Local;
 import javax.faces.view.facelets.FaceletException;
+import org.mxchange.jproduct.exceptions.product.ProductNotFoundException;
 import org.mxchange.jproduct.model.product.Product;
 
 /**
@@ -39,4 +40,17 @@ public interface FinancialProductWebRequestController extends Serializable {
         */
        List<Product> allProducts () throws FaceletException;
 
+       /**
+        * Returns a product instance (entity) for given primary key. If not found,
+        * a proper exception is thrown.
+        * <p>
+        * @param productId Product id (primary key)
+        * <p>
+        * @return Product entity matching to primary key
+        * <p>
+        * @throws ProductNotFoundException If a product with given primary key
+        * could not be found
+        */
+       Product findProductById (final Long productId) throws ProductNotFoundException;
+
 }
diff --git a/src/java/org/mxchange/jfinancials/converter/financial/receipt/FinancialsReceiptConverter.java b/src/java/org/mxchange/jfinancials/converter/financial/receipt/FinancialsReceiptConverter.java
new file mode 100644 (file)
index 0000000..157edb8
--- /dev/null
@@ -0,0 +1,103 @@
+/*
+ * Copyright (C) 2016, 2017 Roland Häder
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package org.mxchange.jfinancials.converter.financial.receipt;
+
+import javax.faces.application.FacesMessage;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.convert.Converter;
+import javax.faces.convert.ConverterException;
+import javax.faces.convert.FacesConverter;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import org.mxchange.jfinancials.beans.financial.model.receipt.FinancialsReceiptWebRequestController;
+import org.mxchange.jfinancials.exceptions.receipt.ReceiptNotFoundException;
+import org.mxchange.jfinancials.model.receipt.BillableReceipt;
+
+/**
+ * Converter for category id <-> valid category instance
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+@FacesConverter ("ReceiptConverter")
+public class FinancialsReceiptConverter implements Converter<BillableReceipt> {
+
+       /**
+        * Receipt backing bean
+        */
+       private static FinancialsReceiptWebRequestController RECEIPT_CONTROLLER;
+
+       @Override
+       public BillableReceipt getAsObject (final FacesContext context, final UIComponent component, final String submittedValue) {
+               // Is the instance there?
+               if (RECEIPT_CONTROLLER == null) {
+                       try {
+                               // Not yet, attempt lookup
+                               final Context initial = new InitialContext();
+
+                               // Lookup EJB
+                               RECEIPT_CONTROLLER = (FinancialsReceiptWebRequestController) initial.lookup("java:module/receiptController!org.mxchange.jfinancials.beans.financial.model.receipt.FinancialsReceiptWebRequestController");
+                       } catch (final NamingException ex) {
+                               // Throw it again
+                               throw new ConverterException(new FacesMessage(FacesMessage.SEVERITY_ERROR, "Cannot lookup backing bean", ex.getMessage()), ex);
+                       }
+               }
+
+               // Is the value null or empty?
+               if ((null == submittedValue) || (submittedValue.trim().isEmpty())) {
+                       // Warning message
+                       // @TODO Not working with JNDI (no remote interface) this.loggerBeanLocal.logWarning(MessageFormat.format("{0}.getAsObject(): submittedValue is null or empty - EXIT!", this.getClass().getSimpleName())); //NOI18N
+
+                       // Return null
+                       return null;
+               }
+
+               // Init instance
+               BillableReceipt receipt = null;
+
+               try {
+                       // Try to parse the value as long
+                       final Long receiptId = Long.valueOf(submittedValue);
+
+                       // Try to get user instance from it
+                       receipt = RECEIPT_CONTROLLER.findReceiptById(receiptId);
+               } catch (final NumberFormatException ex) {
+                       // Throw again
+                       throw new ConverterException(ex);
+               } catch (final ReceiptNotFoundException ex) {
+                       // Debug message
+                       // @TODO Not working with JNDI (no remote interface) this.loggerBeanLocal.logDebug(MessageFormat.format("getAsObject: Exception: {0} - Returning null ...", ex)); //NOI18N
+               }
+
+               // Return it
+               return receipt;
+       }
+
+       @Override
+       public String getAsString (final FacesContext context, final UIComponent component, final BillableReceipt value) {
+               // Is the object null?
+               if ((null == value) || (String.valueOf(value).isEmpty())) {
+                       // Is null
+                       return ""; //NOI18N
+               }
+
+               // Return id number
+               return String.valueOf(value.getReceiptId());
+       }
+
+}
diff --git a/src/java/org/mxchange/jfinancials/converter/generic_product/FinancialsGenericProductConverter.java b/src/java/org/mxchange/jfinancials/converter/generic_product/FinancialsGenericProductConverter.java
new file mode 100644 (file)
index 0000000..7d03212
--- /dev/null
@@ -0,0 +1,103 @@
+/*
+ * Copyright (C) 2016, 2017 Roland Häder
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package org.mxchange.jfinancials.converter.generic_product;
+
+import javax.faces.application.FacesMessage;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.convert.Converter;
+import javax.faces.convert.ConverterException;
+import javax.faces.convert.FacesConverter;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import org.mxchange.jfinancials.beans.product.FinancialProductWebRequestController;
+import org.mxchange.jproduct.exceptions.product.ProductNotFoundException;
+import org.mxchange.jproduct.model.product.Product;
+
+/**
+ * Converter for product id <-> valid product instance
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+@FacesConverter ("GenericProductConverter")
+public class FinancialsGenericProductConverter implements Converter<Product> {
+
+       /**
+        * Product backing bean
+        */
+       private static FinancialProductWebRequestController PRODUCT_CONTROLLER;
+
+       @Override
+       public Product getAsObject (final FacesContext context, final UIComponent component, final String submittedValue) {
+               // Is the instance there?
+               if (PRODUCT_CONTROLLER == null) {
+                       try {
+                               // Not yet, attempt lookup
+                               final Context initial = new InitialContext();
+
+                               // Lookup EJB
+                               PRODUCT_CONTROLLER = (FinancialProductWebRequestController) initial.lookup("java:global/jfinancials-ejb/productController!org.mxchange.jfinancials.beans.product.FinancialProductWebRequestController");
+                       } catch (final NamingException ex) {
+                               // Throw it again
+                               throw new ConverterException(new FacesMessage(FacesMessage.SEVERITY_ERROR, "Cannot lookup backing bean", ex.getMessage()), ex);
+                       }
+               }
+
+               // Is the value null or empty?
+               if ((null == submittedValue) || (submittedValue.trim().isEmpty())) {
+                       // Warning message
+                       // @TODO Not working with JNDI (no remote interface) this.loggerBeanLocal.logWarning(MessageFormat.format("{0}.getAsObject(): submittedValue is null or empty - EXIT!", this.getClass().getSimpleName())); //NOI18N
+
+                       // Return null
+                       return null;
+               }
+
+               // Init instance
+               Product product = null;
+
+               try {
+                       // Try to parse the value as long
+                       final Long productId = Long.valueOf(submittedValue);
+
+                       // Try to get user instance from it
+                       product = PRODUCT_CONTROLLER.findProductById(productId);
+               } catch (final NumberFormatException ex) {
+                       // Throw again
+                       throw new ConverterException(ex);
+               } catch (final ProductNotFoundException ex) {
+                       // Debug message
+                       // @TODO Not working with JNDI (no remote interface) this.loggerBeanLocal.logDebug(MessageFormat.format("getAsObject: Exception: {0} - Returning null ...", ex)); //NOI18N
+               }
+
+               // Return it
+               return product;
+       }
+
+       @Override
+       public String getAsString (final FacesContext context, final UIComponent component, final Product value) {
+               // Is the object null?
+               if ((null == value) || (String.valueOf(value).isEmpty())) {
+                       // Is null
+                       return ""; //NOI18N
+               }
+
+               // Return id number
+               return String.valueOf(value.getProductId());
+       }
+
+}
diff --git a/src/java/org/mxchange/jfinancials/converter/product_category/FinancialsProductCategoryConverter.java b/src/java/org/mxchange/jfinancials/converter/product_category/FinancialsProductCategoryConverter.java
new file mode 100644 (file)
index 0000000..8512414
--- /dev/null
@@ -0,0 +1,103 @@
+/*
+ * Copyright (C) 2016, 2017 Roland Häder
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package org.mxchange.jfinancials.converter.product_category;
+
+import javax.faces.application.FacesMessage;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.convert.Converter;
+import javax.faces.convert.ConverterException;
+import javax.faces.convert.FacesConverter;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import org.mxchange.jfinancials.beans.category.FinancialCategoryWebRequestController;
+import org.mxchange.jproduct.exceptions.category.CategoryNotFoundException;
+import org.mxchange.jproduct.model.category.Category;
+
+/**
+ * Converter for category id <-> valid category instance
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+@FacesConverter ("ProductCategoryConverter")
+public class FinancialsProductCategoryConverter implements Converter<Category> {
+
+       /**
+        * Category backing bean
+        */
+       private static FinancialCategoryWebRequestController CATEGORY_CONTROLLER;
+
+       @Override
+       public Category getAsObject (final FacesContext context, final UIComponent component, final String submittedValue) {
+               // Is the instance there?
+               if (CATEGORY_CONTROLLER == null) {
+                       try {
+                               // Not yet, attempt lookup
+                               final Context initial = new InitialContext();
+
+                               // Lookup EJB
+                               CATEGORY_CONTROLLER = (FinancialCategoryWebRequestController) initial.lookup("java:module/categoryController!org.mxchange.jfinancials.beans.category.FinancialCategoryWebRequestController");
+                       } catch (final NamingException ex) {
+                               // Throw it again
+                               throw new ConverterException(new FacesMessage(FacesMessage.SEVERITY_ERROR, "Cannot lookup backing bean", ex.getMessage()), ex);
+                       }
+               }
+
+               // Is the value null or empty?
+               if ((null == submittedValue) || (submittedValue.trim().isEmpty())) {
+                       // Warning message
+                       // @TODO Not working with JNDI (no remote interface) this.loggerBeanLocal.logWarning(MessageFormat.format("{0}.getAsObject(): submittedValue is null or empty - EXIT!", this.getClass().getSimpleName())); //NOI18N
+
+                       // Return null
+                       return null;
+               }
+
+               // Init instance
+               Category category = null;
+
+               try {
+                       // Try to parse the value as long
+                       final Long categoryId = Long.valueOf(submittedValue);
+
+                       // Try to get user instance from it
+                       category = CATEGORY_CONTROLLER.findCategoryById(categoryId);
+               } catch (final NumberFormatException ex) {
+                       // Throw again
+                       throw new ConverterException(ex);
+               } catch (final CategoryNotFoundException ex) {
+                       // Debug message
+                       // @TODO Not working with JNDI (no remote interface) this.loggerBeanLocal.logDebug(MessageFormat.format("getAsObject: Exception: {0} - Returning null ...", ex)); //NOI18N
+               }
+
+               // Return it
+               return category;
+       }
+
+       @Override
+       public String getAsString (final FacesContext context, final UIComponent component, final Category value) {
+               // Is the object null?
+               if ((null == value) || (String.valueOf(value).isEmpty())) {
+                       // Is null
+                       return ""; //NOI18N
+               }
+
+               // Return id number
+               return String.valueOf(value.getCategoryId());
+       }
+
+}
index 04b8eee961a5079094bd1bef6803aad8a3adce1b..a35ed504b43993b990a654ce048b957e11178242 100644 (file)
@@ -39,35 +39,35 @@ FIELD_FINANCIAL_INCOME_TITLE_REQUIRED=Feld "Title" muss ausgefuellt werden.
 LOGIN_FINANCIAL_ENTER_RECEIPT_ISSUE_DATE_TITLE=Geben oder suchen Sie hier das genaue Datum aus, wann die Rechnung/der Kassenbon erstellt wurde. Dadurch kann ein genauer Zeitverlauf generiert werden.
 PAGE_TITLE_ADMIN_FINANCIALS_RECEIPT_LIST=Kassenbons auflisten
 CONTENT_TITLE_ADMIN_FINANCIALS_RECEIPT_LIST=Listet Kassenbons auf:
-TABLE_SUMMARY_ADMIN_LIST_FINANCIAL_RECEIPTS=Diese Tabelle listet bereits registrierte Kassenbons auf.
+TABLE_SUMMARY_ADMIN_LIST_RECEIPTS=Diese Tabelle listet bereits registrierte Kassenbons auf.
 #@TODO Please fix German umlauts!
-ADMIN_EMPTY_LIST_FINANCIAL_RECEIPT=Es befinden sich keine Kassenbons in der Datenbank. Oder Ihre Suche ergab keine Uebereinstimmungen.
+ADMIN_EMPTY_LIST_RECEIPT=Es befinden sich keine Kassenbons in der Datenbank. Oder Ihre Suche ergab keine Uebereinstimmungen.
 #@TODO Please fix German umlauts!
-ADMIN_ADD_FINANCIAL_RECEIPT_TITLE=Neuen Kassenbon hinzufuegen
+ADMIN_ADD_RECEIPT_TITLE=Neuen Kassenbon hinzufuegen
 #@TODO Please fix German umlauts!
-BUTTON_ADMIN_ADD_FINANCIAL_RECEIPT=Kassenbon hinzufuegen
-ADMIN_FINANCIAL_RECEIPT_ISSUE_DATE_REQUIRED=Bitte geben Sie das Ausstellungsdatum des Kassenbons ein.
-ADMIN_MENU_FINANCIAL_RECEIPTS_TITLE=Kassenbons
-ADMIN_LINK_LIST_FINANCIAL_RECEIPTS_TITLE=Listet alle registrierten Kassenbons/Rechnungen auf..
-ADMIN_LINK_LIST_FINANCIAL_RECEIPTS=Kassenbons/Rechnungen auflisten
-ADMIN_LIST_FINANCIAL_RECEIPTS_HEADER=Alle Kassenbons/Rechnungen auflisten
-ADMIN_FINANCIAL_RECEIPT_BASIC_LEGEND=Grunddaten des Kassenbons
-ADMIN_FINANCIAL_RECEIPT_BASIC_LEGEND_TITLE=Geben Sie hier die Grunddaten des neuen Kassenbons einn.
-ENTER_FINANCIAL_RECEIPT_ISSUE_DATE=Ausstellungsdatum des Kassenbons eingeben:
-ENTER_FINANCIAL_RECEIPT_NUMBER=Rechnungsnummer eingeben:
+BUTTON_ADMIN_ADD_RECEIPT=Kassenbon hinzufuegen
+ADMIN_RECEIPT_ISSUE_DATE_REQUIRED=Bitte geben Sie das Ausstellungsdatum des Kassenbons ein.
+ADMIN_MENU_RECEIPTS_TITLE=Kassenbons
+ADMIN_LINK_LIST_RECEIPTS_TITLE=Listet alle registrierten Kassenbons/Rechnungen auf..
+ADMIN_LINK_LIST_RECEIPTS=Kassenbons/Rechnungen auflisten
+ADMIN_LIST_RECEIPTS_HEADER=Alle Kassenbons/Rechnungen auflisten
+ADMIN_RECEIPT_BASIC_LEGEND=Grunddaten des Kassenbons
+ADMIN_RECEIPT_BASIC_LEGEND_TITLE=Geben Sie hier die Grunddaten des neuen Kassenbons einn.
+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.
-ADMIN_SELECT_FINANCIAL_RECEIPT_USER_OWNER=Kassenbon einem Benutzer zuweisen:
-ENTER_FINANCIAL_RECEIPT_REGISTER_NUMBER=Kassennummer eingeben:
-ENTER_FINANCIAL_RECEIPT_BARCODE_NUMBER=Barcode-Nummer eingeben:
-ADMIN_FINANCIAL_RECEIPT_OTHER_LEGEND=Sonstige Daten des Kassenbons eingeben:
-ADMIN_FINANCIAL_RECEIPT_OTHER_LEGEND_TITLE=Geben Sie hier weitere Daten an, die Sie auf dem Kassenbon finden koennen.
+ADMIN_SELECT_RECEIPT_USER_OWNER=Kassenbon einem Benutzer zuweisen:
+ENTER_RECEIPT_REGISTER_NUMBER=Kassennummer eingeben:
+ENTER_RECEIPT_BARCODE_NUMBER=Barcode-Nummer eingeben:
+ADMIN_RECEIPT_OTHER_LEGEND=Sonstige Daten des Kassenbons eingeben:
+ADMIN_RECEIPT_OTHER_LEGEND_TITLE=Geben Sie hier weitere Daten an, die Sie auf dem Kassenbon finden koennen.
 ADMIN_LINK_SHOW_RECEIPT_OWNER_USER_TITLE=Zeigt zugewiesenen Benutzer des Kassenbons an.
 #@TODO Please fix German umlauts!
 ADMIN_ASSIGNED_RECEIPT_SELLER=Zugewiesener Verkaeufer:
 DEPARTMENT_NAME_SALES=Verkauf
 #@TODO Please fix German umlauts!
-ADMIN_LINK_LIST_FINANCIAL_RECEIPT_ITEMS=Eintraege auflisten
+ADMIN_LINK_LIST_RECEIPT_ITEMS=Eintraege auflisten
 #@TODO Please fix German umlauts!
-ADMIN_LINK_LIST_FINANCIAL_RECEIPT_ITEMS_TITLE=Listet alle Eintraege aller Kassenbons auf.
+ADMIN_LINK_LIST_RECEIPT_ITEMS_TITLE=Listet alle Eintraege aller Kassenbons auf.
 ADMIN_LINK_SHOW_RECEIPT_TITLE=Zeigt Daten des Kassenbons an.
 ADMIN_LINK_SHOW_RECEIPT_ITEM_TITLE=Zeigt Daten eines Eintrages eines Kassenbons an.
index 5f298e44ad6438890d971799e339ee0ca0dff9b0..7f80ad9238b58cb751ba725a9fc4f16ff8d48f29 100644 (file)
@@ -30,29 +30,29 @@ FIELD_FINANCIAL_INCOME_TITLE_REQUIRED=Field "Title" must be filled out.
 LOGIN_FINANCIAL_ENTER_RECEIPT_ISSUE_DATE_TITLE=Please enter or select here the exact date when the receipt has been issue. Then an exact time-line can be generated.
 PAGE_TITLE_ADMIN_FINANCIALS_RECEIPT_LIST=List receipts
 CONTENT_TITLE_ADMIN_FINANCIALS_RECEIPT_LIST=Lists receipts:
-TABLE_SUMMARY_ADMIN_LIST_FINANCIAL_RECEIPTS=This table lists already registered receipts.
-ADMIN_EMPTY_LIST_FINANCIAL_RECEIPT=There are no receipts in database. Or your search criteria doesn't match anything.
-ADMIN_ADD_FINANCIAL_RECEIPT_TITLE=Add new receipt
-BUTTON_ADMIN_ADD_FINANCIAL_RECEIPT=Add receipt
-ADMIN_FINANCIAL_RECEIPT_ISSUE_DATE_REQUIRED=Please enter date of issue of receipt.
-ADMIN_MENU_FINANCIAL_RECEIPTS_TITLE=Receipts
-ADMIN_LINK_LIST_FINANCIAL_RECEIPTS_TITLE=Lists all registered receipts.
-ADMIN_LINK_LIST_FINANCIAL_RECEIPTS=List receipts
-ADMIN_LIST_FINANCIAL_RECEIPTS_HEADER=List all receipts
-ADMIN_FINANCIAL_RECEIPT_BASIC_LEGEND=Basic data of receipt:
-ADMIN_FINANCIAL_RECEIPT_BASIC_LEGEND_TITLE=Enter here basic data of the new receipt.
-ENTER_FINANCIAL_RECEIPT_ISSUE_DATE=Enter date of issue of receipt:
-ENTER_FINANCIAL_RECEIPT_NUMBER=Enter receipt number:
+TABLE_SUMMARY_ADMIN_LIST_RECEIPTS=This table lists already registered receipts.
+ADMIN_EMPTY_LIST_RECEIPT=There are no receipts in database. Or your search criteria doesn't match anything.
+ADMIN_ADD_RECEIPT_TITLE=Add new receipt
+BUTTON_ADMIN_ADD_RECEIPT=Add receipt
+ADMIN_RECEIPT_ISSUE_DATE_REQUIRED=Please enter date of issue of receipt.
+ADMIN_MENU_RECEIPTS_TITLE=Receipts
+ADMIN_LINK_LIST_RECEIPTS_TITLE=Lists all registered receipts.
+ADMIN_LINK_LIST_RECEIPTS=List 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.
+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.
-ADMIN_SELECT_FINANCIAL_RECEIPT_USER_OWNER=Assign receipt to user:
-ENTER_FINANCIAL_RECEIPT_REGISTER_NUMBER=Enter cash register number:
-ENTER_FINANCIAL_RECEIPT_BARCODE_NUMBER=Enter bar code number:
-ADMIN_FINANCIAL_RECEIPT_OTHER_LEGEND=Enter other data of receipt:
-ADMIN_FINANCIAL_RECEIPT_OTHER_LEGEND_TITLE=Enter other additional data you can find on the receipt.
+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:
+ADMIN_RECEIPT_OTHER_LEGEND=Enter other data of receipt:
+ADMIN_RECEIPT_OTHER_LEGEND_TITLE=Enter other additional data you can find on the receipt.
 ADMIN_LINK_SHOW_RECEIPT_OWNER_USER_TITLE=Shows assigned user of receipt.
 ADMIN_ASSIGNED_RECEIPT_SELLER=Assigned seller:
 DEPARTMENT_NAME_SALES=Sales
-ADMIN_LINK_LIST_FINANCIAL_RECEIPT_ITEMS=List receipt items
-ADMIN_LINK_LIST_FINANCIAL_RECEIPT_ITEMS_TITLE=Lists all receipt items.
+ADMIN_LINK_LIST_RECEIPT_ITEMS=List receipt items
+ADMIN_LINK_LIST_RECEIPT_ITEMS_TITLE=Lists all receipt items.
 ADMIN_LINK_SHOW_RECEIPT_TITLE=Shows receipt data.
 ADMIN_LINK_SHOW_RECEIPT_ITEM_TITLE=Shows receipt item data.
index 993f6ba2ffba4642a56591faa7ddb2858d0fae94..264c6ca5a7f3e87133eb230798326c8623c6332e 100644 (file)
                <ul class="navbar-mini">
                        <ui:fragment rendered="#{empty renderShowLink or renderShowLink}">
                                <li class="navlink-mini">
-                                       <p:link outcome="admin_show_receipt" value="#{msg.ADMIN_LINK_SHOW_SHORT}" title="#{msg.ADMIN_LINK_SHOW_FINANCIAL_RECEIPT_TITLE}">
+                                       <p:link outcome="admin_show_receipt" value="#{msg.ADMIN_LINK_SHOW_SHORT}" title="#{project.ADMIN_LINK_SHOW_RECEIPT_TITLE}">
                                                <f:param name="receiptId" value="#{receipt.receiptId}" />
                                        </p:link>
                                </li>
                        </ui:fragment>
 
                        <li class="navlink-mini">
-                               <p:link outcome="admin_edit_receipt" value="#{msg.ADMIN_LINK_EDIT_SHORT}" title="#{msg.ADMIN_LINK_EDIT_FINANCIAL_RECEIPT_TITLE}">
+                               <p:link outcome="admin_edit_receipt" value="#{msg.ADMIN_LINK_EDIT_SHORT}" title="#{project.ADMIN_LINK_EDIT_RECEIPT_TITLE}">
                                        <f:param name="receiptId" value="#{receipt.receiptId}" />
                                </p:link>
                        </li>
 
                        <li class="navlink-mini">
                                <p:link outcome="admin_delete_receipt">
-                                       <h:outputText styleClass="link-danger" value="#{msg.ADMIN_LINK_DELETE_SHORT}" title="#{msg.ADMIN_LINK_DELETE_FINANCIAL_RECEIPT_TITLE}" />
+                                       <h:outputText styleClass="link-danger" value="#{msg.ADMIN_LINK_DELETE_SHORT}" title="#{project.ADMIN_LINK_DELETE_RECEIPT_TITLE}" />
                                        <f:param name="receiptId" value="#{receipt.receiptId}" />
                                </p:link>
                        </li>
diff --git a/web/WEB-INF/resources/tags/admin/links/mini/financial/receipt_item/admin_receipt_item_links.tpl b/web/WEB-INF/resources/tags/admin/links/mini/financial/receipt_item/admin_receipt_item_links.tpl
new file mode 100644 (file)
index 0000000..075a68e
--- /dev/null
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ui:composition
+       xmlns="http://www.w3.org/1999/xhtml"
+       xmlns:f="http://java.sun.com/jsf/core"
+       xmlns:h="http://java.sun.com/jsf/html"
+       xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
+       xmlns:p="http://primefaces.org/ui">
+
+       <ui:fragment rendered="#{empty rendered or rendered}">
+               <ul class="navbar-mini">
+                       <ui:fragment rendered="#{empty renderShowLink or renderShowLink}">
+                               <li class="navlink-mini">
+                                       <p:link outcome="admin_show_receipt" value="#{msg.ADMIN_LINK_SHOW_SHORT}" title="#{project.ADMIN_LINK_SHOW_RECEIPT_ITEM_TITLE}">
+                                               <f:param name="receiptId" value="#{receiptItem.itemId}" />
+                                       </p:link>
+                               </li>
+                       </ui:fragment>
+
+                       <li class="navlink-mini">
+                               <p:link outcome="admin_edit_receipt" value="#{msg.ADMIN_LINK_EDIT_SHORT}" title="#{project.ADMIN_LINK_EDIT_RECEIPT_ITEM_TITLE}">
+                                       <f:param name="receiptId" value="#{receiptItem.itemId}" />
+                               </p:link>
+                       </li>
+
+                       <li class="navlink-mini">
+                               <p:link outcome="admin_delete_receipt">
+                                       <h:outputText styleClass="link-danger" value="#{msg.ADMIN_LINK_DELETE_SHORT}" title="#{project.ADMIN_LINK_DELETE_RECEIPT_ITEM_TITLE}" />
+                                       <f:param name="receiptId" value="#{receiptItem.itemId}" />
+                               </p:link>
+                       </li>
+               </ul>
+       </ui:fragment>
+</ui:composition>
index 7435b010da7db4cf873253e3f40737a028e3d30c..ef9329fd1c5baade15dc27d8664d8b7e55c713ed 100644 (file)
@@ -8,9 +8,9 @@
        xmlns:p="http://primefaces.org/ui">
 
        <!--
-       @TODO: title="#{project.ADMIN_FINANCIAL_RECEIPT_BASIC_LEGEND_TITLE}"
+       @TODO: title="#{project.ADMIN_RECEIPT_BASIC_LEGEND_TITLE}"
        -->
-       <p:fieldset legend="#{project.ADMIN_FINANCIAL_RECEIPT_BASIC_LEGEND}">
+       <p:fieldset legend="#{project.ADMIN_RECEIPT_BASIC_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="branchOffice" value="#{msg.ADMIN_SELECT_BRANCH_OFFICE}" />
                        <p:selectOneMenu
                                filter="true"
                                filterMatchMode="contains"
                                required="true"
-                               requiredMessage="#{msg.ADMIN_BRANCH_OFFICE_COMPANY_REQUIRED}"
+                               requiredMessage="#{msg.ADMIN_BRANCH_OFFICE_REQUIRED}"
                                >
                                <f:converter converterId="BranchOfficeConverter" />
                                <f:selectItem itemValue="#{null}" itemLabel="#{msg.PLEASE_SELECT}" noSelectionOption="true" itemDisabled="true" />
                                <f:selectItems value="#{branchOfficeController.allBranchOffices()}" var="branchOffice" itemValue="#{branchOffice}" itemLabel="#{branchOffice.branchCompany.companyName} #{branchOffice.branchStreet} #{branchOffice.branchHouseNumber}, #{branchOffice.branchCity}" />
                        </p:selectOneMenu>
 
-                       <p:outputLabel for="receiptIssued" value="#{project.ENTER_FINANCIAL_RECEIPT_ISSUE_DATE}" />
+                       <p:outputLabel for="receiptIssued" value="#{project.ENTER_RECEIPT_ISSUE_DATE}" />
                        <p:calendar
                                id="receiptIssued"
                                value="#{adminReceiptController.receiptIssued}"
                                required="true"
-                               requiredMessage="#{project.ADMIN_FINANCIAL_RECEIPT_ISSUE_DATE_REQUIRED}"
+                               requiredMessage="#{project.ADMIN_RECEIPT_ISSUE_DATE_REQUIRED}"
                                pattern="#{msg.DATE_PATTERN}"
                                navigator="true"
                                maskAutoClear="true"
                                filter="true"
                                filterMatchMode="contains"
                                >
-                               <f:converter converterId="CompanyEmployeeConverter" />
+                               <f:converter converterId="EmployeeConverter" />
                                <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
-                               <f:selectItems value="#{employeeController.allCompanyEmployees()}" 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="companyEmployee" itemValue="#{companyEmployee}" itemLabel="#{companyEmployee.employeeNumber} #{beanHelper.renderContact(companyEmployee.employeePersonalData)}" itemDescription="#{companyEmployee.employeeCompany.companyName}, #{beanHelper.renderBranchOffice(companyEmployee.employeeBranchOffice)}" />
                        </p:selectOneMenu>
 
-                       <p:outputLabel for="receiptUser" value="#{project.ADMIN_SELECT_FINANCIAL_RECEIPT_USER_OWNER}" />
+                       <p:outputLabel for="receiptUser" value="#{project.ADMIN_SELECT_RECEIPT_USER_OWNER}" />
                        <p:selectOneMenu
                                id="receiptUser"
                                value="#{adminReceiptController.receiptUser}"
                </p:panelGrid>
        </p:fieldset>
 
-       <p:fieldset legend="#{project.ADMIN_FINANCIAL_RECEIPT_OTHER_LEGEND}">
+       <p:fieldset legend="#{project.ADMIN_RECEIPT_OTHER_LEGEND}">
                <!--
-               @TODO: title="#{project.ADMIN_FINANCIAL_RECEIPT_OTHER_LEGEND_TITLE}">
+               @TODO: title="#{project.ADMIN_RECEIPT_OTHER_LEGEND_TITLE}">
                -->
                <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_FINANCIAL_RECEIPT_NUMBER}" />
+                       <p:outputLabel for="receiptNumber" value="#{project.ENTER_RECEIPT_NUMBER}" />
                        <p:inputText styleClass="input" id="receiptNumber" size="10" maxlength="20" value="#{adminReceiptController.receiptNumber}" validatorMessage="#{msg.ENTERED_RECEIPT_NUMBER_INVALID}">
                                <f:validateLongRange minimum="1" maximum="9999999999" />
                        </p:inputText>
 
-                       <p:outputLabel for="receiptRegisterNumber" value="#{project.ENTER_FINANCIAL_RECEIPT_REGISTER_NUMBER}" />
+                       <p:outputLabel for="receiptRegisterNumber" value="#{project.ENTER_RECEIPT_REGISTER_NUMBER}" />
                        <p:inputText styleClass="input" id="receiptRegisterNumber" size="3" maxlength="10" value="#{adminReceiptController.receiptRegisterNumber}" validatorMessage="#{msg.ENTERED_RECEIPT_REGISTER_NUMBER_INVALID}">
                                <f:validateLongRange minimum="1" maximum="999" />
                        </p:inputText>
 
-                       <p:outputLabel for="receiptBarCodeNumber" value="#{project.ENTER_FINANCIAL_RECEIPT_BARCODE_NUMBER}" />
+                       <p:outputLabel for="receiptBarCodeNumber" value="#{project.ENTER_RECEIPT_BARCODE_NUMBER}" />
                        <p:inputText styleClass="input" id="receiptBarCodeNumber" size="24" maxlength="24" value="#{adminReceiptController.receiptBarCodeNumber}" />
                </p:panelGrid>
        </p:fieldset>
index 270316ea8352e73ce8387e68858ab736d1676b06..a9c243745ff5d74afa2591d90426dc914bfbc008 100644 (file)
@@ -8,93 +8,70 @@
        xmlns:p="http://primefaces.org/ui">
 
        <!--
-       @TODO: title="#{project.ADMIN_FINANCIAL_RECEIPT_ITEM_BASIC_LEGEND_TITLE}"
+       @TODO: title="#{project.ADMIN_RECEIPT_ITEM_BASIC_LEGEND_TITLE}"
        -->
-       <p:fieldset legend="#{project.ADMIN_FINANCIAL_RECEIPT_ITEM_BASIC_LEGEND}">
+       <p:fieldset legend="#{project.ADMIN_RECEIPT_ITEM_BASIC_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="itemProduct" value="#{msg.ADMIN_SELECT_BRANCH_OFFICE}" />
+                       <p:outputLabel for="itemProduct" value="#{project.ADMIN_SELECT_PRODUCT}" />
                        <p:selectOneMenu
                                id="itemProduct"
-                               value="#{adminReceiptItemController.receiptBranchOffice}"
+                               value="#{adminReceiptItemController.itemProduct}"
                                filter="true"
                                filterMatchMode="contains"
                                required="true"
-                               requiredMessage="#{msg.ADMIN_BRANCH_OFFICE_COMPANY_REQUIRED}"
+                               requiredMessage="#{project.ADMIN_PRODUCT_REQUIRED}"
                                >
-                               <f:converter converterId="ProductConverter" />
+                               <f:converter converterId="GenericProductConverter" />
                                <f:selectItem itemValue="#{null}" itemLabel="#{msg.PLEASE_SELECT}" noSelectionOption="true" itemDisabled="true" />
-                               <f:selectItems value="#{productController.allProducts()}" var="product" itemValue="#{product}" itemLabel="#{product}" />
+                               <f:selectItems value="#{productController.allProducts()}" var="product" itemValue="#{product}" itemLabel="#{beanHelper.renderProduct(product)}" />
                        </p:selectOneMenu>
 
-                       <p:outputLabel for="receiptIssued" value="#{project.ENTER_FINANCIAL_RECEIPT_ITEM_ISSUE_DATE}" />
-                       <p:calendar
-                               id="receiptIssued"
-                               value="#{adminReceiptItemController.receiptIssued}"
+                       <p:outputLabel for="itemQuantity" value="#{project.ENTER_RECEIPT_ITEM_QUANTITY}" />
+                       <p:inputNumber
+                               id="itemQuantity"
+                               value="#{adminReceiptItemController.itemQuantity}"
                                required="true"
-                               requiredMessage="#{project.ADMIN_FINANCIAL_RECEIPT_ITEM_ISSUE_DATE_REQUIRED}"
-                               pattern="#{msg.DATE_PATTERN}"
-                               navigator="true"
-                               maskAutoClear="true"
-                               styleClass="input"
-                               title="#{project.ADMIN_RECEIPT_ITEM_DATE_OF_ISSUE_TITLE}"
+                               requiredMessage="#{project.ADMIN_RECEIPT_QUANTITY_REQUIRED}"
+                               title="#{project.ADMIN_RECEIPT_ITEM_QUANTITY_TITLE}"
                                />
 
-                       <p:outputLabel for="receiptPaymentType" value="#{msg.ADMIN_SELECT_PAYMENT_TYPE}" />
-                       <p:selectOneMenu
-                               id="receiptPaymentType"
-                               value="#{adminReceiptItemController.receiptPaymentType}"
-                               filter="true"
-                               filterMatchMode="contains"
-                               required="true"
-                               requiredMessage="#{project.FIELD_PAYMENT_TYPE_REQUIRED}"
-                               >
-                               <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]}" />
-                       </p:selectOneMenu>
-
-                       <p:outputLabel for="receiptSellerEmployee" value="#{msg.ADMIN_SELECT_SELLER_EMPLOYEE}" />
-                       <p:selectOneMenu
-                               id="receiptSellerEmployee"
-                               value="#{adminReceiptItemController.receiptSellerEmployee}"
-                               filter="true"
-                               filterMatchMode="contains"
-                               >
-                               <f:converter converterId="CompanyEmployeeConverter" />
-                               <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
-                               <f:selectItems value="#{employeeController.allCompanyEmployees()}" var="companyEmployee" itemValue="#{companyEmployee}" itemLabel="#{companyEmployee.employeeNumber} #{beanHelper.renderContact(companyEmployee.employeePersonalData)}" itemDescription="#{companyEmployee.employeeCompany.companyName}, #{beanHelper.renderBranchOffice(companyEmployee.employeeBranchOffice)}" />
-                       </p:selectOneMenu>
+                       <p:outputLabel for="itemDiscount" value="#{project.ENTER_RECEIPT_ITEM_DISCOUNT}" />
+                       <p:inputNumber
+                               id="itemDiscount"
+                               value="#{adminReceiptItemController.itemDiscount}"
+                               title="#{project.ADMIN_RECEIPT_ITEM_DISCOUNT_TITLE}"
+                               />
 
-                       <p:outputLabel for="receiptUser" value="#{project.ADMIN_SELECT_FINANCIAL_RECEIPT_ITEM_USER_OWNER}" />
+                       <p:outputLabel for="itemReceipt" value="#{project.ADMIN_SELECT_ITEM_RECEIPT}" />
                        <p:selectOneMenu
-                               id="receiptUser"
-                               value="#{adminReceiptItemController.receiptUser}"
+                               id="itemReceipt"
+                               value="#{adminReceiptItemController.itemReceipt}"
                                filter="true"
                                filterMatchMode="contains"
                                >
-                               <f:converter converterId="UserConverter" />
+                               <f:converter converterId="ReceiptConverter" />
                                <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
-                               <f:selectItems value="#{userController.allUsers()}" var="receiptUser" itemValue="#{receiptUser}" itemLabel="#{receiptUser.userContact.contactFirstName} #{receiptUser.userContact.contactFamilyName} (#{receiptUser.userName})" />
+                               <f:selectItems value="#{receiptController.allReceipts()}" var="receipt" itemValue="#{receipt}" itemLabel="#{beanHelper.renderReceipt(receipt)}" />
                        </p:selectOneMenu>
                </p:panelGrid>
        </p:fieldset>
 
-       <p:fieldset legend="#{project.ADMIN_FINANCIAL_RECEIPT_ITEM_OTHER_LEGEND}">
+       <p:fieldset legend="#{project.ADMIN_RECEIPT_ITEM_OTHER_LEGEND}">
                <!--
-               @TODO: title="#{project.ADMIN_FINANCIAL_RECEIPT_ITEM_OTHER_LEGEND_TITLE}">
+               @TODO: title="#{project.ADMIN_RECEIPT_ITEM_OTHER_LEGEND_TITLE}">
                -->
                <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_FINANCIAL_RECEIPT_ITEM_NUMBER}" />
+                       <p:outputLabel for="receiptNumber" value="#{project.ENTER_RECEIPT_ITEM_NUMBER}" />
                        <p:inputText styleClass="input" id="receiptNumber" size="10" maxlength="20" value="#{adminReceiptItemController.receiptNumber}" validatorMessage="#{msg.ENTERED_RECEIPT_ITEM_NUMBER_INVALID}">
                                <f:validateLongRange minimum="1" maximum="9999999999" />
                        </p:inputText>
 
-                       <p:outputLabel for="receiptRegisterNumber" value="#{project.ENTER_FINANCIAL_RECEIPT_ITEM_REGISTER_NUMBER}" />
+                       <p:outputLabel for="receiptRegisterNumber" value="#{project.ENTER_RECEIPT_ITEM_REGISTER_NUMBER}" />
                        <p:inputText styleClass="input" id="receiptRegisterNumber" size="3" maxlength="10" value="#{adminReceiptItemController.receiptRegisterNumber}" validatorMessage="#{msg.ENTERED_RECEIPT_ITEM_REGISTER_NUMBER_INVALID}">
                                <f:validateLongRange minimum="1" maximum="999" />
                        </p:inputText>
 
-                       <p:outputLabel for="receiptBarCodeNumber" value="#{project.ENTER_FINANCIAL_RECEIPT_ITEM_BARCODE_NUMBER}" />
+                       <p:outputLabel for="receiptBarCodeNumber" value="#{project.ENTER_RECEIPT_ITEM_BARCODE_NUMBER}" />
                        <p:inputText styleClass="input" id="receiptBarCodeNumber" size="24" maxlength="24" value="#{adminReceiptItemController.receiptBarCodeNumber}" />
                </p:panelGrid>
        </p:fieldset>
index 3de0e50cf83a54e6b660e9805490cfb96f09c0b0..a5f68a54e3a31dd81a6dbe12161aeef0198a776a 100644 (file)
@@ -6,8 +6,8 @@
        xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
        xmlns:p="http://primefaces.org/ui">
 
-       <p:submenu label="#{project.ADMIN_MENU_FINANCIAL_RECEIPTS_TITLE}">
-               <p:menuitem title="#{project.ADMIN_LINK_LIST_FINANCIAL_RECEIPTS_TITLE}" outcome="admin_list_receipts" value="#{project.ADMIN_LINK_LIST_FINANCIAL_RECEIPTS}" />
-               <p:menuitem title="#{project.ADMIN_LINK_LIST_FINANCIAL_RECEIPT_ITEMS_TITLE}" outcome="admin_list_receipt_items" value="#{project.ADMIN_LINK_LIST_FINANCIAL_RECEIPT_ITEMS}" />
+       <p:submenu label="#{project.ADMIN_MENU_RECEIPTS_TITLE}">
+               <p:menuitem title="#{project.ADMIN_LINK_LIST_RECEIPTS_TITLE}" outcome="admin_list_receipts" value="#{project.ADMIN_LINK_LIST_RECEIPTS}" />
+               <p:menuitem title="#{project.ADMIN_LINK_LIST_RECEIPT_ITEMS_TITLE}" outcome="admin_list_receipt_items" value="#{project.ADMIN_LINK_LIST_RECEIPT_ITEMS}" />
        </p:submenu>
 </ui:composition>
index 7b467c821400f2ef02fce8ecb29254011c575bcf..980ccbcdd9a495c9cbe2d6128c591baffc2b1c66 100644 (file)
@@ -8,8 +8,8 @@
        xmlns:p="http://primefaces.org/ui">
 
        <fieldset class="fieldset">
-               <legend title="#{project.LOGIN_FINANCIAL_RECEIPT_BASIC_LEGEND_TITLE}">
-                       <h:outputText value="#{project.LOGIN_FINANCIAL_RECEIPT_BASIC_LEGEND}" />
+               <legend title="#{project.LOGIN_RECEIPT_BASIC_LEGEND_TITLE}">
+                       <h:outputText value="#{project.LOGIN_RECEIPT_BASIC_LEGEND}" />
                </legend>
 
                <p:panelGrid layout="grid" columns="2" columnClasses="ui-grid-col-4, ui-grid-col-8" styleClass="table table-full">
@@ -20,7 +20,7 @@
                                filter="true"
                                filterMatchMode="contains"
                                required="true"
-                               requiredMessage="#{msg.LOGIN_BRANCH_OFFICE_COMPANY_REQUIRED}"
+                               requiredMessage="#{msg.LOGIN_BRANCH_OFFICE_REQUIRED}"
                                >
                                <f:converter converterId="BranchOfficeConverter" />
                                <f:selectItem itemValue="#{null}" itemLabel="#{msg.PLEASE_SELECT}" noSelectionOption="true" itemDisabled="true" />
                        </p:selectOneMenu>
                        <p:message for="branchOffice" />
 
-                       <p:outputLabel for="receiptIssued" value="#{project.ENTER_FINANCIAL_RECEIPT_ISSUE_DATE}" />
+                       <p:outputLabel for="receiptIssued" value="#{project.ENTER_RECEIPT_ISSUE_DATE}" />
                        <p:calendar
                                id="receiptIssued"
                                value="#{receiptController.receiptIssued}"
                                required="true"
-                               requiredMessage="#{project.LOGIN_FINANCIAL_RECEIPT_ISSUE_DATE_REQUIRED}"
+                               requiredMessage="#{project.LOGIN_RECEIPT_ISSUE_DATE_REQUIRED}"
                                pattern="#{msg.DATE_PATTERN}"
                                navigator="true"
                                maskAutoClear="true"
                                filter="true"
                                filterMatchMode="contains"
                                >
-                               <f:converter converterId="CompanyEmployeeConverter" />
+                               <f:converter converterId="EmployeeConverter" />
                                <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
-                               <f:selectItems value="#{employeeController.allCompanyEmployees()}" var="companyHeadQuarters" itemValue="#{companyEmployee}" itemLabel="#{companyEmployee.foo}" />
+                               <f:selectItems value="#{employeeController.allEmployees()}" var="companyHeadQuarters" itemValue="#{companyEmployee}" itemLabel="#{companyEmployee.foo}" />
                        </p:selectOneMenu>
                        <p:message for="receiptSellerEmployee" />
                </p:panelGrid>
        </fieldset>
 
        <fieldset class="fieldset">
-               <legend title="#{project.LOGIN_FINANCIAL_RECEIPT_OTHER_LEGEND_TITLE}">
-                       <h:outputText value="#{project.LOGIN_FINANCIAL_RECEIPT_OTHER_LEGEND}" />
+               <legend title="#{project.LOGIN_RECEIPT_OTHER_LEGEND_TITLE}">
+                       <h:outputText value="#{project.LOGIN_RECEIPT_OTHER_LEGEND}" />
                </legend>
 
                <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.FINANCIAL_RECEIPT_NUMBER}" />
+                       <p:outputLabel for="receiptNumber" value="#{project.RECEIPT_NUMBER}" />
                        <p:inputText styleClass="input" 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:outputLabel for="receiptRegisterNumber" value="#{project.FINANCIAL_RECEIPT_REGISTER_NUMBER}" />
+                       <p:outputLabel for="receiptRegisterNumber" value="#{project.RECEIPT_REGISTER_NUMBER}" />
                        <p:inputText styleClass="input" id="receiptRegisterNumber" size="3" maxlength="10" value="#{receiptController.receiptRegisterNumber}" validatorMessage="#{msg.ENTERED_RECEIPT_REGISTER_NUMBER_INVALID}">
                                <f:validateLongRange minimum="1" maximum="999" />
                        </p:inputText>
                        <p:message for="receiptRegisterNumber" />
 
-                       <p:outputLabel for="receiptBarCodeNumber" value="#{project.FINANCIAL_RECEIPT_BARCODE_NUMBER}" />
+                       <p:outputLabel for="receiptBarCodeNumber" value="#{project.RECEIPT_BARCODE_NUMBER}" />
                        <p:inputText styleClass="input" id="receiptBarCodeNumber" size="24" maxlength="24" value="#{receiptController.receiptBarCodeNumber}" />
                        <p:message for="receiptBarCodeNumber" />
                </p:panelGrid>
index 8f4cd6d86a65a7b6e866b7ea871a1f206ed487a7..fc88a1ccaa5bd7359ece538daf3b26459cdd2e1e 100644 (file)
                                resizableColumns="true"
                                rowsPerPageTemplate="5,10,20,50,100"
                                sortMode="multiple"
-                               summary="#{project.TABLE_SUMMARY_ADMIN_LIST_FINANCIAL_RECEIPT_ITEMSS}"
-                               emptyMessage="#{project.ADMIN_EMPTY_LIST_FINANCIAL_RECEIPT_ITEM}"
+                               summary="#{project.TABLE_SUMMARY_ADMIN_LIST_RECEIPT_ITEMSS}"
+                               emptyMessage="#{project.ADMIN_EMPTY_LIST_RECEIPT_ITEM}"
                                widgetVar="receiptItemList"
                                >
                                <f:facet name="header">
                                        <p:panelGrid columns="2" columnClasses="ui-grid-col-10, ui-grid-col-2" layout="grid" styleClass="ui-noborder ui-transparent-widget">
-                                               <h:outputText value="#{project.ADMIN_LIST_FINANCIAL_RECEIPT_ITEMS_HEADER}" />
+                                               <h:outputText value="#{project.ADMIN_LIST_RECEIPT_ITEMS_HEADER}" />
 
                                                <h:panelGroup>
                                                        <p:commandButton id="toggler" type="button" value="#{msg.SELECT_SHOWN_COLUMNS}" styleClass="column-selector" />
@@ -84,9 +84,9 @@
                                                        updateLabel="true"
                                                        title="#{project.FILTER_BY_MULTIPLE_RECEIPT_SELLERS_TITLE}"
                                                        >
-                                                       <f:converter converterId="CompanyEmployeeConverter" />
+                                                       <f:converter converterId="EmployeeConverter" />
                                                        <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
-                                                       <f:selectItems value="#{employeeController.allCompanyEmployees()}" var="employee" itemValue="#{employee}" itemLabel="#{beanHelper.renderEmployee(employee)}" />
+                                                       <f:selectItems value="#{employeeController.allEmployees()}" var="employee" itemValue="#{employee}" itemLabel="#{beanHelper.renderEmployee(employee)}" />
                                                </p:selectCheckboxMenu>
                                        </f:facet>
 
                        <p:panelGrid layout="grid" columns="1" styleClass="table table-full">
                                <h:panelGroup styleClass="table-header" layout="block">
                                        <h4>
-                                               <h:outputText value="#{project.ADMIN_ADD_FINANCIAL_RECEIPT_ITEM_TITLE}" />
+                                               <h:outputText value="#{project.ADMIN_ADD_RECEIPT_ITEM_TITLE}" />
                                        </h4>
                                </h:panelGroup>
 
                                        <p:commandButton
                                                styleClass="submit"
                                                type="submit"
-                                               value="#{project.BUTTON_ADMIN_ADD_FINANCIAL_RECEIPT_TEM}"
+                                               value="#{project.BUTTON_ADMIN_ADD_RECEIPT_TEM}"
                                                action="#{adminReceiptItemController.addReceiptItem()}"
                                                update=":master:form-list-financial-receipt-item:table-list-financial-receipt-item"
                                                />
index 69c8fe4a07acdb5699660bccc834878a4c83abb0..85d03110bae6b8300482d94144ede942347ab8af 100644 (file)
                                resizableColumns="true"
                                rowsPerPageTemplate="5,10,20,50,100"
                                sortMode="multiple"
-                               summary="#{project.TABLE_SUMMARY_ADMIN_LIST_FINANCIAL_RECEIPTS}"
-                               emptyMessage="#{project.ADMIN_EMPTY_LIST_FINANCIAL_RECEIPT}"
+                               summary="#{project.TABLE_SUMMARY_ADMIN_LIST_RECEIPTS}"
+                               emptyMessage="#{project.ADMIN_EMPTY_LIST_RECEIPT}"
                                widgetVar="receiptList"
                                >
                                <f:facet name="header">
                                        <p:panelGrid columns="2" columnClasses="ui-grid-col-10, ui-grid-col-2" layout="grid" styleClass="ui-noborder ui-transparent-widget">
-                                               <h:outputText value="#{project.ADMIN_LIST_FINANCIAL_RECEIPTS_HEADER}" />
+                                               <h:outputText value="#{project.ADMIN_LIST_RECEIPTS_HEADER}" />
 
                                                <h:panelGroup>
                                                        <p:commandButton id="toggler" type="button" value="#{msg.SELECT_SHOWN_COLUMNS}" styleClass="column-selector" />
@@ -84,9 +84,9 @@
                                                        updateLabel="true"
                                                        title="#{project.FILTER_BY_MULTIPLE_RECEIPT_SELLERS_TITLE}"
                                                        >
-                                                       <f:converter converterId="CompanyEmployeeConverter" />
+                                                       <f:converter converterId="EmployeeConverter" />
                                                        <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
-                                                       <f:selectItems value="#{employeeController.allCompanyEmployees()}" var="employee" itemValue="#{employee}" itemLabel="#{beanHelper.renderEmployee(employee)}" />
+                                                       <f:selectItems value="#{employeeController.allEmployees()}" var="employee" itemValue="#{employee}" itemLabel="#{beanHelper.renderEmployee(employee)}" />
                                                </p:selectCheckboxMenu>
                                        </f:facet>
 
                        <p:panelGrid layout="grid" columns="1" styleClass="table table-full">
                                <h:panelGroup styleClass="table-header" layout="block">
                                        <h4>
-                                               <h:outputText value="#{project.ADMIN_ADD_FINANCIAL_RECEIPT_TITLE}" />
+                                               <h:outputText value="#{project.ADMIN_ADD_RECEIPT_TITLE}" />
                                        </h4>
                                </h:panelGroup>
 
                                        <p:commandButton
                                                styleClass="submit"
                                                type="submit"
-                                               value="#{project.BUTTON_ADMIN_ADD_FINANCIAL_RECEIPT}"
+                                               value="#{project.BUTTON_ADMIN_ADD_RECEIPT}"
                                                action="#{adminReceiptController.addReceipt()}"
                                                update=":master:form-list-financial-receipt:table-list-financial-receipt"
                                                />
index e60a27af42d5fdadc1b2bc25aeaf36c27b0fc337..92febe16be35e874feaadece5e0874fd818c5258 100644 (file)
@@ -18,7 +18,7 @@
                <h:form id="form_add_financial_receipt">
                        <p:panelGrid layout="grid" columns="1" headerClass="table-header" footerClass="table-footer" styleClass="table table-full">
                                <f:facet name="header">
-                                       <h:outputText value="#{project.LOGIN_ADD_FINANCIAL_RECEIPT_TITLE}" />
+                                       <h:outputText value="#{project.LOGIN_ADD_RECEIPT_TITLE}" />
                                </f:facet>
 
                                <p:column>
@@ -27,7 +27,7 @@
 
                                <f:facet name="footer">
                                        <p:commandButton styleClass="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
-                                       <p:commandButton styleClass="submit" type="submit" id="submit_add_financial_receipt" value="#{project.BUTTON_LOGIN_ADD_FINANCIAL_RECEIPT}" action="#{receiptController.addReceipt()}" />
+                                       <p:commandButton styleClass="submit" type="submit" id="submit_add_financial_receipt" value="#{project.BUTTON_LOGIN_ADD_RECEIPT}" action="#{receiptController.addReceipt()}" />
                                </f:facet>
                        </p:panelGrid>
                </h:form>