Skip to content
Snippets Groups Projects
Commit 5a9b8033 authored by Johannes Hörmann's avatar Johannes Hörmann
Browse files

Merge commit '24e7de4a' into #1035025_SALUTATION

# Conflicts:
#	entity/Address_entity/Address_entity.aod
#	entity/Address_entity/entityfields/contactaddresses/children/contacttype_param/valueProcess.js
#	entity/Address_entity/entityfields/keywordaddresstype/children/containername_param/code.js
#	entity/Address_entity/entityfields/keywordaddresstype/children/containername_param/valueProcess.js
#	entity/Address_entity/entityfields/organisationaddresses/children/contacttype_param/valueProcess.js
#	entity/Address_entity/entityfields/organisationaddressesbycontact/children/contacttype_param/valueProcess.js
#	entity/Appointment_entity/entityfields/appointmentlinks/children/appointmentid_param/valueProcess.js
#	entity/Attribute_entity/entityfields/attributechildren/children/attrparentid_param/valueProcess.js
#	entity/Person_entity/Person_entity.aod
#	entity/SalesprojectCompetition_entity/SalesprojectCompetition_entity.aod
parents 694b7a6e 24e7de4a
No related branches found
No related tags found
No related merge requests found
Showing
with 110 additions and 103 deletions
......@@ -4,4 +4,4 @@ import("Contact_lib");
import("system.neon");
result.string(RelationUtils.getNameByPersOrgWithRelationId(vars.getString("$field.CONTACT_ID")));
\ No newline at end of file
result.string(ContactUtils.getFullTitleByContactId(vars.getString("$field.CONTACT_ID")));
\ No newline at end of file
......@@ -2,4 +2,4 @@ import("system.vars");
import("system.result");
import("Contact_lib");
result.string(RelationUtils.getContextByRelationId(vars.getString("$field.CONTACT_ID")));
\ No newline at end of file
result.string(ContactUtils.getContextByRelationId(vars.getString("$field.CONTACT_ID")));
\ No newline at end of file
......@@ -2,7 +2,7 @@ import("system.vars");
import("system.result");
import("Contact_lib");
var type = RelationUtils.getRelationType(vars.get("$field.CONTACT_ID"), vars.get("$field.CONTACT_PERSON_ID"), vars.get("$field.CONTACT_ORG_ID"));
var type = ContactUtils.getRelationType(vars.get("$field.CONTACT_ID"), vars.get("$field.CONTACT_PERSON_ID"), vars.get("$field.CONTACT_ORG_ID"));
result.string(type != 2);
......
......@@ -16,6 +16,8 @@
<entityField>
<name>DISCOUNT</name>
<title>Discount %</title>
<contentType>NUMBER</contentType>
<outputFormat>#,##0</outputFormat>
</entityField>
<entityField>
<name>GROUPCODEID</name>
......@@ -57,6 +59,8 @@
<entityField>
<name>PRICE</name>
<title>Unit price</title>
<contentType>NUMBER</contentType>
<outputFormat>#,##0.00</outputFormat>
</entityField>
<entityField>
<name>PRODUCT_ID</name>
......@@ -74,6 +78,8 @@
<name>QUANTITY</name>
<documentation>%aditoprj%/entity/Offeritem_entity/entityfields/quantity/documentation.adoc</documentation>
<title>Quantity</title>
<contentType>NUMBER</contentType>
<outputFormat>#,##0</outputFormat>
<valueProcess>%aditoprj%/entity/Offeritem_entity/entityfields/quantity/valueProcess.js</valueProcess>
<onValueChange>%aditoprj%/entity/Offeritem_entity/entityfields/quantity/onValueChange.js</onValueChange>
<onValueChangeTypes>
......@@ -90,6 +96,8 @@
<entityField>
<name>VAT</name>
<title>VAT</title>
<contentType>NUMBER</contentType>
<outputFormat>#,##0.00</outputFormat>
<state>READONLY</state>
</entityField>
<entityParameter>
......
......@@ -31,6 +31,7 @@
<title>Creation date</title>
<contentType>DATE</contentType>
<resolution>DAY</resolution>
<outputFormat>dd.MM.yyyy</outputFormat>
<mandatory v="true" />
<valueProcess>%aditoprj%/entity/Order_entity/entityfields/salesorderdate/valueProcess.js</valueProcess>
</entityField>
......@@ -389,6 +390,7 @@
<name>OFFER_ID</name>
<title>Offer</title>
<linkedContext>Offer</linkedContext>
<state>READONLY</state>
<valueProcess>%aditoprj%/entity/Order_entity/entityfields/offer_id/valueProcess.js</valueProcess>
<displayValueProcess>%aditoprj%/entity/Order_entity/entityfields/offer_id/displayValueProcess.js</displayValueProcess>
</entityField>
......
......@@ -3,4 +3,4 @@ import("system.vars");
import("Contact_lib");
import("system.neon");
result.string(RelationUtils.getNameByPersOrgWithRelationId(vars.getString("$field.CONTACT_ID")));
\ No newline at end of file
result.string(ContactUtils.getFullTitleByContactId(vars.getString("$field.CONTACT_ID")));
\ No newline at end of file
......@@ -2,4 +2,4 @@ import("system.vars");
import("system.result");
import("Contact_lib");
result.string(RelationUtils.getContextByRelationId(vars.getString("$field.CONTACT_ID")));
\ No newline at end of file
result.string(ContactUtils.getContextByRelationId(vars.getString("$field.CONTACT_ID")));
\ No newline at end of file
......@@ -305,24 +305,6 @@
<onActionProcess>%aditoprj%/entity/Organisation_entity/entityfields/newoffer/onActionProcess.js</onActionProcess>
<iconId>VAADIN:CART</iconId>
</entityActionField>
<entityField>
<name>PRICE_POLITICS</name>
<title>Price politics</title>
<consumer>KeywordPrice_Politics</consumer>
<searchable v="false" />
</entityField>
<entityField>
<name>STRENGTH</name>
<title>Strength</title>
<consumer>KeywordStrenght</consumer>
<searchable v="false" />
</entityField>
<entityField>
<name>WEAKNESS</name>
<title>Weakness</title>
<consumer>KeywordWeakness</consumer>
<searchable v="false" />
</entityField>
<entityField>
<name>STANDARD_EMAIL_COMMUNICATION</name>
<title>standard email</title>
......
......@@ -2,18 +2,7 @@ import("system.db");
import("system.vars");
import("system.result");
import("PostalAddress_lib");
import("Sql_lib");
var addrId = vars.get("$field.ADDRESS_ID");
var addr = "";
if (addrId)
{
var select = "select ADDRESS.COUNTRY, ADDRESS.ADDRESS, ADDRESS.BUILDINGNO, ADDRESS.ZIP, ADDRESS.CITY from ADDRESS ";
var addrData = db.array(db.ROW,
SqlCondition.begin()
.andPrepare("ADDRESS.ADDRESSID", addrId)
.buildSql(select));
addr = AddressUtils.formatOneline.apply(this, addrData);
}
var addr = AddressUtils.getFormattedOnlineAddressById(addrId);
result.string(addr);
\ No newline at end of file
......@@ -15,6 +15,7 @@
<title>Date of birth</title>
<contentType>DATE</contentType>
<resolution>DAY</resolution>
<outputFormat>dd.MM.yyyy</outputFormat>
</entityField>
<entityField>
<name>FIRSTNAME</name>
......@@ -147,6 +148,7 @@
<mandatory v="false" />
<searchable v="true" />
<valueProcess>%aditoprj%/entity/Person_entity/entityfields/organisation_id/valueProcess.js</valueProcess>
<displayValueProcess>%aditoprj%/entity/Person_entity/entityfields/organisation_id/displayValueProcess.js</displayValueProcess>
<onValueChange>%aditoprj%/entity/Person_entity/entityfields/organisation_id/onValueChange.js</onValueChange>
</entityField>
<entityConsumer>
......@@ -339,7 +341,6 @@ Usually this is used for filtering COMMUNICATION-entries by a specified contact
<element>FIRSTNAME</element>
<element>MIDDLENAME</element>
<element>LASTNAME</element>
<element>TITLESUFFIX</element>
</fields>
</entityFieldGroup>
<entityProvider>
......
......@@ -2,18 +2,7 @@ import("system.db");
import("system.vars");
import("system.result");
import("PostalAddress_lib");
import("Sql_lib");
var addrId = vars.get("$field.ADDRESS_ID");
var addr = "";
if (addrId)
{
var select = "select ADDRESS.COUNTRY, ADDRESS.ADDRESS, ADDRESS.BUILDINGNO, ADDRESS.ZIP, ADDRESS.CITY from ADDRESS ";
var addrData = db.array(db.ROW,
SqlCondition.begin()
.andPrepare("ADDRESS.ADDRESSID", addrId)
.buildSql(select));
addr = AddressUtils.formatOneline.apply(this, addrData);
}
var addr = AddressUtils.getFormattedOnlineAddressById(addrId);
result.string(addr);
\ No newline at end of file
import("system.vars");
import("system.result");
import("Util_lib");
import("Contact_lib");
result.string((vars.get("$field.SALUTATION") ? vars.get("$field.SALUTATION") + " " : "")
+ (vars.get("$field.TITLE") ? vars.get("$field.TITLE") + " " : "")
+ (vars.get("$field.FIRSTNAME") ? vars.get("$field.FIRSTNAME") + " " : "")
+ (vars.get("$field.MIDDLENAME") ? vars.get("$field.MIDDLENAME") + " " : "")
+ (vars.get("$field.LASTNAME") ? vars.get("$field.LASTNAME") + " " : "")
+ vars.get("$field.TITLESUFFIX"))
\ No newline at end of file
var contact = new Contact();
contact.salutation = vars.get("$field.SALUTATION");
contact.title = vars.get("$field.TITLE");
contact.firstname = vars.get("$field.FIRSTNAME");
contact.middlename = vars.get("$field.MIDDLENAME");
contact.lastname = vars.get("$field.LASTNAME");
var renderer = new ContactTitleRenderer(contact, null);
result.string(renderer.asString());
\ No newline at end of file
import("system.result");
import("system.db");
import("system.vars");
import("Sql_lib");
var organisationId = vars.get("$field.ORGANISATION_ID");
var orgname = "";
if (organisationId)
{
res = db.cell(SqlCondition.begin()
.andPrepare("ORGANISATION.ORGANISATIONID", organisationId)
.buildSql("select ORGANISATION.NAME from ORGANISATION"));
}
result.string(res);
\ No newline at end of file
......@@ -62,20 +62,18 @@
<mandatory v="true" />
</entityField>
<entityField>
<name>currentPurchasePriceId</name>
<name>currentPurchasePrice</name>
<title>Curr. purchase price</title>
<contentType>NUMBER</contentType>
<outputFormat>#,##0.00 €</outputFormat>
<contentType>TEXT</contentType>
<state>READONLY</state>
<valueProcess>%aditoprj%/entity/Product_entity/entityfields/currentpurchasepriceid/valueProcess.js</valueProcess>
<valueProcess>%aditoprj%/entity/Product_entity/entityfields/currentpurchaseprice/valueProcess.js</valueProcess>
</entityField>
<entityField>
<name>currentSalesPriceId</name>
<name>currentSalesPrice</name>
<title>Curr. sales price</title>
<contentType>NUMBER</contentType>
<outputFormat>#,##0.00 €</outputFormat>
<contentType>TEXT</contentType>
<state>READONLY</state>
<valueProcess>%aditoprj%/entity/Product_entity/entityfields/currentsalespriceid/valueProcess.js</valueProcess>
<valueProcess>%aditoprj%/entity/Product_entity/entityfields/currentsalesprice/valueProcess.js</valueProcess>
</entityField>
<entityConsumer>
<name>Organisations</name>
......
import("system.translate");
import("system.text");
import("system.result");
import("system.vars");
import("Product_lib");
var price = ProductUtils.getCurrentProductPrice(vars.get("$field.PRODUCTID"), "PP");
if (price.length > 0)
result.string(text.formatDouble(price[0], "#,##0.00", true) + " " + price[1]);
\ No newline at end of file
import("system.translate");
import("system.text");
import("system.result");
import("system.vars");
import("Product_lib");
var price = ProductUtils.getCurrentProductPrice(vars.get("$field.PRODUCTID"), "SP");
if (price.length > 0)
result.string(text.formatDouble(price[0], "#,##0.00", true) + " " + price[1]);
\ No newline at end of file
......@@ -60,6 +60,7 @@
<title>Valid from</title>
<contentType>DATE</contentType>
<resolution>DAY</resolution>
<outputFormat>dd.MM.yyyy</outputFormat>
<mandatory v="true" />
<valueProcess>%aditoprj%/entity/Productprice_entity/entityfields/valid_from/valueProcess.js</valueProcess>
<onValidation>%aditoprj%/entity/Productprice_entity/entityfields/valid_from/onValidation.js</onValidation>
......@@ -69,6 +70,7 @@
<title>Valid until</title>
<contentType>DATE</contentType>
<resolution>DAY</resolution>
<outputFormat>dd.MM.yyyy</outputFormat>
<onValidation>%aditoprj%/entity/Productprice_entity/entityfields/valid_to/onValidation.js</onValidation>
</entityField>
<entityField>
......
......@@ -13,6 +13,7 @@
<title>Excreted</title>
<contentType>DATE</contentType>
<resolution>DAY</resolution>
<outputFormat>dd.MM.yyyy</outputFormat>
</entityField>
<entityField>
<name>INFO</name>
......@@ -71,7 +72,7 @@
<linkedContext>Organisation</linkedContext>
</entityField>
<entityField>
<name>ORG_NAME</name>
<name>ORGANISATION_NAME</name>
<state>READONLY</state>
<onValueChangeTypes>
<element>MASK</element>
......@@ -99,21 +100,6 @@
</entityParameter>
</children>
</entityConsumer>
<entityField>
<name>ORG_PRICE_POLITICS</name>
<title>Price politics</title>
<consumer>KeywordPrice_Politics</consumer>
</entityField>
<entityField>
<name>ORG_STRENGTH</name>
<title>Strength</title>
<consumer>KeywordStrenght</consumer>
</entityField>
<entityField>
<name>ORG_WEAKNESS</name>
<title>Weakness</title>
<consumer>KeywordWeakness</consumer>
</entityField>
<entityConsumer>
<name>Organisations</name>
<fieldType>DEPENDENCY_OUT</fieldType>
......@@ -219,6 +205,30 @@
</entityParameter>
</children>
</entityConsumer>
<entityConsumer>
<name>Attributes</name>
<title>Attributes</title>
<fieldType>DEPENDENCY_OUT</fieldType>
<dependency>
<name>dependency</name>
<entityName>AttributeRelation_entity</entityName>
<fieldName>RelationsForSpecificObject</fieldName>
</dependency>
<children>
<entityParameter>
<name>objectType_param</name>
<valueProcess>%aditoprj%/entity/SalesprojectCompetition_entity/entityfields/attributes/children/objecttype_param/valueProcess.js</valueProcess>
</entityParameter>
<entityParameter>
<name>objectRowId_param</name>
<valueProcess>%aditoprj%/entity/SalesprojectCompetition_entity/entityfields/attributes/children/objectrowid_param/valueProcess.js</valueProcess>
</entityParameter>
<entityParameter>
<name>filteredAttributeIds_param</name>
<valueProcess>%aditoprj%/entity/SalesprojectCompetition_entity/entityfields/attributes/children/filteredattributeids_param/valueProcess.js</valueProcess>
</entityParameter>
</children>
</entityConsumer>
</entityFields>
<recordContainers>
<dbRecordContainer>
......@@ -252,7 +262,7 @@
<recordfield>SALESPROJECT_COMPETITION.INFO</recordfield>
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>ORG_NAME.value</name>
<name>ORGANISATION_NAME.value</name>
<recordfield>ORGANISATION.NAME</recordfield>
</dbRecordFieldMapping>
<dbRecordFieldMapping>
......@@ -279,18 +289,6 @@
<name>STATUS.value</name>
<recordfield>SALESPROJECT_COMPETITION.STATUS</recordfield>
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>ORG_PRICE_POLITICS.value</name>
<recordfield>ORGANISATION.PRICE_POLITICS</recordfield>
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>ORG_STRENGTH.value</name>
<recordfield>ORGANISATION.STRENGTH</recordfield>
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>ORG_WEAKNESS.value</name>
<recordfield>ORGANISATION.WEAKNESS</recordfield>
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>CONTACT_ID.displayValue</name>
<recordfield>ORGANISATION.NAME</recordfield>
......@@ -303,18 +301,6 @@
<name>PHASE.value</name>
<recordfield>SALESPROJECT_COMPETITION.PHASE</recordfield>
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>ORG_PRICE_POLITICS.displayValue</name>
<expression>%aditoprj%/entity/SalesprojectCompetition_entity/recordcontainers/db/recordfieldmappings/org_price_politics.displayvalue/expression.js</expression>
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>ORG_WEAKNESS.displayValue</name>
<expression>%aditoprj%/entity/SalesprojectCompetition_entity/recordcontainers/db/recordfieldmappings/org_weakness.displayvalue/expression.js</expression>
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>ORG_STRENGTH.displayValue</name>
<expression>%aditoprj%/entity/SalesprojectCompetition_entity/recordcontainers/db/recordfieldmappings/org_strength.displayvalue/expression.js</expression>
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>PHASE.displayValue</name>
<expression>%aditoprj%/entity/SalesprojectCompetition_entity/recordcontainers/db/recordfieldmappings/phase.displayvalue/expression.js</expression>
......
import("system.result");
result.object([
'8af37871-d407-4414-98ad-e64dbaa5794a', // Price politics
'558419b2-6113-4060-b88d-cc6324754765', // Strength
'71226196-2812-4d70-b90f-c3e2c14fd4d1' // Weakness
]);
\ No newline at end of file
import("system.vars");
import("system.result");
result.string(vars.get("$field.CONTACT_ID"));
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment