diff --git a/.liquibase/Data_alias/basic/init/struct/create_offer.xml b/.liquibase/Data_alias/basic/init/struct/create_offer.xml index eade3b163f6f5d0115e7eaf17f4c5a7eae06d784..52542b01b49c654d2c42800b1a65159bf2cd20ab 100644 --- a/.liquibase/Data_alias/basic/init/struct/create_offer.xml +++ b/.liquibase/Data_alias/basic/init/struct/create_offer.xml @@ -11,6 +11,7 @@ <column name="SALESPROJECT_ID" type="CHAR(36)"/> <column name="OFFER_ID" type="CHAR(36)"/> <column name="HEADER" type="NCLOB"/> + <column name="FOOTER" type="NCLOB"/> <column name="OFFERDATE" type="DATETIME"/> <column name="LANGUAGE" type="CHAR(3)"/> <column name="OFFERCODE" type="INTEGER"/> diff --git a/aliasDefinition/Data_alias/Data_alias.aod b/aliasDefinition/Data_alias/Data_alias.aod index ce6e99c3755842459f1f081956bfb043987e90d2..493c2fb440db52ffa87463a5a3a3d5e389c5d36a 100644 --- a/aliasDefinition/Data_alias/Data_alias.aod +++ b/aliasDefinition/Data_alias/Data_alias.aod @@ -3083,6 +3083,20 @@ <title>Creation user</title> <description></description> </entityFieldDb> + <entityFieldDb> + <name>FOOTER</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/Offer_entity/Offer_entity.aod b/entity/Offer_entity/Offer_entity.aod index e10cb5ba733dc3fae5f0968d61d63df45b2089b4..2be40870e32bbe01fadec6801aeeb59d596b823d 100644 --- a/entity/Offer_entity/Offer_entity.aod +++ b/entity/Offer_entity/Offer_entity.aod @@ -108,7 +108,7 @@ </entityField> <entityField> <name>HEADER</name> - <title>Cover letter</title> + <title>Header</title> <contentType>LONG_TEXT</contentType> <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/header/valueProcess.js</valueProcess> </entityField> @@ -717,6 +717,22 @@ </entityParameter> </children> </entityConsumer> + <entityField> + <name>FOOTER</name> + <title>Footer</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>chooseTEXFooter</name> + <consumer>DocumentTemplateTex</consumer> + </entityField> </entityFields> <recordContainers> <dbRecordContainer> @@ -730,21 +746,21 @@ <onDBDelete>%aditoprj%/entity/Offer_entity/recordcontainers/db/onDBDelete.js</onDBDelete> <linkInformation> <linkInformation> - <name>fdfae1fd-5eb3-4891-86b7-517803035f23</name> + <name>681f6893-d11a-430c-a8ca-87215054d86f</name> <tableName>OFFER</tableName> <primaryKey>OFFERID</primaryKey> <isUIDTable v="true" /> <readonly v="false" /> </linkInformation> <linkInformation> - <name>d49d4390-5567-449b-8702-ee97dbfe1700</name> + <name>acdf69f0-c6ad-431a-90c7-5bd0b3dc3d8e</name> <tableName>CONTACT</tableName> <primaryKey>CONTACTID</primaryKey> <isUIDTable v="false" /> <readonly v="true" /> </linkInformation> <linkInformation> - <name>d165322e-cdf3-4611-9fea-0e100853ae80</name> + <name>b129928e-886e-4482-99da-463135008fef</name> <tableName>SALESPROJECT</tableName> <primaryKey>SALESPROJECTID</primaryKey> <isUIDTable v="false" /> @@ -872,6 +888,10 @@ <name>SALESPROJECT_ID.displayValue</name> <recordfield>SALESPROJECT.PROJECTTITLE</recordfield> </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>FOOTER.value</name> + <recordfield>OFFER.FOOTER</recordfield> + </dbRecordFieldMapping> </recordFieldMappings> </dbRecordContainer> </recordContainers> diff --git a/entity/Offer_entity/entityfields/footer/valueProcess.js b/entity/Offer_entity/entityfields/footer/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..6740fcbbe6adc95b263ddbdbb1079bf5c159b9a2 --- /dev/null +++ b/entity/Offer_entity/entityfields/footer/valueProcess.js @@ -0,0 +1,20 @@ +import("system.result"); +import("system.vars"); +import("system.neon"); +import("system.db"); +import("system.util"); + +if(vars.exists("$param.OfferFooter_param") && vars.get("$param.OfferFooter_param")) + result.string(vars.get("$param.OfferFooter_param")); + +else if(vars.get("$this.value")) + result.string(vars.get("$this.value")); + +else if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW) + result.string("Vielen Dank!") + +if (vars.get("$field.chooseTEXFooter") != "") +{ + var binaryId = db.cell("select ID from ASYS_BINARIES where ROW_ID = '" + vars.get("$field.chooseTEXFooter") + "'", "_____SYSTEMALIAS"); + result.string(util.decodeBase64String(db.getBinaryContent(binaryId, "_____SYSTEMALIAS"))); +} \ No newline at end of file diff --git a/entity/Offer_entity/entityfields/header/valueProcess.js b/entity/Offer_entity/entityfields/header/valueProcess.js index 653e89fd1dd644b7c243895b39e3ac25edb940ba..01b79d92f180385485f36ca05bc38e7e9aa91bef 100644 --- a/entity/Offer_entity/entityfields/header/valueProcess.js +++ b/entity/Offer_entity/entityfields/header/valueProcess.js @@ -11,7 +11,7 @@ else if(vars.get("$this.value")) result.string(vars.get("$this.value")); else if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW) - result.string("gerne bieten wir Ihnen wie folgt an:") + result.string("Gerne bieten wir Ihnen wie folgt an:") if (vars.get("$field.chooseTEXHeader") != "") { diff --git a/entity/Offer_entity/entityfields/newofferversion/onActionProcess.js b/entity/Offer_entity/entityfields/newofferversion/onActionProcess.js index be8fa6eecb4fd7dc771641a6a8585f183894dc83..5919abc67af5cb343614a7708e4e34fd6fe774f8 100644 --- a/entity/Offer_entity/entityfields/newofferversion/onActionProcess.js +++ b/entity/Offer_entity/entityfields/newofferversion/onActionProcess.js @@ -12,6 +12,7 @@ var params = { "OfferCurrency_param" : vars.get("$field.CURRENCY"), "OfferAddress_param" : vars.get("$field.ADDRESS"), "OfferHeader_param" : vars.get("$field.HEADER"), + "OfferFooter_param" : vars.get("$field.FOOTER"), "OfferDeliveryTerm_param" : vars.get("$field.DELIVERYTERMS"), "OfferPaymentTerm_param" : vars.get("$field.PAYMENTTERMS") } diff --git a/language/_____LANGUAGE_de/_____LANGUAGE_de.aod b/language/_____LANGUAGE_de/_____LANGUAGE_de.aod index 4682197cfd41e984d35686f2475c05e9ff9586b4..448ecd7d80c18fd7763a58868ce913b62c09881c 100644 --- a/language/_____LANGUAGE_de/_____LANGUAGE_de.aod +++ b/language/_____LANGUAGE_de/_____LANGUAGE_de.aod @@ -4817,6 +4817,9 @@ <entry> <key>Dateien</key> </entry> + <entry> + <key>postcode</key> + </entry> </keyValueMap> <font name="Dialog" style="0" size="11" /> </language> diff --git a/neonView/OfferCoverLetter_view/OfferCoverLetter_view.aod b/neonView/OfferCoverLetter_view/OfferCoverLetter_view.aod index 5c920c8b7f5ee25d4fafa7a777ba1346749df489..965aa9e847d00de2c858040c2bfaeaabd4254c6f 100644 --- a/neonView/OfferCoverLetter_view/OfferCoverLetter_view.aod +++ b/neonView/OfferCoverLetter_view/OfferCoverLetter_view.aod @@ -24,6 +24,10 @@ <name>8bf2a10e-e7e9-4f33-98cf-4ded02bf68a9</name> <entityField>HEADER</entityField> </entityFieldLink> + <entityFieldLink> + <name>6441a9fe-8349-4026-8be2-329d88bcc61d</name> + <entityField>FOOTER</entityField> + </entityFieldLink> </fields> </genericViewTemplate> </children> diff --git a/neonView/OfferEdit_view/OfferEdit_view.aod b/neonView/OfferEdit_view/OfferEdit_view.aod index ecc5bd015038ab0de9a0581acb12e4598418fdb9..966e1a4b6d486339745a2ec9f63d9bf13bd9d69e 100644 --- a/neonView/OfferEdit_view/OfferEdit_view.aod +++ b/neonView/OfferEdit_view/OfferEdit_view.aod @@ -64,6 +64,10 @@ <name>ed71986f-303c-4118-a895-51ec31ba8775</name> <entityField>HEADER</entityField> </entityFieldLink> + <entityFieldLink> + <name>9954516a-3fc3-48b5-8fe9-9dfc74f021e8</name> + <entityField>FOOTER</entityField> + </entityFieldLink> <entityFieldLink> <name>833e6193-fde6-4990-8a26-eaeb0f60de48</name> <entityField>ChosenAddress</entityField>