diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/config/Profile.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/config/Profile.js index 508619e9a1359572c69ac5f95ef56c4c051d761c..3482ae17a7d2ec2bff4104c7c9646e48d5b3b08d 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/config/Profile.js +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/config/Profile.js @@ -51,16 +51,27 @@ $.extend(DefaultProfile.prototype, { } this.orderLanguage = { - "EN" : { + "ENGLISH" : { "DATE_LABEL" : "Date", + "SUPPLIER_LABEL" : "Supplier", + "CONTACT_INFO_LABEL" : "Contact Information", + "ORDER_INFO_LABEL" : "Contact Information", + "ACCOUNT_LABEL" : "Account No", + + "PREFERRED_LANGUAGE_LABEL" : "Preferred Supplier Language", + "PREFERRED_ORDER_METHOD_LABEL" : "Preferred Supplier Order Method", + "ORDER_MANAGER_LABEL" : "Order Manager", "ORDER_MANAGER_CONTACT_DETAILS_LABEL" : "Order Manager Contact Details", - "COMPANY_EMAIL_LABEL" : "Company Email", - "COMPANY_FAX_LABEL" : "Company Fax", - "QUANTITY_LABEL" : "Quantity", - "PRODUCT_LABEL" : "Product", - "TOTAL_PRICE_LABEL" : "Total Price", - "ADDITIONAL_INFORMATION_LABEL" : "Additional Information" + + "REQUESTED_PRODUCTS_LABEL" : "Requested Products", + "PRODUCTS_COLUMN_NAMES_LABEL" : "Name\tCode\tQuantity\tUnit Price\tCurrency", + + "SUPPLIER_FAX_LABEL" : "Supplier fax", + "SUPPLIER_EMAIL_LABEL" : "Supplier Email", + + "PRICE_TOTALS_LABEL" : "Price Totals by currency", + "ADDITIONAL_INFO_LABEL" : "Additional Information" } } diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/config/StandardProfile.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/config/StandardProfile.js index bfa671093ab3798f3049fd56b4341c36d3bd5561..e7ddc20dfec41057b43b8a56ff4de4c238ab2025 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/config/StandardProfile.js +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/config/StandardProfile.js @@ -456,31 +456,42 @@ $.extend(StandardProfile.prototype, DefaultProfile.prototype, { var orderPages = []; for(var providerPermId in productsByProviderPermId) { var provider = providerByPermId[providerPermId]; + var preferredSupplierLanguage = provider.properties["COMPANY_LANGUAGE"]; + + var languageLabels = profile.orderLanguage[preferredSupplierLanguage]; + if(!languageLabels) { + languageLabels = profile.orderLanguage["ENGLISH"]; + } + var providerProducts = productsByProviderPermId[providerPermId]; - var page = "Order for supplier: " + provider.properties["COMPANY_NAME"]; + var page = languageLabels["DATE_LABEL"] + ": " + Util.getFormatedDate(new Date()); + page += "\n"; + page += languageLabels["SUPPLIER_LABEL"] + ": " + provider.properties["COMPANY_NAME"]; page += "\n"; - page += "Contact Info:"; + page += languageLabels["CONTACT_INFO_LABEL"] + ":"; page += "\n"; - page += "- Supplier address: " + provider.properties["COMPANY_ADDRESS"]; + page += "- " + languageLabels["CONTACT_INFO_LABEL"] + ":"; page += "\n"; - page += "- Supplier fax: " + provider.properties["COMPANY_FAX"]; + page += "- " + languageLabels["ORDER_MANAGER_LABEL"] + ": " + order.properties["ORDER_MANAGER"]; page += "\n"; - page += "- Supplier phone: " + provider.properties["COMPANY_PHONE"]; + page += "- " + languageLabels["ORDER_MANAGER_CONTACT_DETAILS_LABEL"] + ": " + order.properties["ORDER_MANAGER_CONTACT_DETAILS"]; page += "\n"; - page += "- Supplier email: " + provider.properties["COMPANY_EMAIL"]; + page += "- " + languageLabels["SUPPLIER_FAX_LABEL"] + ": " + provider.properties["COMPANY_FAX"]; page += "\n"; - page += "Other Info:"; + page += "- " + languageLabels["SUPPLIER_EMAIL_LABEL"] + ": " + provider.properties["COMPANY_EMAIL"]; page += "\n"; - page += "- Account No: " + provider.properties["ACCOUNT_NUMBER"]; + page += languageLabels["ORDER_INFO_LABEL"] + ":"; page += "\n"; - page += "- Preferred Language: " + provider.properties["COMPANY_LANGUAGE"]; + page += "- " + languageLabels["ACCOUNT_LABEL"] + ": " + provider.properties["ACCOUNT_NUMBER"]; page += "\n"; - page += "- Preferred Order Method: " + provider.properties["PREFERRED_ORDER_METHOD"]; + page += "- " + languageLabels["PREFERRED_LANGUAGE_LABEL"] + ": " + provider.properties["COMPANY_LANGUAGE"]; page += "\n"; + page += "- " + languageLabels["PREFERRED_ORDER_METHOD_LABEL"] + ": " + provider.properties["PREFERRED_ORDER_METHOD"]; page += "\n"; - page += "Requested Products:"; page += "\n"; - page += "Name\tCode\tQuantity\tUnit Price\tCurrency"; + page += languageLabels["REQUESTED_PRODUCTS_LABEL"] + ":"; + page += "\n"; + page += languageLabels["PRODUCTS_COLUMN_NAMES_LABEL"]; page += "\n"; var totalByCurrency = {}; for(var pIdx = 0; pIdx < providerProducts.length; pIdx++) { @@ -497,12 +508,14 @@ $.extend(StandardProfile.prototype, DefaultProfile.prototype, { totalByCurrency[product.properties["CURRENCY"]] = totalForCurrency; } page += "\n"; - page += "Price Totals by currency:" + page += languageLabels["PRICE_TOTALS_LABEL"] + ":"; page += "\n"; for(var currency in totalByCurrency) { page += totalByCurrency[currency] + " " + currency; page += "\n"; } + page += languageLabels["ADDITIONAL_INFO_LABEL"] + ": " + order.properties["ADDITIONAL_INFORMATION"]; + page += "\n"; page += "-------------------------------------------------------------------"; page += "\n"; orderPages.push(page);