From b30b1c8e74184aa5ba513642791a1c962a17a7b4 Mon Sep 17 00:00:00 2001 From: Johannes Hoermann <j.hoermann@adito.de> Date: Fri, 7 Jun 2019 14:07:42 +0200 Subject: [PATCH] fix offer --- .../AnyContact_entity/AnyContact_entity.aod | 462 ++-- .../recordcontainers/db/conditionProcess.js | 28 +- entity/Offer_entity/Offer_entity.aod | 2082 +++++++++-------- .../children/contactid_param/valueProcess.js | 17 + .../entityfields/contact_id/stateProcess.js | 11 +- .../entityfields/contact_id/valueProcess.js | 58 +- .../entityfields/object_rowid/stateProcess.js | 34 +- 7 files changed, 1377 insertions(+), 1315 deletions(-) create mode 100644 entity/Offer_entity/entityfields/anycontacts/children/contactid_param/valueProcess.js diff --git a/entity/AnyContact_entity/AnyContact_entity.aod b/entity/AnyContact_entity/AnyContact_entity.aod index 212ff19be1..50859654a8 100644 --- a/entity/AnyContact_entity/AnyContact_entity.aod +++ b/entity/AnyContact_entity/AnyContact_entity.aod @@ -1,220 +1,242 @@ -<?xml version="1.0" encoding="UTF-8"?> -<entity xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.3.6" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.3.6"> - <name>AnyContact_entity</name> - <majorModelMode>DISTRIBUTED</majorModelMode> - <contentTitleProcess>%aditoprj%/entity/AnyContact_entity/contentTitleProcess.js</contentTitleProcess> - <recordContainer>db</recordContainer> - <entityFields> - <entityProvider> - <name>#PROVIDER</name> - <dependencies> - <entityDependency> - <name>5d8b421e-a234-4d03-bfec-ed01f464a54c</name> - <entityName>Contract_entity</entityName> - <fieldName>Relations</fieldName> - <isConsumer v="false" /> - </entityDependency> - <entityDependency> - <name>94e4fa2c-7525-49f9-b933-353d200b829c</name> - <entityName>Offer_entity</entityName> - <fieldName>Relations</fieldName> - <isConsumer v="false" /> - </entityDependency> - <entityDependency> - <name>f1f7d959-ecb5-4438-9762-fc11f1bc5334</name> - <entityName>Order_entity</entityName> - <fieldName>Relations</fieldName> - <isConsumer v="false" /> - </entityDependency> - <entityDependency> - <name>336fdc6b-05f8-40bc-89ba-d4ab98bd6948</name> - <entityName>CampaignParticipant_entity</entityName> - <fieldName>AnyContacts</fieldName> - <isConsumer v="false" /> - </entityDependency> - </dependencies> - </entityProvider> - <entityField> - <name>ADDRESS_ID</name> - <title>standard address</title> - <searchable v="false" /> - <displayValueProcess>%aditoprj%/entity/AnyContact_entity/entityfields/address_id/displayValueProcess.js</displayValueProcess> - </entityField> - <entityField> - <name>LANGUAGE</name> - <searchable v="false" /> - </entityField> - <entityField> - <name>ORGANISATION_ID</name> - <searchable v="false" /> - </entityField> - <entityField> - <name>PERSON_ID</name> - <searchable v="false" /> - </entityField> - <entityField> - <name>CONTACTID</name> - <searchable v="false" /> - </entityField> - <entityField> - <name>STATUS</name> - <searchable v="false" /> - </entityField> - <entityField> - <name>contactType</name> - <description>Relation type. Value is based on the existance or non-existance of ORGANISATION_ID and PERSON_ID. -See ContactUtils.getRelationTypeByPersOrg for possible values</description> - <contentType>NUMBER</contentType> - <searchable v="false" /> - <valueProcess>%aditoprj%/entity/AnyContact_entity/entityfields/contactType/valueProcess.js</valueProcess> - </entityField> - <entityField> - <name>ORGANISATION_NAME</name> - <title>Organisation name</title> - </entityField> - <entityField> - <name>PERSON_FIRSTNAME</name> - <title>Firstname</title> - </entityField> - <entityField> - <name>PERSON_LASTNAME</name> - <title>Lastname</title> - </entityField> - <entityField> - <name>IMAGE</name> - <contentType>IMAGE</contentType> - <searchable v="false" /> - <valueProcess>%aditoprj%/entity/AnyContact_entity/entityfields/image/valueProcess.js</valueProcess> - </entityField> - <entityField> - <name>STANDARD_EMAIL_COMMUNICATION</name> - <title>standard email</title> - <searchable v="false" /> - </entityField> - <entityField> - <name>STANDARD_PHONE_COMMUNICATION</name> - <title>Phone</title> - <searchable v="false" /> - </entityField> - <entityField> - <name>RELATIONSHIP</name> - <description>TODO: Beziehung zu der Relation 1024846 (z.B. per Ampelsystem)</description> - <searchable v="false" /> - </entityField> - <entityField> - <name>PERSON_MIDDLENAME</name> - </entityField> - <entityField> - <name>PERSON_TITLE</name> - </entityField> - <entityField> - <name>PERSON_SALUTATION</name> - </entityField> - <entityField> - <name>PERSON_FULL_NAME</name> - <title>Person</title> - <valueProcess>%aditoprj%/entity/AnyContact_entity/entityfields/person_full_name/valueProcess.js</valueProcess> - </entityField> - </entityFields> - <recordContainers> - <dbRecordContainer> - <name>db</name> - <alias>Data_alias</alias> - <fromClauseProcess>%aditoprj%/entity/AnyContact_entity/recordcontainers/db/fromClauseProcess.js</fromClauseProcess> - <conditionProcess>%aditoprj%/entity/AnyContact_entity/recordcontainers/db/conditionProcess.js</conditionProcess> - <orderClauseProcess>%aditoprj%/entity/AnyContact_entity/recordcontainers/db/orderClauseProcess.js</orderClauseProcess> - <linkInformation> - <linkInformation> - <name>7b3fa460-44a1-40f3-89e3-1625ce9c6bb3</name> - <tableName>CONTACT</tableName> - <primaryKey>CONTACTID</primaryKey> - <isUIDTable v="true" /> - <readonly v="false" /> - </linkInformation> - <linkInformation> - <name>6786a204-2cea-42ae-857d-4335bad6b5e4</name> - <tableName>ORGANISATION</tableName> - <primaryKey>ORGANISATIONID</primaryKey> - <isUIDTable v="false" /> - <readonly v="true" /> - </linkInformation> - <linkInformation> - <name>d15ccb84-6928-4c44-b940-0f5d04826b55</name> - <tableName>PERSON</tableName> - <primaryKey>PERSONID</primaryKey> - <isUIDTable v="false" /> - <readonly v="true" /> - </linkInformation> - <linkInformation> - <name>b778622f-449a-4185-b7cb-9b373ba4024f</name> - <tableName>ADDRESS</tableName> - <primaryKey>ADDRESSID</primaryKey> - <isUIDTable v="false" /> - <readonly v="true" /> - </linkInformation> - </linkInformation> - <recordFieldMappings> - <dbRecordFieldMapping> - <name>ADDRESS_ID.value</name> - <recordfield>CONTACT.ADDRESS_ID</recordfield> - </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>LANGUAGE.value</name> - <recordfield>CONTACT.LANGUAGE</recordfield> - </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>ORGANISATION_ID.value</name> - <recordfield>CONTACT.ORGANISATION_ID</recordfield> - </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>PERSON_ID.value</name> - <recordfield>CONTACT.PERSON_ID</recordfield> - </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>CONTACTID.value</name> - <recordfield>CONTACT.CONTACTID</recordfield> - </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>STATUS.value</name> - <recordfield>CONTACT.STATUS</recordfield> - </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>ORGANISATION_NAME.value</name> - <recordfield>ORGANISATION.NAME</recordfield> - </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>PERSON_FIRSTNAME.value</name> - <recordfield>PERSON.FIRSTNAME</recordfield> - </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>PERSON_LASTNAME.value</name> - <recordfield>PERSON.LASTNAME</recordfield> - </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>STANDARD_EMAIL_COMMUNICATION.value</name> - <expression>%aditoprj%/entity/AnyContact_entity/recordcontainers/db/recordfieldmappings/standard_email_communication.value/expression.js</expression> - </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>STANDARD_PHONE_COMMUNICATION.value</name> - <expression>%aditoprj%/entity/AnyContact_entity/recordcontainers/db/recordfieldmappings/standard_phone_communication.value/expression.js</expression> - </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>RELATIONSHIP.value</name> - <recordfield>CONTACT.RELATIONSHIP</recordfield> - </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>PERSON_MIDDLENAME.value</name> - <recordfield>PERSON.MIDDLENAME</recordfield> - </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>PERSON_TITLE.value</name> - <recordfield>PERSON.TITLE</recordfield> - </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>PERSON_SALUTATION.value</name> - <recordfield>PERSON.SALUTATION</recordfield> - </dbRecordFieldMapping> - </recordFieldMappings> - </dbRecordContainer> - </recordContainers> -</entity> +<?xml version="1.0" encoding="UTF-8"?> +<entity xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.3.6" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.3.6"> + <name>AnyContact_entity</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <contentTitleProcess>%aditoprj%/entity/AnyContact_entity/contentTitleProcess.js</contentTitleProcess> + <recordContainer>db</recordContainer> + <entityFields> + <entityProvider> + <name>#PROVIDER</name> + <dependencies> + <entityDependency> + <name>5d8b421e-a234-4d03-bfec-ed01f464a54c</name> + <entityName>Contract_entity</entityName> + <fieldName>Relations</fieldName> + <isConsumer v="false" /> + </entityDependency> + <entityDependency> + <name>94e4fa2c-7525-49f9-b933-353d200b829c</name> + <entityName>Offer_entity</entityName> + <fieldName>Relations</fieldName> + <isConsumer v="false" /> + </entityDependency> + <entityDependency> + <name>f1f7d959-ecb5-4438-9762-fc11f1bc5334</name> + <entityName>Order_entity</entityName> + <fieldName>Relations</fieldName> + <isConsumer v="false" /> + </entityDependency> + <entityDependency> + <name>336fdc6b-05f8-40bc-89ba-d4ab98bd6948</name> + <entityName>CampaignParticipant_entity</entityName> + <fieldName>AnyContacts</fieldName> + <isConsumer v="false" /> + </entityDependency> + </dependencies> + </entityProvider> + <entityField> + <name>ADDRESS_ID</name> + <title>standard address</title> + <searchable v="false" /> + <displayValueProcess>%aditoprj%/entity/AnyContact_entity/entityfields/address_id/displayValueProcess.js</displayValueProcess> + </entityField> + <entityField> + <name>LANGUAGE</name> + <searchable v="false" /> + </entityField> + <entityField> + <name>ORGANISATION_ID</name> + <searchable v="false" /> + </entityField> + <entityField> + <name>PERSON_ID</name> + <searchable v="false" /> + </entityField> + <entityField> + <name>CONTACTID</name> + <searchable v="false" /> + </entityField> + <entityField> + <name>STATUS</name> + <searchable v="false" /> + </entityField> + <entityField> + <name>contactType</name> + <description>Relation type. Value is based on the existance or non-existance of ORGANISATION_ID and PERSON_ID. +See ContactUtils.getRelationTypeByPersOrg for possible values</description> + <contentType>NUMBER</contentType> + <searchable v="false" /> + <valueProcess>%aditoprj%/entity/AnyContact_entity/entityfields/contactType/valueProcess.js</valueProcess> + </entityField> + <entityField> + <name>ORGANISATION_NAME</name> + <title>Organisation name</title> + </entityField> + <entityField> + <name>PERSON_FIRSTNAME</name> + <title>Firstname</title> + </entityField> + <entityField> + <name>PERSON_LASTNAME</name> + <title>Lastname</title> + </entityField> + <entityField> + <name>IMAGE</name> + <contentType>IMAGE</contentType> + <searchable v="false" /> + <valueProcess>%aditoprj%/entity/AnyContact_entity/entityfields/image/valueProcess.js</valueProcess> + </entityField> + <entityField> + <name>STANDARD_EMAIL_COMMUNICATION</name> + <title>standard email</title> + <searchable v="false" /> + </entityField> + <entityField> + <name>STANDARD_PHONE_COMMUNICATION</name> + <title>Phone</title> + <searchable v="false" /> + </entityField> + <entityField> + <name>RELATIONSHIP</name> + <description>TODO: Beziehung zu der Relation 1024846 (z.B. per Ampelsystem)</description> + <searchable v="false" /> + </entityField> + <entityField> + <name>PERSON_MIDDLENAME</name> + </entityField> + <entityField> + <name>PERSON_TITLE</name> + </entityField> + <entityField> + <name>PERSON_SALUTATION</name> + </entityField> + <entityField> + <name>PERSON_FULL_NAME</name> + <title>Person</title> + <valueProcess>%aditoprj%/entity/AnyContact_entity/entityfields/person_full_name/valueProcess.js</valueProcess> + </entityField> + <entityParameter> + <name>ContactId_param</name> + <expose v="true" /> + </entityParameter> + <entityProvider> + <name>OnlySameCompany</name> + <dependencies> + <entityDependency> + <name>28b19d6b-237c-4268-b6c6-323df408c94a</name> + <entityName>Offer_entity</entityName> + <fieldName>AnyContacts</fieldName> + <isConsumer v="false" /> + </entityDependency> + </dependencies> + <children> + <entityParameter> + <name>ContactId_param</name> + <expose v="true" /> + <mandatory v="true" /> + </entityParameter> + </children> + </entityProvider> + </entityFields> + <recordContainers> + <dbRecordContainer> + <name>db</name> + <alias>Data_alias</alias> + <fromClauseProcess>%aditoprj%/entity/AnyContact_entity/recordcontainers/db/fromClauseProcess.js</fromClauseProcess> + <conditionProcess>%aditoprj%/entity/AnyContact_entity/recordcontainers/db/conditionProcess.js</conditionProcess> + <orderClauseProcess>%aditoprj%/entity/AnyContact_entity/recordcontainers/db/orderClauseProcess.js</orderClauseProcess> + <linkInformation> + <linkInformation> + <name>7b3fa460-44a1-40f3-89e3-1625ce9c6bb3</name> + <tableName>CONTACT</tableName> + <primaryKey>CONTACTID</primaryKey> + <isUIDTable v="true" /> + <readonly v="false" /> + </linkInformation> + <linkInformation> + <name>6786a204-2cea-42ae-857d-4335bad6b5e4</name> + <tableName>ORGANISATION</tableName> + <primaryKey>ORGANISATIONID</primaryKey> + <isUIDTable v="false" /> + <readonly v="true" /> + </linkInformation> + <linkInformation> + <name>d15ccb84-6928-4c44-b940-0f5d04826b55</name> + <tableName>PERSON</tableName> + <primaryKey>PERSONID</primaryKey> + <isUIDTable v="false" /> + <readonly v="true" /> + </linkInformation> + <linkInformation> + <name>b778622f-449a-4185-b7cb-9b373ba4024f</name> + <tableName>ADDRESS</tableName> + <primaryKey>ADDRESSID</primaryKey> + <isUIDTable v="false" /> + <readonly v="true" /> + </linkInformation> + </linkInformation> + <recordFieldMappings> + <dbRecordFieldMapping> + <name>ADDRESS_ID.value</name> + <recordfield>CONTACT.ADDRESS_ID</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>LANGUAGE.value</name> + <recordfield>CONTACT.LANGUAGE</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>ORGANISATION_ID.value</name> + <recordfield>CONTACT.ORGANISATION_ID</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>PERSON_ID.value</name> + <recordfield>CONTACT.PERSON_ID</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>CONTACTID.value</name> + <recordfield>CONTACT.CONTACTID</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>STATUS.value</name> + <recordfield>CONTACT.STATUS</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>ORGANISATION_NAME.value</name> + <recordfield>ORGANISATION.NAME</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>PERSON_FIRSTNAME.value</name> + <recordfield>PERSON.FIRSTNAME</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>PERSON_LASTNAME.value</name> + <recordfield>PERSON.LASTNAME</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>STANDARD_EMAIL_COMMUNICATION.value</name> + <expression>%aditoprj%/entity/AnyContact_entity/recordcontainers/db/recordfieldmappings/standard_email_communication.value/expression.js</expression> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>STANDARD_PHONE_COMMUNICATION.value</name> + <expression>%aditoprj%/entity/AnyContact_entity/recordcontainers/db/recordfieldmappings/standard_phone_communication.value/expression.js</expression> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>RELATIONSHIP.value</name> + <recordfield>CONTACT.RELATIONSHIP</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>PERSON_MIDDLENAME.value</name> + <recordfield>PERSON.MIDDLENAME</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>PERSON_TITLE.value</name> + <recordfield>PERSON.TITLE</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>PERSON_SALUTATION.value</name> + <recordfield>PERSON.SALUTATION</recordfield> + </dbRecordFieldMapping> + </recordFieldMappings> + </dbRecordContainer> + </recordContainers> +</entity> diff --git a/entity/AnyContact_entity/recordcontainers/db/conditionProcess.js b/entity/AnyContact_entity/recordcontainers/db/conditionProcess.js index e3e997905f..565287dccb 100644 --- a/entity/AnyContact_entity/recordcontainers/db/conditionProcess.js +++ b/entity/AnyContact_entity/recordcontainers/db/conditionProcess.js @@ -1,14 +1,30 @@ +import("system.vars"); import("system.db"); import("system.result"); import("Sql_lib"); +import("Contact_lib"); + +var orgContactId; +if (vars.exists("$param.ContactId_param") && vars.get("$param.ContactId_param")) +{ + var contactId = vars.get("$param.ContactId_param"); + var ids = ContactUtils.getPersOrgIds(contactId); + + if (ids.length >= 3 && ids[2]) + { + orgContactId = ids[2]; + } +} //exclude private organisation var cond = SqlCondition.begin() - .andPrepare("CONTACT.ORGANISATION_ID", "0", "# != ?") - .orSqlCondition(SqlCondition.begin() - .andPrepare("CONTACT.ORGANISATION_ID", "0") - .and("CONTACT.PERSON_ID is not null") - ); - + .andSqlCondition(SqlCondition.begin() + .andPrepare("CONTACT.ORGANISATION_ID", "0", "# != ?") + .orSqlCondition(SqlCondition.begin() + .andPrepare("CONTACT.ORGANISATION_ID", "0") + .and("CONTACT.PERSON_ID is not null") + ) + ) + .andPrepareIfSet("CONTACT.ORGANISATION_ID", orgContactId); result.string(db.translateCondition(cond.build())); \ No newline at end of file diff --git a/entity/Offer_entity/Offer_entity.aod b/entity/Offer_entity/Offer_entity.aod index 9efcf06a3b..560dadf71a 100644 --- a/entity/Offer_entity/Offer_entity.aod +++ b/entity/Offer_entity/Offer_entity.aod @@ -1,1038 +1,1044 @@ -<?xml version="1.0" encoding="UTF-8"?> -<entity xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.3.6" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.3.6"> - <name>Offer_entity</name> - <majorModelMode>DISTRIBUTED</majorModelMode> - <documentation>%aditoprj%/entity/Offer_entity/documentation.adoc</documentation> - <title>Offer</title> - <afterUiInit>%aditoprj%/entity/Offer_entity/afterUiInit.js</afterUiInit> - <iconId>VAADIN:CART</iconId> - <recordContainer>db</recordContainer> - <entityFields> - <entityProvider> - <name>#PROVIDER</name> - <dependencies> - <entityDependency> - <name>f909c251-16c1-49e2-9b43-6d5f834137c6</name> - <entityName>Object_entity</entityName> - <fieldName>Offers</fieldName> - <isConsumer v="false" /> - </entityDependency> - </dependencies> - </entityProvider> - <entityField> - <name>CURRENCY</name> - <title>Currency</title> - <consumer>KeywordCurrencies</consumer> - <mandatory v="true" /> - <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/currency/valueProcess.js</valueProcess> - <displayValueProcess>%aditoprj%/entity/Offer_entity/entityfields/currency/displayValueProcess.js</displayValueProcess> - </entityField> - <entityField> - <name>OFFERCODE</name> - <documentation>%aditoprj%/entity/Offer_entity/entityfields/offercode/documentation.adoc</documentation> - <title>Offer number</title> - <state>READONLY</state> - <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/offercode/valueProcess.js</valueProcess> - <onValidation>%aditoprj%/entity/Offer_entity/entityfields/offercode/onValidation.js</onValidation> - </entityField> - <entityField> - <name>OFFERDATE</name> - <title>Date</title> - <contentType>DATE</contentType> - <resolution>DAY</resolution> - <outputFormat>dd.MM.yyyy</outputFormat> - <inputFormat>dd.MM.yyyy</inputFormat> - <mandatory v="true" /> - <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/offerdate/valueProcess.js</valueProcess> - </entityField> - <entityField> - <name>OFFERID</name> - <searchable v="false" /> - <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/offerid/valueProcess.js</valueProcess> - </entityField> - <entityField> - <name>PROBABILITY</name> - <title>Probability</title> - <consumer>KeywordProbabilities</consumer> - <contentType>NUMBER</contentType> - <displayValueProcess>%aditoprj%/entity/Offer_entity/entityfields/probability/displayValueProcess.js</displayValueProcess> - </entityField> - <entityField> - <name>STATUS</name> - <title>Status</title> - <consumer>KeywordOfferStates</consumer> - <mandatory v="true" /> - <state>EDITABLE</state> - <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/status/valueProcess.js</valueProcess> - <displayValueProcess>%aditoprj%/entity/Offer_entity/entityfields/status/displayValueProcess.js</displayValueProcess> - </entityField> - <entityField> - <name>VAT</name> - <title>Total VAT</title> - <contentType>NUMBER</contentType> - <inputFormat>#,##0.00</inputFormat> - <state>READONLY</state> - <displayValueProcess>%aditoprj%/entity/Offer_entity/entityfields/vat/displayValueProcess.js</displayValueProcess> - </entityField> - <entityField> - <name>IMAGE</name> - <contentType>IMAGE</contentType> - <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/image/valueProcess.js</valueProcess> - </entityField> - <entityField> - <name>HEADER</name> - <title>Header text</title> - <contentType>LONG_TEXT</contentType> - <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/header/valueProcess.js</valueProcess> - </entityField> - <entityConsumer> - <name>Offeritems</name> - <description></description> - <dependency> - <name>dependency</name> - <entityName>Offeritem_entity</entityName> - <fieldName>OfferItems</fieldName> - </dependency> - <children> - <entityParameter> - <name>OfferId_param</name> - <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/offeritems/children/offerid_param/valueProcess.js</valueProcess> - <expose v="true" /> - <triggerRecalculation v="true" /> - <mandatory v="true" /> - </entityParameter> - <entityParameter> - <name>Currency_param</name> - <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/offeritems/children/currency_param/valueProcess.js</valueProcess> - <expose v="true" /> - <triggerRecalculation v="true" /> - </entityParameter> - <entityParameter> - <name>ContactId_param</name> - <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/offeritems/children/ContactId_param/valueProcess.js</valueProcess> - <expose v="true" /> - <triggerRecalculation v="true" /> - <mandatory v="true" /> - </entityParameter> - <entityParameter> - <name>OfferStatus_param</name> - <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/offeritems/children/offerstatus_param/valueProcess.js</valueProcess> - <expose v="true" /> - <triggerRecalculation v="true" /> - <mandatory v="true" /> - </entityParameter> - </children> - </entityConsumer> - <entityActionField> - <name>newOfferVersion</name> - <title>New offer version</title> - <onActionProcess>%aditoprj%/entity/Offer_entity/entityfields/newofferversion/onActionProcess.js</onActionProcess> - <iconId>VAADIN:CART</iconId> - </entityActionField> - <entityField> - <name>NET</name> - <title>Total net</title> - <contentType>NUMBER</contentType> - <inputFormat>#,##0.00</inputFormat> - <state>READONLY</state> - <displayValueProcess>%aditoprj%/entity/Offer_entity/entityfields/net/displayValueProcess.js</displayValueProcess> - </entityField> - <entityField> - <name>TotalGross</name> - <documentation>%aditoprj%/entity/Offer_entity/entityfields/totalgross/documentation.adoc</documentation> - <title>Total gross</title> - <contentType>NUMBER</contentType> - <inputFormat>#,##0.00</inputFormat> - <state>READONLY</state> - <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/totalgross/valueProcess.js</valueProcess> - <displayValueProcess>%aditoprj%/entity/Offer_entity/entityfields/totalgross/displayValueProcess.js</displayValueProcess> - </entityField> - <entityField> - <name>LANGUAGE</name> - <title>Language</title> - <consumer>Languages</consumer> - <mandatory v="true" /> - <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/language/valueProcess.js</valueProcess> - <displayValueProcess>%aditoprj%/entity/Offer_entity/entityfields/language/displayValueProcess.js</displayValueProcess> - </entityField> - <entityActionField> - <name>copyOffer</name> - <title>Copy offer</title> - <onActionProcess>%aditoprj%/entity/Offer_entity/entityfields/copyoffer/onActionProcess.js</onActionProcess> - <iconId>VAADIN:COPY</iconId> - </entityActionField> - <entityField> - <name>VERSNR</name> - <documentation>%aditoprj%/entity/Offer_entity/entityfields/versnr/documentation.adoc</documentation> - <title>Vers. no.</title> - <state>READONLY</state> - <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/versnr/valueProcess.js</valueProcess> - </entityField> - <entityField> - <name>OFFER_ID</name> - <documentation>%aditoprj%/entity/Offer_entity/entityfields/offer_id/documentation.adoc</documentation> - </entityField> - <entityFieldGroup> - <name>OfferCode_VersNr_fieldgroup</name> - <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/offercode_versnr_fieldgroup/valueProcess.js</valueProcess> - <title>Offer number</title> - <description>Offercode + VersNr</description> - <state>READONLY</state> - <fields> - <element>OFFERCODE</element> - <element>VERSNR</element> - </fields> - </entityFieldGroup> - <entityParameter> - <name>ContactId_param</name> - <expose v="true" /> - <triggerRecalculation v="true" /> - <mandatory v="true" /> - <description>PARAMETER</description> - </entityParameter> - <entityActionField> - <name>printOffer</name> - <title>Print Offer</title> - <onActionProcess>%aditoprj%/entity/Offer_entity/entityfields/printoffer/onActionProcess.js</onActionProcess> - <iconId>VAADIN:FILE_TEXT_O</iconId> - <stateProcess>%aditoprj%/entity/Offer_entity/entityfields/printoffer/stateProcess.js</stateProcess> - </entityActionField> - <entityField> - <name>CONTACT_ORG_ID</name> - <searchable v="false" /> - </entityField> - <entityField> - <name>CONTACT_PERSON_ID</name> - <searchable v="false" /> - </entityField> - <entityConsumer> - <name>AnyContacts</name> - <dependency> - <name>dependency</name> - <entityName>AnyContact_entity</entityName> - <fieldName>#PROVIDER</fieldName> - </dependency> - </entityConsumer> - <entityConsumer> - <name>Documents</name> - <dependency> - <name>dependency</name> - <entityName>Document_entity</entityName> - <fieldName>Documents</fieldName> - </dependency> - <children> - <entityParameter> - <name>AssignmentRowId_param</name> - <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/documents/children/assignmentrowid_param/valueProcess.js</valueProcess> - </entityParameter> - <entityParameter> - <name>AssignmentTable_param</name> - <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/documents/children/assignmenttable_param/valueProcess.js</valueProcess> - </entityParameter> - </children> - </entityConsumer> - <entityConsumer> - <name>MainDocuments</name> - <stateProcess>%aditoprj%/entity/Offer_entity/entityfields/maindocuments/stateProcess.js</stateProcess> - <dependency> - <name>dependency</name> - <entityName>Document_entity</entityName> - <fieldName>MainDocuments</fieldName> - </dependency> - <children> - <entityParameter> - <name>AssignmentRowId_param</name> - <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/maindocuments/children/assignmentrowid_param/valueProcess.js</valueProcess> - </entityParameter> - <entityParameter> - <name>AssignmentTable_param</name> - <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/maindocuments/children/assignmenttable_param/valueProcess.js</valueProcess> - </entityParameter> - </children> - </entityConsumer> - <entityField> - <name>ADDRESS</name> - <documentation>%aditoprj%/entity/Offer_entity/entityfields/address/documentation.adoc</documentation> - <title>Address</title> - <description></description> - <contentType>LONG_TEXT</contentType> - <mandatory v="true" /> - <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/address/valueProcess.js</valueProcess> - </entityField> - <entityField> - <name>ChosenAddress</name> - <title>Choose address</title> - <consumer>PossibleAddresses</consumer> - <stateProcess>%aditoprj%/entity/Offer_entity/entityfields/chosenaddress/stateProcess.js</stateProcess> - <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/chosenaddress/valueProcess.js</valueProcess> - <displayValueProcess>%aditoprj%/entity/Offer_entity/entityfields/chosenaddress/displayValueProcess.js</displayValueProcess> - <onValueChange>%aditoprj%/entity/Offer_entity/entityfields/chosenaddress/onValueChange.js</onValueChange> - <onValueChangeTypes> - <element>MASK</element> - <element>PROCESS</element> - </onValueChangeTypes> - </entityField> - <entityConsumer> - <name>KeywordCurrencies</name> - <dependency> - <name>dependency</name> - <entityName>KeywordEntry_entity</entityName> - <fieldName>SpecificContainerKeywords</fieldName> - </dependency> - <children> - <entityParameter> - <name>ContainerName_param</name> - <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/keywordcurrencies/children/containername_param/valueProcess.js</valueProcess> - <expose v="false" /> - </entityParameter> - </children> - </entityConsumer> - <entityConsumer> - <name>KeywordOfferStates</name> - <dependency> - <name>dependency</name> - <entityName>KeywordEntry_entity</entityName> - <fieldName>SpecificContainerKeywords</fieldName> - </dependency> - <children> - <entityParameter> - <name>ContainerName_param</name> - <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/keywordofferstates/children/containername_param/valueProcess.js</valueProcess> - <expose v="false" /> - </entityParameter> - </children> - </entityConsumer> - <entityActionField> - <name>newOrder</name> - <title>Create receipt</title> - <onActionProcess>%aditoprj%/entity/Offer_entity/entityfields/neworder/onActionProcess.js</onActionProcess> - <iconId>VAADIN:DOLLAR</iconId> - </entityActionField> - <entityConsumer> - <name>Languages</name> - <dependency> - <name>dependency</name> - <entityName>Language_entity</entityName> - <fieldName>ISO3Name</fieldName> - </dependency> - </entityConsumer> - <entityConsumer> - <name>KeywordProbabilities</name> - <dependency> - <name>dependency</name> - <entityName>KeywordEntry_entity</entityName> - <fieldName>SpecificContainerKeywords</fieldName> - </dependency> - <children> - <entityParameter> - <name>ContainerName_param</name> - <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/keywordprobabilities/children/containername_param/valueProcess.js</valueProcess> - <expose v="false" /> - </entityParameter> - </children> - </entityConsumer> - <entityConsumer> - <name>Activities</name> - <dependency> - <name>dependency</name> - <entityName>Activity_entity</entityName> - <fieldName>LinkedObjects</fieldName> - </dependency> - <children> - <entityParameter> - <name>ObjectId_param</name> - <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/activities/children/objectid_param/valueProcess.js</valueProcess> - </entityParameter> - <entityParameter> - <name>RowId_param</name> - <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/activities/children/rowid_param/valueProcess.js</valueProcess> - </entityParameter> - <entityParameter> - <name>PresetLinks_param</name> - <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/activities/children/presetlinks_param/valueProcess.js</valueProcess> - </entityParameter> - </children> - </entityConsumer> - <entityActionField> - <name>newActivity</name> - <title>New activity</title> - <onActionProcess>%aditoprj%/entity/Offer_entity/entityfields/newactivity/onActionProcess.js</onActionProcess> - <iconId>VAADIN:HOURGLASS_END</iconId> - <tooltip>New activity</tooltip> - <tooltipProcess>%aditoprj%/entity/Offer_entity/entityfields/newactivity/tooltipProcess.js</tooltipProcess> - </entityActionField> - <entityProvider> - <name>ContactOffers</name> - <dependencies> - <entityDependency> - <name>5c9720b5-1288-4a30-88fd-6dcff6359083</name> - <entityName>Person_entity</entityName> - <fieldName>Offers</fieldName> - <isConsumer v="false" /> - </entityDependency> - <entityDependency> - <name>b308795f-3c81-4e60-99ca-3b5f8e82f62a</name> - <entityName>Organisation_entity</entityName> - <fieldName>Offers</fieldName> - <isConsumer v="false" /> - </entityDependency> - </dependencies> - <children> - <entityParameter> - <name>ContactId_param</name> - <expose v="true" /> - </entityParameter> - <entityParameter> - <name>SalesprojectId_param</name> - <expose v="false" /> - </entityParameter> - <entityParameter> - <name>OfferLanguage_param</name> - <expose v="false" /> - </entityParameter> - <entityParameter> - <name>ObjectRowId_param</name> - <expose v="false" /> - </entityParameter> - <entityParameter> - <name>OfferCode_param</name> - <expose v="false" /> - </entityParameter> - <entityParameter> - <name>OfferAddress_param</name> - <expose v="false" /> - </entityParameter> - <entityParameter> - <name>OfferCurrency_param</name> - <expose v="false" /> - </entityParameter> - <entityParameter> - <name>OfferDeliveryTerm_param</name> - <expose v="false" /> - </entityParameter> - <entityParameter> - <name>OfferHeader_param</name> - <expose v="true" /> - </entityParameter> - <entityParameter> - <name>OfferOriginal_Id_param</name> - <expose v="true" /> - </entityParameter> - <entityParameter> - <name>OfferPaymentTerm_param</name> - <expose v="false" /> - </entityParameter> - <entityParameter> - <name>OfferVersnr_param</name> - <expose v="false" /> - </entityParameter> - <entityParameter> - <name>PossibleConnectionTypes</name> - <expose v="false" /> - </entityParameter> - </children> - </entityProvider> - <entityParameter> - <name>OfferCurrency_param</name> - <expose v="true" /> - <triggerRecalculation v="true" /> - <mandatory v="false" /> - <description>PARAMETER</description> - </entityParameter> - <entityParameter> - <name>OfferLanguage_param</name> - <expose v="true" /> - <triggerRecalculation v="true" /> - <mandatory v="false" /> - <description>PARAMETER</description> - </entityParameter> - <entityParameter> - <name>OfferHeader_param</name> - <expose v="true" /> - <triggerRecalculation v="true" /> - <mandatory v="false" /> - <description>PARAMETER</description> - </entityParameter> - <entityParameter> - <name>OfferOriginal_Id_param</name> - <expose v="true" /> - <triggerRecalculation v="true" /> - <mandatory v="false" /> - <description>PARAMETER</description> - </entityParameter> - <entityParameter> - <name>OfferAddress_param</name> - <expose v="true" /> - <triggerRecalculation v="true" /> - <mandatory v="false" /> - <description>PARAMETER</description> - </entityParameter> - <entityParameter> - <name>OfferCode_param</name> - <expose v="true" /> - <triggerRecalculation v="true" /> - <mandatory v="false" /> - <description>PARAMETER</description> - </entityParameter> - <entityParameter> - <name>OfferVersnr_param</name> - <expose v="true" /> - <triggerRecalculation v="true" /> - <mandatory v="false" /> - <description>PARAMETER</description> - </entityParameter> - <entityActionField> - <name>newTask</name> - <title>New task</title> - <onActionProcess>%aditoprj%/entity/Offer_entity/entityfields/newtask/onActionProcess.js</onActionProcess> - <iconId>VAADIN:TASKS</iconId> - </entityActionField> - <entityField> - <name>PAYMENTTERMS</name> - <title>Payment term</title> - <consumer>KeywordPaymentTerm</consumer> - <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/paymentterms/valueProcess.js</valueProcess> - <displayValueProcess>%aditoprj%/entity/Offer_entity/entityfields/paymentterms/displayValueProcess.js</displayValueProcess> - </entityField> - <entityField> - <name>DELIVERYTERMS</name> - <title>Delivery specification</title> - <consumer>KeywordDeliveryTerm</consumer> - <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/deliveryterms/valueProcess.js</valueProcess> - <displayValueProcess>%aditoprj%/entity/Offer_entity/entityfields/deliveryterms/displayValueProcess.js</displayValueProcess> - </entityField> - <entityConsumer> - <name>KeywordPaymentTerm</name> - <dependency> - <name>dependency</name> - <entityName>KeywordEntry_entity</entityName> - <fieldName>SpecificContainerKeywords</fieldName> - </dependency> - <children> - <entityParameter> - <name>ContainerName_param</name> - <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/keywordpaymentterm/children/containername_param/valueProcess.js</valueProcess> - </entityParameter> - </children> - </entityConsumer> - <entityConsumer> - <name>KeywordDeliveryTerm</name> - <dependency> - <name>dependency</name> - <entityName>KeywordEntry_entity</entityName> - <fieldName>SpecificContainerKeywords</fieldName> - </dependency> - <children> - <entityParameter> - <name>ContainerName_param</name> - <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/keyworddeliveryterm/children/containername_param/valueProcess.js</valueProcess> - </entityParameter> - </children> - </entityConsumer> - <entityConsumer> - <name>Tasks</name> - <stateProcess>%aditoprj%/entity/Offer_entity/entityfields/tasks/stateProcess.js</stateProcess> - <dependency> - <name>dependency</name> - <entityName>Task_entity</entityName> - <fieldName>Tasks</fieldName> - </dependency> - <children> - <entityParameter> - <name>RowId_param</name> - <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/tasks/children/rowid_param/valueProcess.js</valueProcess> - </entityParameter> - <entityParameter> - <name>ObjectId_param</name> - <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/tasks/children/objectid_param/valueProcess.js</valueProcess> - </entityParameter> - <entityParameter> - <name>PresetLinks_param</name> - <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/tasks/children/presetlinks_param/valueProcess.js</valueProcess> - </entityParameter> - </children> - </entityConsumer> - <entityField> - <name>INFO</name> - <title>Information</title> - <contentType>LONG_TEXT</contentType> - </entityField> - <entityConsumer> - <name>Attributes</name> - <onValidation>%aditoprj%/entity/Offer_entity/entityfields/attributes/onValidation.js</onValidation> - <dependency> - <name>dependency</name> - <entityName>AttributeRelation_entity</entityName> - <fieldName>AttributeRelations</fieldName> - </dependency> - <children> - <entityParameter> - <name>ObjectRowId_param</name> - <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/attributes/children/objectrowid_param/valueProcess.js</valueProcess> - </entityParameter> - <entityParameter> - <name>ObjectType_param</name> - <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/attributes/children/objecttype_param/valueProcess.js</valueProcess> - </entityParameter> - </children> - </entityConsumer> - <entityParameter> - <name>OfferPaymentTerm_param</name> - <expose v="true" /> - <description>PARAMETER</description> - </entityParameter> - <entityParameter> - <name>OfferDeliveryTerm_param</name> - <expose v="true" /> - <description>PARAMETER</description> - </entityParameter> - <entityField> - <name>USER_NEW</name> - <searchable v="false" /> - <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/user_new/valueProcess.js</valueProcess> - </entityField> - <entityField> - <name>USER_EDIT</name> - <searchable v="false" /> - <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/user_edit/valueProcess.js</valueProcess> - </entityField> - <entityField> - <name>DATE_NEW</name> - <searchable v="false" /> - <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/date_new/valueProcess.js</valueProcess> - </entityField> - <entityField> - <name>DATE_EDIT</name> - <searchable v="false" /> - <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/date_edit/valueProcess.js</valueProcess> - </entityField> - <entityField> - <name>FullOfferCode</name> - <title>Offer number</title> - <state>READONLY</state> - <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/fulloffercode/valueProcess.js</valueProcess> - </entityField> - <entityConsumer> - <name>PossibleAddresses</name> - <dependency> - <name>dependency</name> - <entityName>Address_entity</entityName> - <fieldName>OrganisationAndContactAddresses</fieldName> - </dependency> - <children> - <entityParameter> - <name>ContactId_param</name> - <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/possibleaddresses/children/contactid_param/valueProcess.js</valueProcess> - </entityParameter> - </children> - </entityConsumer> - <entityField> - <name>ChoosenTEXHeader</name> - <title>Choose Header</title> - <consumer>DocumentTemplateTexHeader</consumer> - </entityField> - <entityField> - <name>OBJECT_ROWID</name> - <title>Connection</title> - <consumer>Objects</consumer> - <linkedContextProcess>%aditoprj%/entity/Offer_entity/entityfields/object_rowid/linkedContextProcess.js</linkedContextProcess> - <mandatoryProcess>%aditoprj%/entity/Offer_entity/entityfields/object_rowid/mandatoryProcess.js</mandatoryProcess> - <state>AUTO</state> - <stateProcess>%aditoprj%/entity/Offer_entity/entityfields/object_rowid/stateProcess.js</stateProcess> - <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/object_rowid/valueProcess.js</valueProcess> - <displayValueProcess>%aditoprj%/entity/Offer_entity/entityfields/object_rowid/displayValueProcess.js</displayValueProcess> - </entityField> - <entityField> - <name>OBJECT_TYPE</name> - <title>Connection Type</title> - <consumer>Contexts</consumer> - <mandatoryProcess>%aditoprj%/entity/Offer_entity/entityfields/object_type/mandatoryProcess.js</mandatoryProcess> - <state>INVISIBLE</state> - <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/object_type/valueProcess.js</valueProcess> - <displayValueProcess>%aditoprj%/entity/Offer_entity/entityfields/object_type/displayValueProcess.js</displayValueProcess> - </entityField> - <entityConsumer> - <name>Objects</name> - <dependency> - <name>dependency</name> - <entityName>Object_entity</entityName> - <fieldName>FilteredObjects</fieldName> - </dependency> - <children> - <entityParameter> - <name>ObjectType_param</name> - <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/objects/children/objecttype_param/valueProcess.js</valueProcess> - </entityParameter> - <entityParameter> - <name>ContactId_param</name> - <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/objects/children/contactid_param/valueProcess.js</valueProcess> - <triggerRecalculation v="true" /> - </entityParameter> - </children> - </entityConsumer> - <entityConsumer> - <name>Contexts</name> - <dependency> - <name>dependency</name> - <entityName>Context_entity</entityName> - <fieldName>Context</fieldName> - </dependency> - <children> - <entityParameter> - <name>Whitelist</name> - <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/contexts/children/whitelist/valueProcess.js</valueProcess> - </entityParameter> - </children> - </entityConsumer> - <entityProvider> - <name>Links</name> - <recordContainer>db</recordContainer> - <dependencies> - <entityDependency> - <name>88a166e6-ccd0-4d51-b554-e3327f66d834</name> - <entityName>Salesproject_entity</entityName> - <fieldName>Offers</fieldName> - <isConsumer v="false" /> - </entityDependency> - </dependencies> - <children> - <entityParameter> - <name>OfferDeliveryTerm_param</name> - <expose v="false" /> - </entityParameter> - <entityParameter> - <name>OfferCode_param</name> - <expose v="false" /> - </entityParameter> - <entityParameter> - <name>OfferOriginal_Id_param</name> - <expose v="false" /> - </entityParameter> - <entityParameter> - <name>ContactId_param</name> - <expose v="false" /> - </entityParameter> - <entityParameter> - <name>ObjectRowId_param</name> - <expose v="true" /> - </entityParameter> - <entityParameter> - <name>ObjectType_param</name> - <expose v="true" /> - </entityParameter> - <entityParameter> - <name>OfferAddress_param</name> - <expose v="false" /> - </entityParameter> - <entityParameter> - <name>OfferCurrency_param</name> - <expose v="false" /> - </entityParameter> - <entityParameter> - <name>OfferHeader_param</name> - <expose v="false" /> - </entityParameter> - <entityParameter> - <name>OfferLanguage_param</name> - <expose v="false" /> - </entityParameter> - <entityParameter> - <name>OfferPaymentTerm_param</name> - <expose v="false" /> - </entityParameter> - <entityParameter> - <name>OfferVersnr_param</name> - <expose v="false" /> - </entityParameter> - <entityParameter> - <name>PossibleConnectionTypes</name> - <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/links/children/possibleconnectiontypes/valueProcess.js</valueProcess> - <expose v="false" /> - </entityParameter> - </children> - </entityProvider> - <entityParameter> - <name>ObjectRowId_param</name> - <expose v="true" /> - <triggerRecalculation v="true" /> - <description>PARAMETER</description> - </entityParameter> - <entityParameter> - <name>ObjectType_param</name> - <expose v="true" /> - <description>PARAMETER</description> - </entityParameter> - <entityField> - <name>chooseTEXHeader</name> - <consumer>DocumentTemplateTex</consumer> - </entityField> - <entityConsumer> - <name>DocumentTemplateTexHeader</name> - <dependency> - <name>dependency</name> - <entityName>DocumentTemplate_entity</entityName> - <fieldName>DocumentTemplateProvider</fieldName> - </dependency> - <children> - <entityParameter> - <name>DocumentTemplateType_param</name> - <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/documenttemplatetexheader/children/documenttemplatetype_param/valueProcess.js</valueProcess> - </entityParameter> - <entityParameter> - <name>DocumentTemplateTypeClassification_param</name> - <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/documenttemplatetexheader/children/documenttemplatetypeclassification_param/valueProcess.js</valueProcess> - </entityParameter> - </children> - </entityConsumer> - <entityConsumer> - <name>LogHistoryConsumer</name> - <dependency> - <name>dependency</name> - <entityName>LogHistory_entity</entityName> - <fieldName>LogHistoryProvider</fieldName> - </dependency> - <children> - <entityParameter> - <name>tablenames_param</name> - <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/loghistoryconsumer/children/tablenames_param/valueProcess.js</valueProcess> - </entityParameter> - </children> - </entityConsumer> - <entityField> - <name>FOOTER</name> - <title>Footer text</title> - <contentType>LONG_TEXT</contentType> - <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/footer/valueProcess.js</valueProcess> - </entityField> - <entityParameter> - <name>OfferFooter_param</name> - <expose v="true" /> - <triggerRecalculation v="true" /> - <description>PARAMETER</description> - </entityParameter> - <entityField> - <name>ChoosenTEXFooter</name> - <title>Choose Footer</title> - <consumer>DocumentTemplateTexFooter</consumer> - </entityField> - <entityConsumer> - <name>DocumentTemplateTexFooter</name> - <dependency> - <name>dependency</name> - <entityName>DocumentTemplate_entity</entityName> - <fieldName>DocumentTemplateProvider</fieldName> - </dependency> - <children> - <entityParameter> - <name>DocumentTemplateType_param</name> - <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/documenttemplatetexfooter/children/documenttemplatetype_param/valueProcess.js</valueProcess> - </entityParameter> - <entityParameter> - <name>DocumentTemplateTypeClassification_param</name> - <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/documenttemplatetexfooter/children/documenttemplatetypeclassification_param/valueProcess.js</valueProcess> - </entityParameter> - </children> - </entityConsumer> - <entityConsumer> - <name>Salesprojects</name> - <dependency> - <name>dependency</name> - <entityName>Salesproject_entity</entityName> - <fieldName>Salesprojects</fieldName> - </dependency> - <children> - <entityParameter> - <name>ContactId_param</name> - <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/salesprojects/children/contactid_param/valueProcess.js</valueProcess> - </entityParameter> - </children> - </entityConsumer> - <entityField> - <name>CONTACT_ID</name> - <documentation>%aditoprj%/entity/Offer_entity/entityfields/contact_id/documentation.adoc</documentation> - <title>Assignment</title> - <consumer>AnyContacts</consumer> - <linkedContextProcess>%aditoprj%/entity/Offer_entity/entityfields/contact_id/linkedContextProcess.js</linkedContextProcess> - <mandatory v="true" /> - <stateProcess>%aditoprj%/entity/Offer_entity/entityfields/contact_id/stateProcess.js</stateProcess> - <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/contact_id/valueProcess.js</valueProcess> - <displayValueProcess>%aditoprj%/entity/Offer_entity/entityfields/contact_id/displayValueProcess.js</displayValueProcess> - <onValueChange>%aditoprj%/entity/Offer_entity/entityfields/contact_id/onValueChange.js</onValueChange> - <onValueChangeTypes> - <element>MASK</element> - <element>PROCESS</element> - <element>PROCESS_SETVALUE</element> - </onValueChangeTypes> - </entityField> - <entityParameter> - <name>PossibleConnectionTypes</name> - <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/possibleconnectiontypes/valueProcess.js</valueProcess> - <expose v="true" /> - </entityParameter> - </entityFields> - <recordContainers> - <dbRecordContainer> - <name>db</name> - <alias>Data_alias</alias> - <maximumDbRows v="0" /> - <fromClauseProcess>%aditoprj%/entity/Offer_entity/recordcontainers/db/fromClauseProcess.js</fromClauseProcess> - <conditionProcess>%aditoprj%/entity/Offer_entity/recordcontainers/db/conditionProcess.js</conditionProcess> - <orderClauseProcess>%aditoprj%/entity/Offer_entity/recordcontainers/db/orderClauseProcess.js</orderClauseProcess> - <onDBInsert>%aditoprj%/entity/Offer_entity/recordcontainers/db/onDBInsert.js</onDBInsert> - <onDBDelete>%aditoprj%/entity/Offer_entity/recordcontainers/db/onDBDelete.js</onDBDelete> - <linkInformation> - <linkInformation> - <name>681f6893-d11a-430c-a8ca-87215054d86f</name> - <tableName>OFFER</tableName> - <primaryKey>OFFERID</primaryKey> - <isUIDTable v="true" /> - <readonly v="false" /> - </linkInformation> - <linkInformation> - <name>acdf69f0-c6ad-431a-90c7-5bd0b3dc3d8e</name> - <tableName>CONTACT</tableName> - <primaryKey>CONTACTID</primaryKey> - <isUIDTable v="false" /> - <readonly v="true" /> - </linkInformation> - <linkInformation> - <name>b129928e-886e-4482-99da-463135008fef</name> - <tableName>SALESPROJECT</tableName> - <primaryKey>SALESPROJECTID</primaryKey> - <isUIDTable v="false" /> - <readonly v="true" /> - </linkInformation> - </linkInformation> - <recordFieldMappings> - <dbRecordFieldMapping> - <name>CURRENCY.value</name> - <recordfield>OFFER.CURRENCY</recordfield> - </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>HEADER.value</name> - <recordfield>OFFER.HEADER</recordfield> - </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>LANGUAGE.value</name> - <recordfield>OFFER.LANGUAGE</recordfield> - </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>NET.value</name> - <recordfield>OFFER.NET</recordfield> - </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>OFFERCODE.value</name> - <recordfield>OFFER.OFFERCODE</recordfield> - </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>OFFERDATE.value</name> - <recordfield>OFFER.OFFERDATE</recordfield> - </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>OFFERID.value</name> - <recordfield>OFFER.OFFERID</recordfield> - </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>PROBABILITY.value</name> - <recordfield>OFFER.PROBABILITY</recordfield> - </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>STATUS.value</name> - <recordfield>OFFER.STATUS</recordfield> - </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>VAT.value</name> - <recordfield>OFFER.VAT</recordfield> - </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>VERSNR.value</name> - <recordfield>OFFER.VERSNR</recordfield> - </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>CONTACT_ORG_ID.value</name> - <recordfield>CONTACT.ORGANISATION_ID</recordfield> - </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>CONTACT_PERSON_ID.value</name> - <recordfield>CONTACT.PERSON_ID</recordfield> - </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>ADDRESS.value</name> - <recordfield>OFFER.ADDRESS</recordfield> - </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>CURRENCY.displayValue</name> - <expression>%aditoprj%/entity/Offer_entity/recordcontainers/db/recordfieldmappings/currency.displayvalue/expression.js</expression> - </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>STATUS.displayValue</name> - <expression>%aditoprj%/entity/Offer_entity/recordcontainers/db/recordfieldmappings/status.displayvalue/expression.js</expression> - </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>LANGUAGE.displayValue</name> - <expression>%aditoprj%/entity/Offer_entity/recordcontainers/db/recordfieldmappings/language.displayvalue/expression.js</expression> - </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>PROBABILITY.displayValue</name> - <expression>%aditoprj%/entity/Offer_entity/recordcontainers/db/recordfieldmappings/probability.displayvalue/expression.js</expression> - </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>PAYMENTTERMS.value</name> - <recordfield>OFFER.PAYMENTTERMS</recordfield> - </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>DELIVERYTERMS.value</name> - <recordfield>OFFER.DELIVERYTERMS</recordfield> - </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>DELIVERYTERMS.displayValue</name> - <expression>%aditoprj%/entity/Offer_entity/recordcontainers/db/recordfieldmappings/deliveryterms.displayvalue/expression.js</expression> - </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>PAYMENTTERMS.displayValue</name> - <expression>%aditoprj%/entity/Offer_entity/recordcontainers/db/recordfieldmappings/paymentterms.displayvalue/expression.js</expression> - </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>INFO.value</name> - <recordfield>OFFER.INFO</recordfield> - </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>USER_NEW.value</name> - <recordfield>OFFER.USER_NEW</recordfield> - </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>USER_EDIT.value</name> - <recordfield>OFFER.USER_EDIT</recordfield> - </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>DATE_NEW.value</name> - <recordfield>OFFER.DATE_NEW</recordfield> - </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>DATE_EDIT.value</name> - <recordfield>OFFER.DATE_EDIT</recordfield> - </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>OBJECT_ROWID.value</name> - <recordfield>OFFER.OBJECT_ROWID</recordfield> - </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>FOOTER.value</name> - <recordfield>OFFER.FOOTER</recordfield> - </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>OBJECT_TYPE.value</name> - <recordfield>OFFER.OBJECT_TYPE</recordfield> - </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>OBJECT_ROWID.displayValue</name> - <expression>%aditoprj%/entity/Offer_entity/recordcontainers/db/recordfieldmappings/object_rowid.displayvalue/expression.js</expression> - </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>CONTACT_ID.value</name> - <recordfield>OFFER.CONTACT_ID</recordfield> - </dbRecordFieldMapping> - </recordFieldMappings> - </dbRecordContainer> - </recordContainers> -</entity> +<?xml version="1.0" encoding="UTF-8"?> +<entity xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.3.6" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.3.6"> + <name>Offer_entity</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <documentation>%aditoprj%/entity/Offer_entity/documentation.adoc</documentation> + <title>Offer</title> + <afterUiInit>%aditoprj%/entity/Offer_entity/afterUiInit.js</afterUiInit> + <iconId>VAADIN:CART</iconId> + <recordContainer>db</recordContainer> + <entityFields> + <entityProvider> + <name>#PROVIDER</name> + <dependencies> + <entityDependency> + <name>f909c251-16c1-49e2-9b43-6d5f834137c6</name> + <entityName>Object_entity</entityName> + <fieldName>Offers</fieldName> + <isConsumer v="false" /> + </entityDependency> + </dependencies> + </entityProvider> + <entityField> + <name>CURRENCY</name> + <title>Currency</title> + <consumer>KeywordCurrencies</consumer> + <mandatory v="true" /> + <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/currency/valueProcess.js</valueProcess> + <displayValueProcess>%aditoprj%/entity/Offer_entity/entityfields/currency/displayValueProcess.js</displayValueProcess> + </entityField> + <entityField> + <name>OFFERCODE</name> + <documentation>%aditoprj%/entity/Offer_entity/entityfields/offercode/documentation.adoc</documentation> + <title>Offer number</title> + <state>READONLY</state> + <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/offercode/valueProcess.js</valueProcess> + <onValidation>%aditoprj%/entity/Offer_entity/entityfields/offercode/onValidation.js</onValidation> + </entityField> + <entityField> + <name>OFFERDATE</name> + <title>Date</title> + <contentType>DATE</contentType> + <resolution>DAY</resolution> + <outputFormat>dd.MM.yyyy</outputFormat> + <inputFormat>dd.MM.yyyy</inputFormat> + <mandatory v="true" /> + <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/offerdate/valueProcess.js</valueProcess> + </entityField> + <entityField> + <name>OFFERID</name> + <searchable v="false" /> + <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/offerid/valueProcess.js</valueProcess> + </entityField> + <entityField> + <name>PROBABILITY</name> + <title>Probability</title> + <consumer>KeywordProbabilities</consumer> + <contentType>NUMBER</contentType> + <displayValueProcess>%aditoprj%/entity/Offer_entity/entityfields/probability/displayValueProcess.js</displayValueProcess> + </entityField> + <entityField> + <name>STATUS</name> + <title>Status</title> + <consumer>KeywordOfferStates</consumer> + <mandatory v="true" /> + <state>EDITABLE</state> + <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/status/valueProcess.js</valueProcess> + <displayValueProcess>%aditoprj%/entity/Offer_entity/entityfields/status/displayValueProcess.js</displayValueProcess> + </entityField> + <entityField> + <name>VAT</name> + <title>Total VAT</title> + <contentType>NUMBER</contentType> + <inputFormat>#,##0.00</inputFormat> + <state>READONLY</state> + <displayValueProcess>%aditoprj%/entity/Offer_entity/entityfields/vat/displayValueProcess.js</displayValueProcess> + </entityField> + <entityField> + <name>IMAGE</name> + <contentType>IMAGE</contentType> + <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/image/valueProcess.js</valueProcess> + </entityField> + <entityField> + <name>HEADER</name> + <title>Header text</title> + <contentType>LONG_TEXT</contentType> + <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/header/valueProcess.js</valueProcess> + </entityField> + <entityConsumer> + <name>Offeritems</name> + <description></description> + <dependency> + <name>dependency</name> + <entityName>Offeritem_entity</entityName> + <fieldName>OfferItems</fieldName> + </dependency> + <children> + <entityParameter> + <name>OfferId_param</name> + <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/offeritems/children/offerid_param/valueProcess.js</valueProcess> + <expose v="true" /> + <triggerRecalculation v="true" /> + <mandatory v="true" /> + </entityParameter> + <entityParameter> + <name>Currency_param</name> + <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/offeritems/children/currency_param/valueProcess.js</valueProcess> + <expose v="true" /> + <triggerRecalculation v="true" /> + </entityParameter> + <entityParameter> + <name>ContactId_param</name> + <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/offeritems/children/ContactId_param/valueProcess.js</valueProcess> + <expose v="true" /> + <triggerRecalculation v="true" /> + <mandatory v="true" /> + </entityParameter> + <entityParameter> + <name>OfferStatus_param</name> + <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/offeritems/children/offerstatus_param/valueProcess.js</valueProcess> + <expose v="true" /> + <triggerRecalculation v="true" /> + <mandatory v="true" /> + </entityParameter> + </children> + </entityConsumer> + <entityActionField> + <name>newOfferVersion</name> + <title>New offer version</title> + <onActionProcess>%aditoprj%/entity/Offer_entity/entityfields/newofferversion/onActionProcess.js</onActionProcess> + <iconId>VAADIN:CART</iconId> + </entityActionField> + <entityField> + <name>NET</name> + <title>Total net</title> + <contentType>NUMBER</contentType> + <inputFormat>#,##0.00</inputFormat> + <state>READONLY</state> + <displayValueProcess>%aditoprj%/entity/Offer_entity/entityfields/net/displayValueProcess.js</displayValueProcess> + </entityField> + <entityField> + <name>TotalGross</name> + <documentation>%aditoprj%/entity/Offer_entity/entityfields/totalgross/documentation.adoc</documentation> + <title>Total gross</title> + <contentType>NUMBER</contentType> + <inputFormat>#,##0.00</inputFormat> + <state>READONLY</state> + <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/totalgross/valueProcess.js</valueProcess> + <displayValueProcess>%aditoprj%/entity/Offer_entity/entityfields/totalgross/displayValueProcess.js</displayValueProcess> + </entityField> + <entityField> + <name>LANGUAGE</name> + <title>Language</title> + <consumer>Languages</consumer> + <mandatory v="true" /> + <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/language/valueProcess.js</valueProcess> + <displayValueProcess>%aditoprj%/entity/Offer_entity/entityfields/language/displayValueProcess.js</displayValueProcess> + </entityField> + <entityActionField> + <name>copyOffer</name> + <title>Copy offer</title> + <onActionProcess>%aditoprj%/entity/Offer_entity/entityfields/copyoffer/onActionProcess.js</onActionProcess> + <iconId>VAADIN:COPY</iconId> + </entityActionField> + <entityField> + <name>VERSNR</name> + <documentation>%aditoprj%/entity/Offer_entity/entityfields/versnr/documentation.adoc</documentation> + <title>Vers. no.</title> + <state>READONLY</state> + <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/versnr/valueProcess.js</valueProcess> + </entityField> + <entityField> + <name>OFFER_ID</name> + <documentation>%aditoprj%/entity/Offer_entity/entityfields/offer_id/documentation.adoc</documentation> + </entityField> + <entityFieldGroup> + <name>OfferCode_VersNr_fieldgroup</name> + <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/offercode_versnr_fieldgroup/valueProcess.js</valueProcess> + <title>Offer number</title> + <description>Offercode + VersNr</description> + <state>READONLY</state> + <fields> + <element>OFFERCODE</element> + <element>VERSNR</element> + </fields> + </entityFieldGroup> + <entityParameter> + <name>ContactId_param</name> + <expose v="true" /> + <triggerRecalculation v="true" /> + <mandatory v="true" /> + <description>PARAMETER</description> + </entityParameter> + <entityActionField> + <name>printOffer</name> + <title>Print Offer</title> + <onActionProcess>%aditoprj%/entity/Offer_entity/entityfields/printoffer/onActionProcess.js</onActionProcess> + <iconId>VAADIN:FILE_TEXT_O</iconId> + <stateProcess>%aditoprj%/entity/Offer_entity/entityfields/printoffer/stateProcess.js</stateProcess> + </entityActionField> + <entityField> + <name>CONTACT_ORG_ID</name> + <searchable v="false" /> + </entityField> + <entityField> + <name>CONTACT_PERSON_ID</name> + <searchable v="false" /> + </entityField> + <entityConsumer> + <name>AnyContacts</name> + <dependency> + <name>dependency</name> + <entityName>AnyContact_entity</entityName> + <fieldName>OnlySameCompany</fieldName> + </dependency> + <children> + <entityParameter> + <name>ContactId_param</name> + <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/anycontacts/children/contactid_param/valueProcess.js</valueProcess> + </entityParameter> + </children> + </entityConsumer> + <entityConsumer> + <name>Documents</name> + <dependency> + <name>dependency</name> + <entityName>Document_entity</entityName> + <fieldName>Documents</fieldName> + </dependency> + <children> + <entityParameter> + <name>AssignmentRowId_param</name> + <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/documents/children/assignmentrowid_param/valueProcess.js</valueProcess> + </entityParameter> + <entityParameter> + <name>AssignmentTable_param</name> + <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/documents/children/assignmenttable_param/valueProcess.js</valueProcess> + </entityParameter> + </children> + </entityConsumer> + <entityConsumer> + <name>MainDocuments</name> + <stateProcess>%aditoprj%/entity/Offer_entity/entityfields/maindocuments/stateProcess.js</stateProcess> + <dependency> + <name>dependency</name> + <entityName>Document_entity</entityName> + <fieldName>MainDocuments</fieldName> + </dependency> + <children> + <entityParameter> + <name>AssignmentRowId_param</name> + <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/maindocuments/children/assignmentrowid_param/valueProcess.js</valueProcess> + </entityParameter> + <entityParameter> + <name>AssignmentTable_param</name> + <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/maindocuments/children/assignmenttable_param/valueProcess.js</valueProcess> + </entityParameter> + </children> + </entityConsumer> + <entityField> + <name>ADDRESS</name> + <documentation>%aditoprj%/entity/Offer_entity/entityfields/address/documentation.adoc</documentation> + <title>Address</title> + <description></description> + <contentType>LONG_TEXT</contentType> + <mandatory v="true" /> + <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/address/valueProcess.js</valueProcess> + </entityField> + <entityField> + <name>ChosenAddress</name> + <title>Choose address</title> + <consumer>PossibleAddresses</consumer> + <stateProcess>%aditoprj%/entity/Offer_entity/entityfields/chosenaddress/stateProcess.js</stateProcess> + <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/chosenaddress/valueProcess.js</valueProcess> + <displayValueProcess>%aditoprj%/entity/Offer_entity/entityfields/chosenaddress/displayValueProcess.js</displayValueProcess> + <onValueChange>%aditoprj%/entity/Offer_entity/entityfields/chosenaddress/onValueChange.js</onValueChange> + <onValueChangeTypes> + <element>MASK</element> + <element>PROCESS</element> + </onValueChangeTypes> + </entityField> + <entityConsumer> + <name>KeywordCurrencies</name> + <dependency> + <name>dependency</name> + <entityName>KeywordEntry_entity</entityName> + <fieldName>SpecificContainerKeywords</fieldName> + </dependency> + <children> + <entityParameter> + <name>ContainerName_param</name> + <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/keywordcurrencies/children/containername_param/valueProcess.js</valueProcess> + <expose v="false" /> + </entityParameter> + </children> + </entityConsumer> + <entityConsumer> + <name>KeywordOfferStates</name> + <dependency> + <name>dependency</name> + <entityName>KeywordEntry_entity</entityName> + <fieldName>SpecificContainerKeywords</fieldName> + </dependency> + <children> + <entityParameter> + <name>ContainerName_param</name> + <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/keywordofferstates/children/containername_param/valueProcess.js</valueProcess> + <expose v="false" /> + </entityParameter> + </children> + </entityConsumer> + <entityActionField> + <name>newOrder</name> + <title>Create receipt</title> + <onActionProcess>%aditoprj%/entity/Offer_entity/entityfields/neworder/onActionProcess.js</onActionProcess> + <iconId>VAADIN:DOLLAR</iconId> + </entityActionField> + <entityConsumer> + <name>Languages</name> + <dependency> + <name>dependency</name> + <entityName>Language_entity</entityName> + <fieldName>ISO3Name</fieldName> + </dependency> + </entityConsumer> + <entityConsumer> + <name>KeywordProbabilities</name> + <dependency> + <name>dependency</name> + <entityName>KeywordEntry_entity</entityName> + <fieldName>SpecificContainerKeywords</fieldName> + </dependency> + <children> + <entityParameter> + <name>ContainerName_param</name> + <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/keywordprobabilities/children/containername_param/valueProcess.js</valueProcess> + <expose v="false" /> + </entityParameter> + </children> + </entityConsumer> + <entityConsumer> + <name>Activities</name> + <dependency> + <name>dependency</name> + <entityName>Activity_entity</entityName> + <fieldName>LinkedObjects</fieldName> + </dependency> + <children> + <entityParameter> + <name>ObjectId_param</name> + <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/activities/children/objectid_param/valueProcess.js</valueProcess> + </entityParameter> + <entityParameter> + <name>RowId_param</name> + <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/activities/children/rowid_param/valueProcess.js</valueProcess> + </entityParameter> + <entityParameter> + <name>PresetLinks_param</name> + <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/activities/children/presetlinks_param/valueProcess.js</valueProcess> + </entityParameter> + </children> + </entityConsumer> + <entityActionField> + <name>newActivity</name> + <title>New activity</title> + <onActionProcess>%aditoprj%/entity/Offer_entity/entityfields/newactivity/onActionProcess.js</onActionProcess> + <iconId>VAADIN:HOURGLASS_END</iconId> + <tooltip>New activity</tooltip> + <tooltipProcess>%aditoprj%/entity/Offer_entity/entityfields/newactivity/tooltipProcess.js</tooltipProcess> + </entityActionField> + <entityProvider> + <name>ContactOffers</name> + <dependencies> + <entityDependency> + <name>5c9720b5-1288-4a30-88fd-6dcff6359083</name> + <entityName>Person_entity</entityName> + <fieldName>Offers</fieldName> + <isConsumer v="false" /> + </entityDependency> + <entityDependency> + <name>b308795f-3c81-4e60-99ca-3b5f8e82f62a</name> + <entityName>Organisation_entity</entityName> + <fieldName>Offers</fieldName> + <isConsumer v="false" /> + </entityDependency> + </dependencies> + <children> + <entityParameter> + <name>ContactId_param</name> + <expose v="true" /> + </entityParameter> + <entityParameter> + <name>SalesprojectId_param</name> + <expose v="false" /> + </entityParameter> + <entityParameter> + <name>OfferLanguage_param</name> + <expose v="false" /> + </entityParameter> + <entityParameter> + <name>ObjectRowId_param</name> + <expose v="false" /> + </entityParameter> + <entityParameter> + <name>OfferCode_param</name> + <expose v="false" /> + </entityParameter> + <entityParameter> + <name>OfferAddress_param</name> + <expose v="false" /> + </entityParameter> + <entityParameter> + <name>OfferCurrency_param</name> + <expose v="false" /> + </entityParameter> + <entityParameter> + <name>OfferDeliveryTerm_param</name> + <expose v="false" /> + </entityParameter> + <entityParameter> + <name>OfferHeader_param</name> + <expose v="true" /> + </entityParameter> + <entityParameter> + <name>OfferOriginal_Id_param</name> + <expose v="true" /> + </entityParameter> + <entityParameter> + <name>OfferPaymentTerm_param</name> + <expose v="false" /> + </entityParameter> + <entityParameter> + <name>OfferVersnr_param</name> + <expose v="false" /> + </entityParameter> + <entityParameter> + <name>PossibleConnectionTypes</name> + <expose v="false" /> + </entityParameter> + </children> + </entityProvider> + <entityParameter> + <name>OfferCurrency_param</name> + <expose v="true" /> + <triggerRecalculation v="true" /> + <mandatory v="false" /> + <description>PARAMETER</description> + </entityParameter> + <entityParameter> + <name>OfferLanguage_param</name> + <expose v="true" /> + <triggerRecalculation v="true" /> + <mandatory v="false" /> + <description>PARAMETER</description> + </entityParameter> + <entityParameter> + <name>OfferHeader_param</name> + <expose v="true" /> + <triggerRecalculation v="true" /> + <mandatory v="false" /> + <description>PARAMETER</description> + </entityParameter> + <entityParameter> + <name>OfferOriginal_Id_param</name> + <expose v="true" /> + <triggerRecalculation v="true" /> + <mandatory v="false" /> + <description>PARAMETER</description> + </entityParameter> + <entityParameter> + <name>OfferAddress_param</name> + <expose v="true" /> + <triggerRecalculation v="true" /> + <mandatory v="false" /> + <description>PARAMETER</description> + </entityParameter> + <entityParameter> + <name>OfferCode_param</name> + <expose v="true" /> + <triggerRecalculation v="true" /> + <mandatory v="false" /> + <description>PARAMETER</description> + </entityParameter> + <entityParameter> + <name>OfferVersnr_param</name> + <expose v="true" /> + <triggerRecalculation v="true" /> + <mandatory v="false" /> + <description>PARAMETER</description> + </entityParameter> + <entityActionField> + <name>newTask</name> + <title>New task</title> + <onActionProcess>%aditoprj%/entity/Offer_entity/entityfields/newtask/onActionProcess.js</onActionProcess> + <iconId>VAADIN:TASKS</iconId> + </entityActionField> + <entityField> + <name>PAYMENTTERMS</name> + <title>Payment term</title> + <consumer>KeywordPaymentTerm</consumer> + <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/paymentterms/valueProcess.js</valueProcess> + <displayValueProcess>%aditoprj%/entity/Offer_entity/entityfields/paymentterms/displayValueProcess.js</displayValueProcess> + </entityField> + <entityField> + <name>DELIVERYTERMS</name> + <title>Delivery specification</title> + <consumer>KeywordDeliveryTerm</consumer> + <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/deliveryterms/valueProcess.js</valueProcess> + <displayValueProcess>%aditoprj%/entity/Offer_entity/entityfields/deliveryterms/displayValueProcess.js</displayValueProcess> + </entityField> + <entityConsumer> + <name>KeywordPaymentTerm</name> + <dependency> + <name>dependency</name> + <entityName>KeywordEntry_entity</entityName> + <fieldName>SpecificContainerKeywords</fieldName> + </dependency> + <children> + <entityParameter> + <name>ContainerName_param</name> + <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/keywordpaymentterm/children/containername_param/valueProcess.js</valueProcess> + </entityParameter> + </children> + </entityConsumer> + <entityConsumer> + <name>KeywordDeliveryTerm</name> + <dependency> + <name>dependency</name> + <entityName>KeywordEntry_entity</entityName> + <fieldName>SpecificContainerKeywords</fieldName> + </dependency> + <children> + <entityParameter> + <name>ContainerName_param</name> + <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/keyworddeliveryterm/children/containername_param/valueProcess.js</valueProcess> + </entityParameter> + </children> + </entityConsumer> + <entityConsumer> + <name>Tasks</name> + <stateProcess>%aditoprj%/entity/Offer_entity/entityfields/tasks/stateProcess.js</stateProcess> + <dependency> + <name>dependency</name> + <entityName>Task_entity</entityName> + <fieldName>Tasks</fieldName> + </dependency> + <children> + <entityParameter> + <name>RowId_param</name> + <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/tasks/children/rowid_param/valueProcess.js</valueProcess> + </entityParameter> + <entityParameter> + <name>ObjectId_param</name> + <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/tasks/children/objectid_param/valueProcess.js</valueProcess> + </entityParameter> + <entityParameter> + <name>PresetLinks_param</name> + <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/tasks/children/presetlinks_param/valueProcess.js</valueProcess> + </entityParameter> + </children> + </entityConsumer> + <entityField> + <name>INFO</name> + <title>Information</title> + <contentType>LONG_TEXT</contentType> + </entityField> + <entityConsumer> + <name>Attributes</name> + <onValidation>%aditoprj%/entity/Offer_entity/entityfields/attributes/onValidation.js</onValidation> + <dependency> + <name>dependency</name> + <entityName>AttributeRelation_entity</entityName> + <fieldName>AttributeRelations</fieldName> + </dependency> + <children> + <entityParameter> + <name>ObjectRowId_param</name> + <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/attributes/children/objectrowid_param/valueProcess.js</valueProcess> + </entityParameter> + <entityParameter> + <name>ObjectType_param</name> + <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/attributes/children/objecttype_param/valueProcess.js</valueProcess> + </entityParameter> + </children> + </entityConsumer> + <entityParameter> + <name>OfferPaymentTerm_param</name> + <expose v="true" /> + <description>PARAMETER</description> + </entityParameter> + <entityParameter> + <name>OfferDeliveryTerm_param</name> + <expose v="true" /> + <description>PARAMETER</description> + </entityParameter> + <entityField> + <name>USER_NEW</name> + <searchable v="false" /> + <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/user_new/valueProcess.js</valueProcess> + </entityField> + <entityField> + <name>USER_EDIT</name> + <searchable v="false" /> + <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/user_edit/valueProcess.js</valueProcess> + </entityField> + <entityField> + <name>DATE_NEW</name> + <searchable v="false" /> + <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/date_new/valueProcess.js</valueProcess> + </entityField> + <entityField> + <name>DATE_EDIT</name> + <searchable v="false" /> + <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/date_edit/valueProcess.js</valueProcess> + </entityField> + <entityField> + <name>FullOfferCode</name> + <title>Offer number</title> + <state>READONLY</state> + <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/fulloffercode/valueProcess.js</valueProcess> + </entityField> + <entityConsumer> + <name>PossibleAddresses</name> + <dependency> + <name>dependency</name> + <entityName>Address_entity</entityName> + <fieldName>OrganisationAndContactAddresses</fieldName> + </dependency> + <children> + <entityParameter> + <name>ContactId_param</name> + <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/possibleaddresses/children/contactid_param/valueProcess.js</valueProcess> + </entityParameter> + </children> + </entityConsumer> + <entityField> + <name>ChoosenTEXHeader</name> + <title>Choose Header</title> + <consumer>DocumentTemplateTexHeader</consumer> + </entityField> + <entityField> + <name>OBJECT_ROWID</name> + <title>Connection</title> + <consumer>Objects</consumer> + <linkedContextProcess>%aditoprj%/entity/Offer_entity/entityfields/object_rowid/linkedContextProcess.js</linkedContextProcess> + <mandatoryProcess>%aditoprj%/entity/Offer_entity/entityfields/object_rowid/mandatoryProcess.js</mandatoryProcess> + <state>AUTO</state> + <stateProcess>%aditoprj%/entity/Offer_entity/entityfields/object_rowid/stateProcess.js</stateProcess> + <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/object_rowid/valueProcess.js</valueProcess> + <displayValueProcess>%aditoprj%/entity/Offer_entity/entityfields/object_rowid/displayValueProcess.js</displayValueProcess> + </entityField> + <entityField> + <name>OBJECT_TYPE</name> + <title>Connection Type</title> + <consumer>Contexts</consumer> + <mandatoryProcess>%aditoprj%/entity/Offer_entity/entityfields/object_type/mandatoryProcess.js</mandatoryProcess> + <state>INVISIBLE</state> + <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/object_type/valueProcess.js</valueProcess> + <displayValueProcess>%aditoprj%/entity/Offer_entity/entityfields/object_type/displayValueProcess.js</displayValueProcess> + </entityField> + <entityConsumer> + <name>Objects</name> + <dependency> + <name>dependency</name> + <entityName>Object_entity</entityName> + <fieldName>FilteredObjects</fieldName> + </dependency> + <children> + <entityParameter> + <name>ObjectType_param</name> + <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/objects/children/objecttype_param/valueProcess.js</valueProcess> + </entityParameter> + <entityParameter> + <name>ContactId_param</name> + <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/objects/children/contactid_param/valueProcess.js</valueProcess> + <triggerRecalculation v="true" /> + </entityParameter> + </children> + </entityConsumer> + <entityConsumer> + <name>Contexts</name> + <dependency> + <name>dependency</name> + <entityName>Context_entity</entityName> + <fieldName>Context</fieldName> + </dependency> + <children> + <entityParameter> + <name>Whitelist</name> + <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/contexts/children/whitelist/valueProcess.js</valueProcess> + </entityParameter> + </children> + </entityConsumer> + <entityProvider> + <name>Links</name> + <recordContainer>db</recordContainer> + <dependencies> + <entityDependency> + <name>88a166e6-ccd0-4d51-b554-e3327f66d834</name> + <entityName>Salesproject_entity</entityName> + <fieldName>Offers</fieldName> + <isConsumer v="false" /> + </entityDependency> + </dependencies> + <children> + <entityParameter> + <name>OfferDeliveryTerm_param</name> + <expose v="false" /> + </entityParameter> + <entityParameter> + <name>OfferCode_param</name> + <expose v="false" /> + </entityParameter> + <entityParameter> + <name>OfferOriginal_Id_param</name> + <expose v="false" /> + </entityParameter> + <entityParameter> + <name>ContactId_param</name> + <expose v="false" /> + </entityParameter> + <entityParameter> + <name>ObjectRowId_param</name> + <expose v="true" /> + </entityParameter> + <entityParameter> + <name>ObjectType_param</name> + <expose v="true" /> + </entityParameter> + <entityParameter> + <name>OfferAddress_param</name> + <expose v="false" /> + </entityParameter> + <entityParameter> + <name>OfferCurrency_param</name> + <expose v="false" /> + </entityParameter> + <entityParameter> + <name>OfferHeader_param</name> + <expose v="false" /> + </entityParameter> + <entityParameter> + <name>OfferLanguage_param</name> + <expose v="false" /> + </entityParameter> + <entityParameter> + <name>OfferPaymentTerm_param</name> + <expose v="false" /> + </entityParameter> + <entityParameter> + <name>OfferVersnr_param</name> + <expose v="false" /> + </entityParameter> + <entityParameter> + <name>PossibleConnectionTypes</name> + <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/links/children/possibleconnectiontypes/valueProcess.js</valueProcess> + <expose v="false" /> + </entityParameter> + </children> + </entityProvider> + <entityParameter> + <name>ObjectRowId_param</name> + <expose v="true" /> + <triggerRecalculation v="true" /> + <description>PARAMETER</description> + </entityParameter> + <entityParameter> + <name>ObjectType_param</name> + <expose v="true" /> + <description>PARAMETER</description> + </entityParameter> + <entityField> + <name>chooseTEXHeader</name> + <consumer>DocumentTemplateTex</consumer> + </entityField> + <entityConsumer> + <name>DocumentTemplateTexHeader</name> + <dependency> + <name>dependency</name> + <entityName>DocumentTemplate_entity</entityName> + <fieldName>DocumentTemplateProvider</fieldName> + </dependency> + <children> + <entityParameter> + <name>DocumentTemplateType_param</name> + <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/documenttemplatetexheader/children/documenttemplatetype_param/valueProcess.js</valueProcess> + </entityParameter> + <entityParameter> + <name>DocumentTemplateTypeClassification_param</name> + <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/documenttemplatetexheader/children/documenttemplatetypeclassification_param/valueProcess.js</valueProcess> + </entityParameter> + </children> + </entityConsumer> + <entityConsumer> + <name>LogHistoryConsumer</name> + <dependency> + <name>dependency</name> + <entityName>LogHistory_entity</entityName> + <fieldName>LogHistoryProvider</fieldName> + </dependency> + <children> + <entityParameter> + <name>tablenames_param</name> + <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/loghistoryconsumer/children/tablenames_param/valueProcess.js</valueProcess> + </entityParameter> + </children> + </entityConsumer> + <entityField> + <name>FOOTER</name> + <title>Footer text</title> + <contentType>LONG_TEXT</contentType> + <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/footer/valueProcess.js</valueProcess> + </entityField> + <entityParameter> + <name>OfferFooter_param</name> + <expose v="true" /> + <triggerRecalculation v="true" /> + <description>PARAMETER</description> + </entityParameter> + <entityField> + <name>ChoosenTEXFooter</name> + <title>Choose Footer</title> + <consumer>DocumentTemplateTexFooter</consumer> + </entityField> + <entityConsumer> + <name>DocumentTemplateTexFooter</name> + <dependency> + <name>dependency</name> + <entityName>DocumentTemplate_entity</entityName> + <fieldName>DocumentTemplateProvider</fieldName> + </dependency> + <children> + <entityParameter> + <name>DocumentTemplateType_param</name> + <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/documenttemplatetexfooter/children/documenttemplatetype_param/valueProcess.js</valueProcess> + </entityParameter> + <entityParameter> + <name>DocumentTemplateTypeClassification_param</name> + <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/documenttemplatetexfooter/children/documenttemplatetypeclassification_param/valueProcess.js</valueProcess> + </entityParameter> + </children> + </entityConsumer> + <entityConsumer> + <name>Salesprojects</name> + <dependency> + <name>dependency</name> + <entityName>Salesproject_entity</entityName> + <fieldName>Salesprojects</fieldName> + </dependency> + <children> + <entityParameter> + <name>ContactId_param</name> + <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/salesprojects/children/contactid_param/valueProcess.js</valueProcess> + </entityParameter> + </children> + </entityConsumer> + <entityField> + <name>CONTACT_ID</name> + <documentation>%aditoprj%/entity/Offer_entity/entityfields/contact_id/documentation.adoc</documentation> + <title>Assignment</title> + <consumer>AnyContacts</consumer> + <linkedContextProcess>%aditoprj%/entity/Offer_entity/entityfields/contact_id/linkedContextProcess.js</linkedContextProcess> + <mandatory v="true" /> + <stateProcess>%aditoprj%/entity/Offer_entity/entityfields/contact_id/stateProcess.js</stateProcess> + <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/contact_id/valueProcess.js</valueProcess> + <displayValueProcess>%aditoprj%/entity/Offer_entity/entityfields/contact_id/displayValueProcess.js</displayValueProcess> + <onValueChange>%aditoprj%/entity/Offer_entity/entityfields/contact_id/onValueChange.js</onValueChange> + <onValueChangeTypes> + <element>MASK</element> + <element>PROCESS</element> + <element>PROCESS_SETVALUE</element> + </onValueChangeTypes> + </entityField> + <entityParameter> + <name>PossibleConnectionTypes</name> + <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/possibleconnectiontypes/valueProcess.js</valueProcess> + <expose v="true" /> + </entityParameter> + </entityFields> + <recordContainers> + <dbRecordContainer> + <name>db</name> + <alias>Data_alias</alias> + <maximumDbRows v="0" /> + <fromClauseProcess>%aditoprj%/entity/Offer_entity/recordcontainers/db/fromClauseProcess.js</fromClauseProcess> + <conditionProcess>%aditoprj%/entity/Offer_entity/recordcontainers/db/conditionProcess.js</conditionProcess> + <orderClauseProcess>%aditoprj%/entity/Offer_entity/recordcontainers/db/orderClauseProcess.js</orderClauseProcess> + <onDBInsert>%aditoprj%/entity/Offer_entity/recordcontainers/db/onDBInsert.js</onDBInsert> + <onDBDelete>%aditoprj%/entity/Offer_entity/recordcontainers/db/onDBDelete.js</onDBDelete> + <linkInformation> + <linkInformation> + <name>681f6893-d11a-430c-a8ca-87215054d86f</name> + <tableName>OFFER</tableName> + <primaryKey>OFFERID</primaryKey> + <isUIDTable v="true" /> + <readonly v="false" /> + </linkInformation> + <linkInformation> + <name>acdf69f0-c6ad-431a-90c7-5bd0b3dc3d8e</name> + <tableName>CONTACT</tableName> + <primaryKey>CONTACTID</primaryKey> + <isUIDTable v="false" /> + <readonly v="true" /> + </linkInformation> + <linkInformation> + <name>b129928e-886e-4482-99da-463135008fef</name> + <tableName>SALESPROJECT</tableName> + <primaryKey>SALESPROJECTID</primaryKey> + <isUIDTable v="false" /> + <readonly v="true" /> + </linkInformation> + </linkInformation> + <recordFieldMappings> + <dbRecordFieldMapping> + <name>CURRENCY.value</name> + <recordfield>OFFER.CURRENCY</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>HEADER.value</name> + <recordfield>OFFER.HEADER</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>LANGUAGE.value</name> + <recordfield>OFFER.LANGUAGE</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>NET.value</name> + <recordfield>OFFER.NET</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>OFFERCODE.value</name> + <recordfield>OFFER.OFFERCODE</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>OFFERDATE.value</name> + <recordfield>OFFER.OFFERDATE</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>OFFERID.value</name> + <recordfield>OFFER.OFFERID</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>PROBABILITY.value</name> + <recordfield>OFFER.PROBABILITY</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>STATUS.value</name> + <recordfield>OFFER.STATUS</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>VAT.value</name> + <recordfield>OFFER.VAT</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>VERSNR.value</name> + <recordfield>OFFER.VERSNR</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>CONTACT_ORG_ID.value</name> + <recordfield>CONTACT.ORGANISATION_ID</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>CONTACT_PERSON_ID.value</name> + <recordfield>CONTACT.PERSON_ID</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>ADDRESS.value</name> + <recordfield>OFFER.ADDRESS</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>CURRENCY.displayValue</name> + <expression>%aditoprj%/entity/Offer_entity/recordcontainers/db/recordfieldmappings/currency.displayvalue/expression.js</expression> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>STATUS.displayValue</name> + <expression>%aditoprj%/entity/Offer_entity/recordcontainers/db/recordfieldmappings/status.displayvalue/expression.js</expression> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>LANGUAGE.displayValue</name> + <expression>%aditoprj%/entity/Offer_entity/recordcontainers/db/recordfieldmappings/language.displayvalue/expression.js</expression> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>PROBABILITY.displayValue</name> + <expression>%aditoprj%/entity/Offer_entity/recordcontainers/db/recordfieldmappings/probability.displayvalue/expression.js</expression> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>PAYMENTTERMS.value</name> + <recordfield>OFFER.PAYMENTTERMS</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>DELIVERYTERMS.value</name> + <recordfield>OFFER.DELIVERYTERMS</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>DELIVERYTERMS.displayValue</name> + <expression>%aditoprj%/entity/Offer_entity/recordcontainers/db/recordfieldmappings/deliveryterms.displayvalue/expression.js</expression> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>PAYMENTTERMS.displayValue</name> + <expression>%aditoprj%/entity/Offer_entity/recordcontainers/db/recordfieldmappings/paymentterms.displayvalue/expression.js</expression> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>INFO.value</name> + <recordfield>OFFER.INFO</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>USER_NEW.value</name> + <recordfield>OFFER.USER_NEW</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>USER_EDIT.value</name> + <recordfield>OFFER.USER_EDIT</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>DATE_NEW.value</name> + <recordfield>OFFER.DATE_NEW</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>DATE_EDIT.value</name> + <recordfield>OFFER.DATE_EDIT</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>OBJECT_ROWID.value</name> + <recordfield>OFFER.OBJECT_ROWID</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>FOOTER.value</name> + <recordfield>OFFER.FOOTER</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>OBJECT_TYPE.value</name> + <recordfield>OFFER.OBJECT_TYPE</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>OBJECT_ROWID.displayValue</name> + <expression>%aditoprj%/entity/Offer_entity/recordcontainers/db/recordfieldmappings/object_rowid.displayvalue/expression.js</expression> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>CONTACT_ID.value</name> + <recordfield>OFFER.CONTACT_ID</recordfield> + </dbRecordFieldMapping> + </recordFieldMappings> + </dbRecordContainer> + </recordContainers> +</entity> diff --git a/entity/Offer_entity/entityfields/anycontacts/children/contactid_param/valueProcess.js b/entity/Offer_entity/entityfields/anycontacts/children/contactid_param/valueProcess.js new file mode 100644 index 0000000000..c41e20315c --- /dev/null +++ b/entity/Offer_entity/entityfields/anycontacts/children/contactid_param/valueProcess.js @@ -0,0 +1,17 @@ +import("system.result"); +import("system.vars"); + +var contactId = ""; +if (vars.exists("$param.ContactId_param") && vars.get("$param.ContactId_param")) { + contactId = vars.get("$param.ContactId_param"); +} +else if ((vars.exists("$param.ObjectType_param") + && vars.get("$param.ObjectType_param") + && vars.exists("$param.ObjectRowId_param") + && vars.get("$param.ObjectRowId_param"))) +{ + contactId = ContextUtils.getContactId(vars.get("$param.ObjectType_param"), vars.get("$param.ObjectRowId_param")); +} + +if (contactId) + result.string(contactId); \ No newline at end of file diff --git a/entity/Offer_entity/entityfields/contact_id/stateProcess.js b/entity/Offer_entity/entityfields/contact_id/stateProcess.js index 7631bbeeaf..f246db1172 100644 --- a/entity/Offer_entity/entityfields/contact_id/stateProcess.js +++ b/entity/Offer_entity/entityfields/contact_id/stateProcess.js @@ -1,6 +1,7 @@ -import("system.result"); -import("system.vars"); -import("system.neon"); - -if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_EDIT) +import("system.result"); +import("system.vars"); +import("system.neon"); + +if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_EDIT || + (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && vars.exists("$param.ContactId_param") && vars.get("$param.ContactId_param"))) result.string(neon.COMPONENTSTATE_READONLY); \ No newline at end of file diff --git a/entity/Offer_entity/entityfields/contact_id/valueProcess.js b/entity/Offer_entity/entityfields/contact_id/valueProcess.js index 6f7346fcc5..1fca2af19c 100644 --- a/entity/Offer_entity/entityfields/contact_id/valueProcess.js +++ b/entity/Offer_entity/entityfields/contact_id/valueProcess.js @@ -1,30 +1,30 @@ -import("system.logging"); -import("system.neon"); -import("system.db"); -import("system.result"); -import("system.vars"); -import("Sql_lib"); -import("Context_lib"); - -if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && !vars.get("$this.value")) -var contactId = ""; -if ((!vars.exists("$param.ContactId_param") || !vars.get("$param.ContactId_param")) - && (vars.exists("$param.ObjectType_param") - && vars.get("$param.ObjectType_param") - && vars.exists("$param.ObjectRowId_param") - && vars.get("$param.ObjectRowId_param"))) -{ - contactId = ContextUtils.getContactId(vars.get("$param.ObjectType_param"), vars.get("$param.ObjectRowId_param")) -} else if (vars.exists("$param.ContactId_param") && vars.get("$param.ContactId_param")) { - contactId = vars.get("$param.ContactId_param"); - -} -if (contactId) -{ - var relData = db.array(db.ROW, "select LANGUAGE from CONTACT where CONTACTID = '" + contactId + "'"); - - if(relData[0] != "") - neon.setFieldValue("field.LANGUAGE", relData[0]); - - result.string(contactId); +import("system.logging"); +import("system.neon"); +import("system.db"); +import("system.result"); +import("system.vars"); +import("Sql_lib"); +import("Context_lib"); + +if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && !vars.get("$this.value")) +var contactId = ""; +if ((!vars.exists("$param.ContactId_param") || !vars.get("$param.ContactId_param")) + && (vars.exists("$param.ObjectType_param") + && vars.get("$param.ObjectType_param") + && vars.exists("$param.ObjectRowId_param") + && vars.get("$param.ObjectRowId_param"))) +{ + contactId = ContextUtils.getContactId(vars.get("$param.ObjectType_param"), vars.get("$param.ObjectRowId_param")) +} else if (vars.exists("$param.ContactId_param") && vars.get("$param.ContactId_param")) { + contactId = vars.get("$param.ContactId_param"); +} + +if (contactId) +{ + var relData = db.array(db.ROW, "select LANGUAGE from CONTACT where CONTACTID = '" + contactId + "'"); + + if(relData[0] != "") + neon.setFieldValue("field.LANGUAGE", relData[0]); + + result.string(contactId); } \ No newline at end of file diff --git a/entity/Offer_entity/entityfields/object_rowid/stateProcess.js b/entity/Offer_entity/entityfields/object_rowid/stateProcess.js index b2fa469697..68e51e8c39 100644 --- a/entity/Offer_entity/entityfields/object_rowid/stateProcess.js +++ b/entity/Offer_entity/entityfields/object_rowid/stateProcess.js @@ -1,17 +1,17 @@ -import("system.neon"); -import("system.result"); -import("system.vars"); -import("Entity_lib"); - -switch (vars.get("$sys.recordstate")) -{ - case neon.OPERATINGSTATE_NEW: - //only EDITABLE if $field.CONTACT_ID is set - if(ProcessHandlingUtils.getOnValidationValue(vars.get("$field.CONTACT_ID"))) - result.object(neon.COMPONENTSTATE_EDITABLE); - else - result.object(neon.COMPONENTSTATE_READONLY); - break; - default: - result.object(neon.COMPONENTSTATE_READONLY); -} +import("system.neon"); +import("system.result"); +import("system.vars"); +import("Entity_lib"); + +switch (vars.get("$sys.recordstate")) +{ + case neon.OPERATINGSTATE_NEW: + //only EDITABLE if $field.CONTACT_ID is set and not objectrowid preset + if(vars.get("$field.CONTACT_ID") && !(vars.exists("$param.ObjectRowId_param") && vars.get("$param.ObjectRowId_param") && vars.exists("$param.ObjectType_param") && vars.get("$param.ObjectType_param"))) + result.object(neon.COMPONENTSTATE_EDITABLE); + else + result.object(neon.COMPONENTSTATE_READONLY); + break; + default: + result.object(neon.COMPONENTSTATE_READONLY); +} -- GitLab