Skip to content
Snippets Groups Projects
Commit 2edde2e8 authored by Dominik Lechner's avatar Dominik Lechner
Browse files

Use documenttemplate in offer

parent 4b66c889
No related branches found
No related tags found
No related merge requests found
......@@ -4,6 +4,7 @@
<title>Document Template</title>
<majorModelMode>DISTRIBUTED</majorModelMode>
<icon>VAADIN:FILE_FONT</icon>
<titleProcess>%aditoprj%/entity/DocumentTemplate_entity/titleProcess.js</titleProcess>
<recordContainer>db</recordContainer>
<entityFields>
<entityProvider>
......@@ -188,12 +189,6 @@
<mandatory v="true" />
<description>PARAMETER</description>
</entityParameter>
<entityParameter>
<name>DocTempType_param</name>
<expose v="true" />
<triggerRecalculation v="true" />
<description>PARAMETER</description>
</entityParameter>
<entityProvider>
<name>Attachments</name>
<fieldType>DEPENDENCY_IN</fieldType>
......@@ -218,11 +213,29 @@
<fieldName>Links</fieldName>
</dependency>
</entityConsumer>
<entityParameter>
<name>DocumentTemplateTypeClassification_param</name>
<expose v="true" />
<description>PARAMETER</description>
</entityParameter>
<entityProvider>
<name>DocumentTemplateProvider</name>
<fieldType>DEPENDENCY_IN</fieldType>
<dependencies>
<entityDependency>
<name>e1c555c3-9e53-4ccf-962c-4bdd3c14bb16</name>
<entityName>Offer_entity</entityName>
<fieldName>DocumentTemplateText</fieldName>
<isConsumer v="false" />
</entityDependency>
</dependencies>
</entityProvider>
</entityFields>
<recordContainers>
<dbRecordContainer>
<name>db</name>
<alias>Data_alias</alias>
<conditionProcess>%aditoprj%/entity/DocumentTemplate_entity/recordcontainers/db/conditionProcess.js</conditionProcess>
<onDBInsert>%aditoprj%/entity/DocumentTemplate_entity/recordcontainers/db/onDBInsert.js</onDBInsert>
<onDBUpdate>%aditoprj%/entity/DocumentTemplate_entity/recordcontainers/db/onDBUpdate.js</onDBUpdate>
<linkInformation>
......
import("system.logging");
import("system.result");
import("system.vars");
import("system.db");
import("Sql_lib");
var docTemplateType = vars.get("$param.DocumentTemplateType_param").trim();
var docTemplateTypeClassification = vars.get("$param.DocumentTemplateTypeClassification_param").trim();
if(docTemplateType != "" && docTemplateTypeClassification != "")
{
var cond = SqlCondition.begin()
.andPrepare("DOCUMENTTEMPLATE.TYPE", docTemplateType)
.andPrepare("DOCUMENTTEMPLATE.CLASSIFICATION", docTemplateTypeClassification)
.build();
result.string(db.translateStatement(cond));
}
\ No newline at end of file
import("system.vars");
import("system.translate");
import("system.result");
result.string(translate.text(vars.get("$field.NAME")));
\ No newline at end of file
This diff is collapsed.
import("system.result");
result.string("TEX");
\ No newline at end of file
import("system.result");
result.string("3");
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.1">
<name>OfferEdit_view</name>
<title>Offer</title>
<majorModelMode>DISTRIBUTED</majorModelMode>
<icon>VAADIN:CART</icon>
<quickEntry v="2" />
<layout>
<boxLayout>
<name>layout</name>
</boxLayout>
</layout>
<children>
<genericViewTemplate>
<name>Edit</name>
<editMode v="true" />
<entityField>#ENTITY</entityField>
<fields>
<entityFieldLink>
<name>1b323e80-820d-402a-98d2-f3649ec8e91f</name>
<entityField>CONTACT_ID</entityField>
</entityFieldLink>
<entityFieldLink>
<name>767a9e6e-596b-4903-aa86-7bc0f66cd037</name>
<entityField>STATUS</entityField>
</entityFieldLink>
<entityFieldLink>
<name>768683f3-08c8-4e85-bb4c-7e5c74a8dec0</name>
<entityField>OFFERDATE</entityField>
</entityFieldLink>
<entityFieldLink>
<name>64cb7376-3a7c-4ce9-99e8-e70bc91b41d0</name>
<entityField>CURRENCY</entityField>
</entityFieldLink>
<entityFieldLink>
<name>ce72d9f3-66ce-4a5e-a5af-c3a82520141d</name>
<entityField>PROBABILITY</entityField>
</entityFieldLink>
<entityFieldLink>
<name>7ab3eb65-b713-4251-9eb1-3119432565f5</name>
<entityField>LANGUAGE</entityField>
</entityFieldLink>
<entityFieldLink>
<name>ac6f81a2-5012-461a-bcf1-4534182b0973</name>
<entityField>SALESPROJECT_ID</entityField>
</entityFieldLink>
<entityFieldLink>
<name>7a9b0943-eb06-4b44-a111-ed4e2749da6a</name>
<entityField>DELIVERYTERMS</entityField>
</entityFieldLink>
<entityFieldLink>
<name>1e98fe37-8d52-4eef-8825-8ea14e7e20b5</name>
<entityField>PAYMENTTERMS</entityField>
</entityFieldLink>
<entityFieldLink>
<name>45ddf7c2-531b-4e18-826d-9c652ecc4d01</name>
<entityField>INFO</entityField>
</entityFieldLink>
<entityFieldLink>
<name>ed71986f-303c-4118-a895-51ec31ba8775</name>
<entityField>HEADER</entityField>
</entityFieldLink>
<entityFieldLink>
<name>833e6193-fde6-4990-8a26-eaeb0f60de48</name>
<entityField>ChosenAddress</entityField>
</entityFieldLink>
<entityFieldLink>
<name>930dc6e3-a19f-4780-9553-9cfd4a158fd5</name>
<entityField>ADDRESS</entityField>
</entityFieldLink>
</fields>
</genericViewTemplate>
</children>
</neonView>
<?xml version="1.0" encoding="UTF-8"?>
<neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.1">
<name>OfferEdit_view</name>
<title>Offer</title>
<majorModelMode>DISTRIBUTED</majorModelMode>
<icon>VAADIN:CART</icon>
<quickEntry v="2" />
<layout>
<boxLayout>
<name>layout</name>
</boxLayout>
</layout>
<children>
<genericViewTemplate>
<name>Edit</name>
<editMode v="true" />
<entityField>#ENTITY</entityField>
<fields>
<entityFieldLink>
<name>1b323e80-820d-402a-98d2-f3649ec8e91f</name>
<entityField>CONTACT_ID</entityField>
</entityFieldLink>
<entityFieldLink>
<name>767a9e6e-596b-4903-aa86-7bc0f66cd037</name>
<entityField>STATUS</entityField>
</entityFieldLink>
<entityFieldLink>
<name>768683f3-08c8-4e85-bb4c-7e5c74a8dec0</name>
<entityField>OFFERDATE</entityField>
</entityFieldLink>
<entityFieldLink>
<name>64cb7376-3a7c-4ce9-99e8-e70bc91b41d0</name>
<entityField>CURRENCY</entityField>
</entityFieldLink>
<entityFieldLink>
<name>ce72d9f3-66ce-4a5e-a5af-c3a82520141d</name>
<entityField>PROBABILITY</entityField>
</entityFieldLink>
<entityFieldLink>
<name>7ab3eb65-b713-4251-9eb1-3119432565f5</name>
<entityField>LANGUAGE</entityField>
</entityFieldLink>
<entityFieldLink>
<name>ac6f81a2-5012-461a-bcf1-4534182b0973</name>
<entityField>SALESPROJECT_ID</entityField>
</entityFieldLink>
<entityFieldLink>
<name>7a9b0943-eb06-4b44-a111-ed4e2749da6a</name>
<entityField>DELIVERYTERMS</entityField>
</entityFieldLink>
<entityFieldLink>
<name>1e98fe37-8d52-4eef-8825-8ea14e7e20b5</name>
<entityField>PAYMENTTERMS</entityField>
</entityFieldLink>
<entityFieldLink>
<name>45ddf7c2-531b-4e18-826d-9c652ecc4d01</name>
<entityField>INFO</entityField>
</entityFieldLink>
<entityFieldLink>
<name>6005aedd-bbfb-452f-bdc8-3b99247022d9</name>
<entityField>chooseTEXHeader</entityField>
</entityFieldLink>
<entityFieldLink>
<name>ed71986f-303c-4118-a895-51ec31ba8775</name>
<entityField>HEADER</entityField>
</entityFieldLink>
<entityFieldLink>
<name>833e6193-fde6-4990-8a26-eaeb0f60de48</name>
<entityField>ChosenAddress</entityField>
</entityFieldLink>
<entityFieldLink>
<name>930dc6e3-a19f-4780-9553-9cfd4a158fd5</name>
<entityField>ADDRESS</entityField>
</entityFieldLink>
</fields>
</genericViewTemplate>
</children>
</neonView>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment