diff --git a/aliasDefinition/Data_alias/Data_alias.aod b/aliasDefinition/Data_alias/Data_alias.aod index c82ddacd864cd815761847db40073084396993d2..a9d3da0dbd20f1f02938514b9576bbb055a7da2c 100644 --- a/aliasDefinition/Data_alias/Data_alias.aod +++ b/aliasDefinition/Data_alias/Data_alias.aod @@ -4212,6 +4212,20 @@ <title></title> <description></description> </entityFieldDb> + <entityFieldDb> + <name>MEMO_VALUE</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="2005" /> + <size v="2147483647" /> + <scale v="0" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> </entityFields> </entityDb> <entityDb> diff --git a/entity/AttributeRelation_entity/AttributeRelation_entity.aod b/entity/AttributeRelation_entity/AttributeRelation_entity.aod index 1f7e5274dda4394bc11a1cd80c5db98d5764c046..b2ca6240fff820f9dfce0a30f1e2b2b1faa4c232 100644 --- a/entity/AttributeRelation_entity/AttributeRelation_entity.aod +++ b/entity/AttributeRelation_entity/AttributeRelation_entity.aod @@ -140,6 +140,9 @@ </entityParameter> </children> </entityConsumer> + <entityField> + <name>MEMO_VALUE</name> + </entityField> </entityFields> <recordContainers> <dbRecordContainer> @@ -204,6 +207,10 @@ <name>ATTRIBUTE_PARENT_ID.value</name> <recordfield>AB_ATTRIBUTE.ATTRIBUTE_PARENT_ID</recordfield> </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>MEMO_VALUE.value</name> + <recordfield>AB_ATTRIBUTERELATION.MEMO_VALUE</recordfield> + </dbRecordFieldMapping> </recordFieldMappings> </dbRecordContainer> </recordContainers> diff --git a/entity/AttributeRelation_entity/entityfields/attributerelation_value/valueProcess.js b/entity/AttributeRelation_entity/entityfields/attributerelation_value/valueProcess.js index 02b623bee27c07fcd8fe0235160a4d63845b0de1..4895956380293de93b3a437d1ab0e2e156d6e7ee 100644 --- a/entity/AttributeRelation_entity/entityfields/attributerelation_value/valueProcess.js +++ b/entity/AttributeRelation_entity/entityfields/attributerelation_value/valueProcess.js @@ -5,7 +5,7 @@ import("Attribute_lib"); if(vars.get("$sys.recordstate") != neon.OPERATINGSTATE_NEW) { - var attrType = AttributeHandler.begin(vars.get("$field.AB_ATTRIBUTE_ID")).getAttributeField(); + var attrType = AttributeHandler.begin(vars.get("$field.AB_ATTRIBUTE_ID")).getAttributeType(); var value = null; if (attrType != null) //load the value from the correct field for the type { @@ -26,7 +26,10 @@ if(vars.get("$sys.recordstate") != neon.OPERATINGSTATE_NEW) case $AttributeTypes.COMBO.toString(): case $AttributeTypes.KEYWORD.toString(): value = vars.get("$field.ID_VALUE"); - break; + break; + case $AttributeTypes.MEMO.toString(): + value = vars.get("$field.MEMO_VALUE"); + break; } } //var attrField = AttributeHandler.begin(vars.get("$field.AB_ATTRIBUTE_ID")).getAttributeField(); diff --git a/others/db_changes/data_alias/basic/2019.2/AditoBasic/init_AttributeType.xml b/others/db_changes/data_alias/basic/2019.2/AditoBasic/init_AttributeType.xml index b3d3d1c074c2e59fa64da7467af2ad0f982bf73a..3dc7188a6debc18f36c7cf02eb0e8630782a7137 100644 --- a/others/db_changes/data_alias/basic/2019.2/AditoBasic/init_AttributeType.xml +++ b/others/db_changes/data_alias/basic/2019.2/AditoBasic/init_AttributeType.xml @@ -10,6 +10,15 @@ <column name="ISACTIVE" valueNumeric="1"/> <column name="ISESSENTIAL" valueNumeric="1"/> </insert> + <insert tableName="AB_KEYWORD_ENTRY"> + <column name="AB_KEYWORD_ENTRYID" value="1fa94dc3-b875-4e95-9ec1-8cb714f058fb"/> + <column name="KEYID" value="MEMO"/> + <column name="TITLE" value="Memo"/> + <column name="CONTAINER" value="AttributeType"/> + <column name="SORTING" valueNumeric="8"/> + <column name="ISACTIVE" valueNumeric="1"/> + <column name="ISESSENTIAL" valueNumeric="1"/> + </insert> <rollback> <delete tableName="AB_KEYWORD_ENTRY"> <where>AB_KEYWORD_ENTRYID = ?</where> @@ -17,6 +26,12 @@ <param value="9d2f9605-1a5e-47d3-8920-168f5637e37f"/> </whereParams> </delete> + <delete tableName="AB_KEYWORD_ENTRY"> + <where>AB_KEYWORD_ENTRYID = ?</where> + <whereParams> + <param value="1fa94dc3-b875-4e95-9ec1-8cb714f058fb"/> + </whereParams> + </delete> </rollback> </changeSet> </databaseChangeLog> \ No newline at end of file diff --git a/others/db_changes/data_alias/basic/2019.2/AttributeKeyword.xml b/others/db_changes/data_alias/basic/2019.2/AttributeKeyword.xml index 4fe1d78f5b9c0f8025244a8000db944d82027bf8..a66ac3b370297109422637e54f1d0ed906b4ba9a 100644 --- a/others/db_changes/data_alias/basic/2019.2/AttributeKeyword.xml +++ b/others/db_changes/data_alias/basic/2019.2/AttributeKeyword.xml @@ -4,5 +4,8 @@ <addColumn tableName="AB_ATTRIBUTE"> <column name="KEYWORD_CONTAINER" type="VARCHAR(80)"/> </addColumn> + <addColumn tableName="AB_ATTRIBUTERELATION"> + <column name="MEMO_VALUE" type="NCLOB"/> + </addColumn> </changeSet> </databaseChangeLog> \ No newline at end of file diff --git a/process/Attribute_lib/process.js b/process/Attribute_lib/process.js index b961c693309c33cd1b67307c9f411367ad6fb351..6648cbb580b63d43cbb9819bc1f3db67b83e52c4 100644 --- a/process/Attribute_lib/process.js +++ b/process/Attribute_lib/process.js @@ -355,7 +355,13 @@ $AttributeTypes.KEYWORD = { databaseField : "ID_VALUE", entityField : "ID_VALUE" }; - +$AttributeTypes.MEMO = { + toString : function () {return this.keyword}, + keyword : "MEMO", + contentType : "TEXT", + databaseField : "MEMO_VALUE", + entityField : "MEMO_VALUE" +}; /** * returns the required contentType for the given attribute type diff --git a/process/Offer_lib/process.js b/process/Offer_lib/process.js index bbb515daf376a665313bee286a5b95f5de89ad52..ef2ffc8cce809ab59037685c7007be611fc7cab6 100644 --- a/process/Offer_lib/process.js +++ b/process/Offer_lib/process.js @@ -357,10 +357,14 @@ OfferUtils.copyToOrder = function (pOfferId, pSalesprojectId, pContactId, pLangu */ OfferUtils.getOfferTitleById = function (pOfferId) { + if (!pOfferId) + return ""; var offerNumber = db.array(db.ROW, SqlCondition.begin() .andPrepare("OFFER.OFFERID", pOfferId) .buildSql("select OFFERCODE, VERSNR from OFFER")); - return translate.text("Offer") + " " + offerNumber.join("-"); + return offerNumber.length > 0 + ? translate.text("Offer") + " " + offerNumber.join("-") + : ""; }