/**
* Bar-code number
*/
- private Long receiptBarCodeNumber;
+ private String receiptBarCodeNumber;
/**
* Recipient issuing company (for example where the user went shopping to)
* <p>
* @return Receipt's bar-code number
*/
- public Long getReceiptBarCodeNumber () {
+ public String getReceiptBarCodeNumber () {
return this.receiptBarCodeNumber;
}
* <p>
* @param receiptBarCodeNumber Receipt's bar-code number
*/
- public void setReceiptBarCodeNumber (final Long receiptBarCodeNumber) {
+ public void setReceiptBarCodeNumber (final String receiptBarCodeNumber) {
this.receiptBarCodeNumber = receiptBarCodeNumber;
}
/**
* Bar-code number
*/
- private Long receiptBarCodeNumber;
+ private String receiptBarCodeNumber;
/**
* EJB for general financial receipt purposes
* <p>
* @return Receipt's bar-code number
*/
- public Long getReceiptBarCodeNumber () {
+ public String getReceiptBarCodeNumber () {
return this.receiptBarCodeNumber;
}
* <p>
* @param receiptBarCodeNumber Receipt's bar-code number
*/
- public void setReceiptBarCodeNumber (final Long receiptBarCodeNumber) {
+ public void setReceiptBarCodeNumber (final String receiptBarCodeNumber) {
this.receiptBarCodeNumber = receiptBarCodeNumber;
}
import javax.faces.view.facelets.FaceletException;
import javax.inject.Inject;
import javax.inject.Named;
+import org.mxchange.jcontactsbusiness.model.basicdata.BasicData;
import org.mxchange.jfinancials.beans.BaseFinancialsBean;
import org.mxchange.jfinancials.events.receipt_item.added.ObservableReceiptItemAddedEvent;
import org.mxchange.jfinancials.events.receipt_item.added.ReceiptItemAddedEvent;
@EJB (lookup = "java:global/jfinancials-ejb/adminFinancialReceiptItem!org.mxchange.jfinancials.model.receipt_item.FinancialAdminReceiptItemSessionBeanRemote")
private FinancialAdminReceiptItemSessionBeanRemote adminReceiptItemBean;
+ /**
+ * Item brand name
+ */
+ private String itemBrandName;
+
/**
* Fixed discount on product price (if any)
*/
*/
private Float productGrossPrice;
+ /**
+ * Item manufacturer/producer
+ */
+ private BasicData itemManufacturer;
+
/**
* Product's net price
*/
return "add_receipt_item?faces-redirect=true"; //NOI18N
}
+ /**
+ * Getter for item brand name
+ * <p>
+ * @return Item brand name
+ */
+ public String getItemBrandName () {
+ return this.itemBrandName;
+ }
+
+ /**
+ * Setter for item brand name
+ * <p>
+ * @param itemBrandName Item brand name
+ */
+ public void setItemBrandName (final String itemBrandName) {
+ this.itemBrandName = itemBrandName;
+ }
+
/**
* Getter for item discount (fixed)
* <p>
this.itemDiscountPercent = itemDiscountPercent;
}
+ /**
+ * Getter for item manufacturer/producer
+ * <p>
+ * @return Item manufacturer/producer
+ */
+ public BasicData getItemManufacturer () {
+ return this.itemManufacturer;
+ }
+
+ /**
+ * Setter for item manufacturer/producer
+ * <p>
+ * @param itemManufacturer Item manufacturer/producer
+ */
+ public void setItemManufacturer (final BasicData itemManufacturer) {
+ this.itemManufacturer = itemManufacturer;
+ }
+
/**
* Getter for assigned product
* <p>
*/
private void clear () {
// Clear all fields
+ this.setItemBrandName(null);
this.setItemDiscountFixed(null);
this.setItemDiscountPercent(null);
+ this.setItemManufacturer(null);
this.setItemProduct(null);
this.setItemQuantity(null);
this.setItemReceipt(null);
final BillableReceiptItem receiptItem = new FinancialReceiptItem(this.getItemProduct(), this.getItemQuantity(), this.getItemReceipt());
// Set optional data
+ receiptItem.setItemBrandName(this.getItemBrandName());
receiptItem.setItemDiscountFixed(this.getItemDiscountFixed());
receiptItem.setItemDiscountPercent(this.getItemDiscountPercent());
+ receiptItem.setItemManufacturer(this.getItemManufacturer());
// Return prepared instance
return receiptItem;
@Override
public BillableReceipt getAsObject (final FacesContext context, final UIComponent component, final String submittedValue) {
// Is the instance there?
- if (RECEIPT_CONTROLLER == null) {
+ if (null == RECEIPT_CONTROLLER) {
// Get bean from CDI directly
RECEIPT_CONTROLLER = CDI.current().select(FinancialsReceiptWebRequestBean.class).get();
}
#@TODO Please fix German umlauts!
ADMIN_ENTER_PRODUCT_CURRENCY_CODE=Waehrungscode eingeben:
#@TODO Please fix German umlauts!
+ADMIN_ENTER_PRODUCT_CURRENCY_CODE_TITLE=Geben Sie den Waehrungscode fuer das Produkt ein. Beispiele: EUR, USD, PHP
+#@TODO Please fix German umlauts!
ADMIN_ENTER_PRODUCT_UNIT_AMOUNT=Produktstueckzahl eingeben:
ADMIN_ENTER_PRODUCT_UNIT_AMOUNT_TITLE=Geben Sie hier die Stueckzahl des Produktes ein. Zum Beispiel 500 fuer 500 Gramm. Unter Stueckzahleinheit geben Sie dann einfach nur "g" ein.
#@TODO Please fix German umlauts!
ADMIN_ENABLE_CATEGORY_IN_STATISTICS_TITLE=Waehlen Sie aus, ob diese Kategorie in Statistiken aufytauchen soll.
ADMIN_ENABLE_CATEGORY_IN_STATISTICS_REQUIRED=Bitte waehlen Sie aus, ob diese Kategorie in Statistiken auftauchen soll.
ENTER_RECEIPT_SEQUENCE_NUMBER=Sequenznummer eingeben:
+#@TODO Please fix German umlauts!
+ADMIN_ENTERED_CATEGORY_I18N_KEY_ALREADY_ADDED=Der von Ihnen eingegebene Uebersetzungsschluessel fuer die Kategorie ist bereits vorhanden. Bitte gebene Sie einen anderen an.
+#@TODO Please fix German umlauts!
+ADMIN_ENTERED_PRODUCT_I18N_KEY_ALREADY_ADDED=Der von Ihnen eingegebene Uebersetzungsschluessel fuer das Produkt ist bereits vorhanden. Bitte gebene Sie einen anderen an.
+#@TODO Please fix German umlauts!
+ADMIN_ENTER_PRODUCT_UNIT_TYPE=Einheit fuer Stueckzahl eingeben:
+#@TODO Please fix German umlauts!
+ADMIN_ENTER_PRODUCT_UNIT_TYPE_TITLE=Geben Sie hier die Einheit fuer die Produktstueckzahl ein, wie z.B. "l" fuer Liter oder "kg" fuer Kilogramm.
+ADMIN_ASSIGN_PRODUCT_MANUFACTURER=Produktehersteller dem Produkt zuweisen:
+#@TODO Please fix German umlauts!
+ADMIN_ASSIGN_PRODUCT_MANUFACTURER_TITLE=Zweisen Sie hier ein Hersteller dem Produkt zu. Supermaerke verkaufen oefters nur die Produkte, die ein anderes Unternehmen hergestellt hat.
+#@TODO Please fix German umlauts!
+SELECT_RECEIPT_ITEM_MANUFACTURER=Hersteller zum Kassenboneintrah auswaehlen:
+ADMIN_HEADER_RECEIPT_ITEM_MANUFACTURER_NAME=Hersteller des Boneintrages:
+ENTER_RECEIPT_ITEM_BRAND_NAME=Warenzeichen/Marke eingeben:
+ENTER_RECEIPT_ITEM_BRAND_NAME_TITLE=Geben Sie das Warenzeichen ein, dass Sie auf dem Kassenbon finden.
ADMIN_ENTER_PRODUCT_I18N_KEY_TITLE=Enter product's i18n key. This must be unique.
ADMIN_ENABLE_PRODUCT_AVAILABILITY_TITLE=Choose if the product is available/active.
ADMIN_ENTER_PRODUCT_CURRENCY_CODE=Enter currency code:
+ADMIN_ENTER_PRODUCT_CURRENCY_CODE=Enter currency code:
ADMIN_ENTER_PRODUCT_UNIT_AMOUNT=Enter product's unit amount:
-#Geben Sie hier die Stueckzahl des Produktes ein. Zum Beispiel 500 fuer 500 Gramm. Unter Stueckzahleinheit geben Sie dann einfach nur "g" ein.
ADMIN_ENTER_PRODUCT_UNIT_AMOUNT_TITLE=Enter the product's unit amount. For example 500 for 500 grams. Under unit type, then just enter "g".
BUTTON_ADMIN_ADD_GENERIC_PRODUCT=Add product
ADMIN_PRODUCT_CATEGORY_REQUIRED=Please choose a product category.
ADMIN_ENABLE_CATEGORY_IN_STATISTICS_TITLE=Choose if this category is enlisted in any kind of statistics.
ADMIN_ENABLE_CATEGORY_IN_STATISTICS_REQUIRED=Please choose if this category should be shown in any statistics.
ENTER_RECEIPT_SEQUENCE_NUMBER=Enter sequence number:
+ADMIN_ENTERED_CATEGORY_I18N_KEY_ALREADY_ADDED=Your entered category i18n key is already added. Please enter an other one.
+ADMIN_ENTERED_PRODUCT_I18N_KEY_ALREADY_ADDED=Your entered product i18n key is already added. Please enter an other one.
+ADMIN_ENTER_PRODUCT_UNIT_TYPE=Enter product's unit type:
+ADMIN_ENTER_PRODUCT_UNIT_TYPE_TITLE=Enter the product's unit type, like "l" for liter or "kg" for kilo grams.
+ADMIN_ASSIGN_PRODUCT_MANUFACTURER=Assign product's manufacturing/producing company:
+ADMIN_ASSIGN_PRODUCT_MANUFACTURER_TITLE=Assign a manufacturing/producing company to this product. Supermarkets are often only selling products other companies have produced.
+SELECT_RECEIPT_ITEM_MANUFACTURER=Choose manufacturer for receipt item:
+ADMIN_HEADER_RECEIPT_ITEM_MANUFACTURER_NAME=Manufacturer of product item:
+ADMIN_ENTER_PRODUCT_CURRENCY_CODE_TITLE=Enter the currency code for product. Examples: EUR, USD, PHP
+ENTER_RECEIPT_ITEM_BRAND_NAME=Enter item's brand name:
+ENTER_RECEIPT_ITEM_BRAND_NAME_TITLE=Enter the item's brand name found on receipt.
value="#{adminReceiptController.receiptIssued}"
required="true"
requiredMessage="#{project.ADMIN_RECEIPT_ISSUE_DATE_REQUIRED}"
- pattern="#{msg.DATE_PATTERN}"
+ pattern="#{msg.DATE_TIME_PATTERN}"
+ showButtonPanel="true"
+ showOtherMonths="true"
+ showSecond="false"
navigator="true"
maskAutoClear="true"
title="#{project.ADMIN_RECEIPT_DATE_OF_ISSUE_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:selectItems value="#{dataController.paymentTypes}" var="paymentType" itemValue="#{paymentType}" itemLabel="#{msg[paymentType.i18nKey]}" />
</p:selectOneMenu>
<p:outputLabel for="receiptSellerEmployee" value="#{msg.ADMIN_SELECT_SELLER_EMPLOYEE}" />
</p:inputText>
<p:outputLabel for="receiptBarCodeNumber" value="#{project.ENTER_RECEIPT_BARCODE_NUMBER}" />
- <p:inputText id="receiptBarCodeNumber" size="24" maxlength="24" value="#{adminReceiptController.receiptBarCodeNumber}" />
+ <p:inputText id="receiptBarCodeNumber" size="20" maxlength="255" value="#{adminReceiptController.receiptBarCodeNumber}" />
<p:outputLabel for="receiptSequenceNumber" value="#{project.ENTER_RECEIPT_SEQUENCE_NUMBER}" />
- <p:inputText id="receiptSequenceNumber" size="24" maxlength="24" value="#{adminReceiptController.receiptSequenceNumber}" />
+ <p:inputText id="receiptSequenceNumber" size="10" maxlength="20" value="#{adminReceiptController.receiptSequenceNumber}" />
</p:panelGrid>
</p:fieldset>
</ui:composition>
<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
+ id="itemBrandName"
+ value="#{adminReceiptItemController.itemBrandName}"
+ title="#{project.ENTER_RECEIPT_ITEM_BRAND_NAME_TITLE}"
+ />
+
<p:outputLabel for="itemProduct" value="#{project.SELECT_RECEIPT_ITEM_PRODUCT}" />
<p:selectOneMenu
id="itemProduct"
<f:selectItems value="#{productController.allProducts()}" var="product" itemValue="#{product}" itemLabel="#{beanHelper.renderGenericProduct(product)}" />
</p:selectOneMenu>
+ <p:outputLabel for="itemManufacturer" value="#{project.SELECT_RECEIPT_ITEM_MANUFACTURER}" />
+ <p:selectOneMenu
+ id="itemManufacturer"
+ value="#{adminReceiptItemController.itemManufacturer}"
+ filter="true"
+ filterMatchMode="contains"
+ >
+ <f:converter converterId="BasicCompanyDataConverter" />
+ <f:selectItem itemValue="#{null}" itemLabel="#{msg.PLEASE_SELECT}" noSelectionOption="true" itemDisabled="true" />
+ <f:selectItems value="#{basicCompanyDataController.allBasicData()}" var="basicData" itemValue="#{basicData}" itemLabel="#{basicData.companyName}" />
+ </p:selectOneMenu>
+
<p:outputLabel for="itemQuantity" value="#{project.ENTER_RECEIPT_ITEM_QUANTITY}" />
<p:inputNumber
id="itemQuantity"
>
<f:converter converterId="EmployeeConverter" />
<f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
- <f:selectItems value="#{employeeController.allEmployees()}" var="companyHeadQuarters" itemValue="#{companyEmployee}" itemLabel="#{companyEmployee.foo}" />
+ <f:selectItems value="#{employeeController.allEmployees()}" var="companyHeadquarter" itemValue="#{companyEmployee}" itemLabel="#{companyEmployee.foo}" />
</p:selectOneMenu>
<p:message for="receiptSellerEmployee" />
</p:panelGrid>