private Float productUnitAmount;
/**
- * Product's unit type
+ * Product's i18n key
*/
- private String productUnitType;
+ private String productUnitI18nKey;
/**
* Default constructor
}
/**
- * Getter for product's i18n key
+ * Getter for product unit's i18n key
* <p>
* @return Product's i18n key
*/
}
/**
- * Setter for product's i18n key
+ * Setter for product unit's i18n key
* <p>
* @param productI18nKey Product's i18n key
*/
}
/**
- * Getter for product's unit type
+ * Getter for product unit's i18n key
* <p>
- * @return Product's unit type
+ * @return Product's i18n key
*/
- public String getProductUnitType () {
- return this.productUnitType;
+ public String getProductUnitI18nKey () {
+ return this.productUnitI18nKey;
}
/**
- * Setter for product's unit type
+ * Setter for product unit's i18n key
* <p>
- * @param productUnitType Product's unit type
+ * @param productI18nKey Product's i18n key
*/
- public void setProductUnitType (final String productUnitType) {
- this.productUnitType = productUnitType;
+ public void setProductUnitI18nKey (final String productUnitI18nKey) {
+ this.productUnitI18nKey = productUnitI18nKey;
}
/**
this.setProductManufacturer(null);
this.setProductTaxRate(null);
this.setProductUnitAmount(null);
- this.setProductUnitType(null);
+ this.setProductUnitI18nKey(null);
}
/**
*/
private Product createProductInstance () {
// Create product instance
- final Product product = new GenericProduct(this.getProductI18nKey(), this.getProductGrossPrice(), this.getProductCurrencyCode(), this.getProductCategory(), this.getProductAvailability());
+ final Product product = new GenericProduct(this.getProductI18nKey(), this.getProductGrossPrice(), this.getProductCurrencyCode(), this.getProductCategory(), this.getProductAvailability(), this.getProductUnitAmount(), this.getProductUnitI18nKey());
// Set all optional fields
product.setProductNetPrice(this.getProductNetPrice());
product.setProductManufacturer(this.getProductManufacturer());
product.setProductTaxRate(this.getProductTaxRate());
- product.setProductUnitAmount(this.getProductUnitAmount());
- product.setProductUnitType(this.getProductUnitType());
// Return it
return product;
#@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:
+ADMIN_ENTER_PRODUCT_UNIT_I18N_KEY=Uebersetzungschluessel der 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_ENTER_PRODUCT_UNIT_I18N_KEY_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.
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_PRODUCT_CURRENCY_CODE_REQUIRED=Bitte geben Sie den Waehrungscode fuer das Produkt ein. Beispiele: EUR, USD, PHP
+#@TODO Please fix German umlauts!
+ADMIN_PRODUCT_UNIT_AMOUNT_REQUIRED=Bitte geben Sie die Stueckanzahl des Produktes ein. Beispiel: 500 fuer 500g
+#@TODO Please fix German umlauts!
+ADMIN_PRODUCT_UNIT_I18N_KEY_REQUIRED=Bitte geben Sie den Uebersetzungschluessel zur Stueckzahl ein. Beispiel: UNIT_TYPE_GRAMS fuer Gramm
+ADMIN_HEADER_PRODUCT_MANUFACTURER_NAME=Produktehersteller:
+ADMIN_NO_PRODUCT_MANUFACTURER_ASSIGNED_TITLE=Es ist kein Hersteller dem Produkt zugewiesen.
ADMIN_ENTER_PRODUCT_I18N_KEY=Enter product's i8n key:
ADMIN_ENABLE_PRODUCT_AVAILABILITY=Is the product available:
ADMIN_ASSIGN_PRODUCT_CATEGORY_TITLE=Choose the product category for the to be added product.
-ADMIN_ENTER_PRODUCT_I18N_KEY_TITLE=Enter product's i18n key. This must be unique.
+ADMIN_ENTER_PRODUCT_I18N_KEY_TITLE=Enter product unit'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:
-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".
+ADMIN_ENTER_PRODUCT_UNIT_AMOUNT_TITLE=Enter the product's unit amount. For example 500 for 500 grams. Under i18n key, then just enter "g".
BUTTON_ADMIN_ADD_GENERIC_PRODUCT=Add product
ADMIN_PRODUCT_CATEGORY_REQUIRED=Please choose a product category.
ADMIN_PRODUCT_I18N_KEY_REQUIRED=Please enter a product i18n key.
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_ENTER_PRODUCT_UNIT_I18N_KEY=Enter product unit's i18n key:
+ADMIN_ENTER_PRODUCT_UNIT_I18N_KEY_TITLE=Enter the product unit's i18n key, 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_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.
+ADMIN_PRODUCT_CURRENCY_CODE_REQUIRED=Please enter current code for product. Example: EUR, USD, PHP
+ADMIN_PRODUCT_UNIT_AMOUNT_REQUIRED=Please enter a unit amount. Example 500 for 500 grams.
+ADMIN_PRODUCT_UNIT_I18N_KEY_REQUIRED=Please enter unit's i18n key. Example: UNIT_TYPE_GRAMS for grams
+ADMIN_HEADER_PRODUCT_MANUFACTURER_NAME=Product manufacturer:
+ADMIN_NO_PRODUCT_MANUFACTURER_ASSIGNED_TITLE=No manufacturer is assigned with this product.
id="productAvailability"
value="#{adminProductController.productAvailability}"
required="true"
- requiredMessage="#{project.ADMIN_GENERIC_PROJECT_AVAILABILITY_REQUIRED}"
+ requiredMessage="#{project.ADMIN_GENERIC_PRODUCT_AVAILABILITY_REQUIRED}"
title="#{project.ADMIN_ENABLE_PRODUCT_AVAILABILITY_TITLE}"
/>
size="3"
maxlength="3"
title="#{project.ADMIN_ENTER_PRODUCT_CURRENCY_CODE_TITLE}"
+ required="true"
+ requiredMessage="#{project.ADMIN_PRODUCT_CURRENCY_CODE_REQUIRED}"
/>
<p:outputLabel for="productUnitAmount" value="#{project.ADMIN_ENTER_PRODUCT_UNIT_AMOUNT}" />
decimalSeparator=","
thousandSeparator="."
title="#{project.ADMIN_ENTER_PRODUCT_UNIT_AMOUNT_TITLE}"
+ required="true"
+ requiredMessage="#{project.ADMIN_PRODUCT_UNIT_AMOUNT_REQUIRED}"
/>
- <p:outputLabel for="productUnitType" value="#{project.ADMIN_ENTER_PRODUCT_UNIT_TYPE}" />
+ <p:outputLabel for="productUnitI18nKey" value="#{project.ADMIN_ENTER_PRODUCT_UNIT_I18N_KEY}" />
<p:inputText
- id="productUnitType"
- value="#{adminProductController.productUnitType}"
+ id="productUnitI18nKey"
+ value="#{adminProductController.productUnitI18nKey}"
size="10"
maxlength="255"
- title="#{project.ADMIN_ENTER_PRODUCT_UNIT_TYPE_TITLE}"
+ title="#{project.ADMIN_ENTER_PRODUCT_UNIT_I18N_KEY_TITLE}"
+ required="true"
+ requiredMessage="#{project.ADMIN_PRODUCT_UNIT_I18N_KEY_REQUIRED}"
/>
</p:panelGrid>
</p:fieldset>
<h:outputText value="#{product.productAvailability ? msg.CHOICE_YES : msg.CHOICE_NO}" />
</p:column>
- <p:column headerText="#{msg.ADMIN_HEADER_PRODUCT_MANUFACTURER_NAME}" sortBy="#{product.productManufacturer.companyName}" filterBy="#{product.productManufacturer}" filterMatchMode="in">
+ <p:column headerText="#{project.ADMIN_HEADER_PRODUCT_MANUFACTURER_NAME}" sortBy="#{product.productManufacturer.companyName}" filterBy="#{product.productManufacturer}" filterMatchMode="in">
<f:facet name="filter">
<p:selectCheckboxMenu
filter="true"
</p:selectCheckboxMenu>
</f:facet>
- <h:outputLink value="#{product.productManufacturer.companyWebsiteUrl}" target="_blank" title="#{msg.LINK_COMPANY_WEBSITE_URL_TITLE}" rel="external" rendered="#{not empty product.productManufacturer.companyWebsiteUrl}">
+ <p:link
+ href="#{product.productManufacturer.companyWebsiteUrl}"
+ target="_blank"
+ title="#{msg.LINK_COMPANY_WEBSITE_URL_TITLE}"
+ rel="external"
+ rendered="#{not empty product.productManufacturer.companyWebsiteUrl and not empty product.productManufacturer.companyName}"
+ >
<h:outputText value="#{product.productManufacturer.companyName}" />
- </h:outputLink>
+ </p:link>
+
+ <h:outputText value="#{product.productManufacturer.companyName}" title="#{msg.NO_WEBSITE_URL_ENTERED}" rendered="#{empty product.productManufacturer.companyWebsiteUrl and not empty product.productManufacturer.companyName}" />
- <h:outputText value="#{product.productManufacturer.companyName}" title="#{msg.NO_WEBSITE_URL_ENTERED}" rendered="#{empty product.productManufacturer.companyWebsiteUrl}" />
+ <h:outputText value="#{msg.ADMIN_NOT_ASSIGNED}" title="#{project.ADMIN_NO_PRODUCT_MANUFACTURER_ASSIGNED_TITLE}" rendered="#{empty product.productManufacturer}" />
</p:column>
<p:column headerText="#{msg.ADMIN_HEADER_ENTRY_CREATED}" sortBy="#{product.productCreated}" filterable="false">