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

merged origin/master into ObjectRelation2

parents 28a96c6c 5afa0533
No related branches found
No related tags found
No related merge requests found
Showing
with 211 additions and 62 deletions
...@@ -1109,7 +1109,7 @@ ...@@ -1109,7 +1109,7 @@
<scale v="0" /> <scale v="0" />
<notNull v="true" /> <notNull v="true" />
<isUnique v="false" /> <isUnique v="false" />
<index v="true" /> <index v="false" />
<title></title> <title></title>
<description></description> <description></description>
<dependencies> <dependencies>
...@@ -1142,7 +1142,7 @@ ...@@ -1142,7 +1142,7 @@
<scale v="0" /> <scale v="0" />
<notNull v="true" /> <notNull v="true" />
<isUnique v="false" /> <isUnique v="false" />
<index v="true" /> <index v="false" />
<title></title> <title></title>
<description></description> <description></description>
<dependencies> <dependencies>
...@@ -1904,7 +1904,7 @@ ...@@ -1904,7 +1904,7 @@
<scale v="0" /> <scale v="0" />
<notNull v="true" /> <notNull v="true" />
<isUnique v="false" /> <isUnique v="false" />
<index v="true" /> <index v="false" />
<title></title> <title></title>
<description></description> <description></description>
</entityFieldDb> </entityFieldDb>
...@@ -2444,20 +2444,6 @@ ...@@ -2444,20 +2444,6 @@
<title></title> <title></title>
<description></description> <description></description>
</entityFieldDb> </entityFieldDb>
<entityFieldDb>
<name>CONTACT_ID</name>
<dbName></dbName>
<primaryKey v="false" />
<columnType v="1" />
<size v="36" />
<scale v="0" />
<notNull v="true" />
<isUnique v="false" />
<index v="false" />
<documentation></documentation>
<title></title>
<description></description>
</entityFieldDb>
<entityFieldDb> <entityFieldDb>
<name>INFO</name> <name>INFO</name>
<dbName></dbName> <dbName></dbName>
...@@ -3398,7 +3384,7 @@ ...@@ -3398,7 +3384,7 @@
<scale v="0" /> <scale v="0" />
<notNull v="true" /> <notNull v="true" />
<isUnique v="false" /> <isUnique v="false" />
<index v="true" /> <index v="false" />
<documentation></documentation> <documentation></documentation>
<title></title> <title></title>
<description></description> <description></description>
......
...@@ -17,13 +17,16 @@ ...@@ -17,13 +17,16 @@
<entityField> <entityField>
<name>CLASSIFICATION</name> <name>CLASSIFICATION</name>
<possibleItemsProcess>%aditoprj%/entity/Appointment_entity/entityfields/classification/possibleItemsProcess.js</possibleItemsProcess> <possibleItemsProcess>%aditoprj%/entity/Appointment_entity/entityfields/classification/possibleItemsProcess.js</possibleItemsProcess>
<valueProcess>%aditoprj%/entity/Appointment_entity/entityfields/classification/valueProcess.js</valueProcess>
</entityField> </entityField>
<entityField> <entityField>
<name>BEGIN</name> <name>BEGIN</name>
<selectionMode>SINGLE</selectionMode> <selectionMode>SINGLE</selectionMode>
<valueProcess>%aditoprj%/entity/Appointment_entity/entityfields/begin/valueProcess.js</valueProcess>
</entityField> </entityField>
<entityField> <entityField>
<name>END</name> <name>END</name>
<valueProcess>%aditoprj%/entity/Appointment_entity/entityfields/end/valueProcess.js</valueProcess>
</entityField> </entityField>
<entityFieldGroup> <entityFieldGroup>
<name>STARTEND</name> <name>STARTEND</name>
...@@ -43,9 +46,11 @@ ...@@ -43,9 +46,11 @@
</entityField> </entityField>
<entityField> <entityField>
<name>REMINDER_CHECK</name> <name>REMINDER_CHECK</name>
<valueProcess>%aditoprj%/entity/Appointment_entity/entityfields/reminder_check/valueProcess.js</valueProcess>
</entityField> </entityField>
<entityField> <entityField>
<name>REMINDER</name> <name>REMINDER</name>
<valueProcess>%aditoprj%/entity/Appointment_entity/entityfields/reminder/valueProcess.js</valueProcess>
</entityField> </entityField>
<entityField> <entityField>
<name>CATEGORIES</name> <name>CATEGORIES</name>
...@@ -57,6 +62,7 @@ ...@@ -57,6 +62,7 @@
</entityField> </entityField>
<entityField> <entityField>
<name>TRANSPARENCY</name> <name>TRANSPARENCY</name>
<valueProcess>%aditoprj%/entity/Appointment_entity/entityfields/transparency/valueProcess.js</valueProcess>
</entityField> </entityField>
<entityActionGroup> <entityActionGroup>
<name>PartStatActionGroup</name> <name>PartStatActionGroup</name>
...@@ -100,9 +106,11 @@ ...@@ -100,9 +106,11 @@
</entityField> </entityField>
<entityField> <entityField>
<name>RRULE</name> <name>RRULE</name>
<valueProcess>%aditoprj%/entity/Appointment_entity/entityfields/rrule/valueProcess.js</valueProcess>
</entityField> </entityField>
<entityField> <entityField>
<name>RECURRENCEID</name> <name>RECURRENCEID</name>
<valueProcess>%aditoprj%/entity/Appointment_entity/entityfields/recurrenceid/valueProcess.js</valueProcess>
</entityField> </entityField>
<entityField> <entityField>
<name>SAFESCOPEFIELD</name> <name>SAFESCOPEFIELD</name>
......
import("system.neon");
import("system.vars");
import("system.calendars");
import("system.result");
/**
* Following if() is only for passing param-parts from "new Appointment"-Dialog to AppointmentEditViewTemplate
*/
if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && vars.exists("$param.Entry_param"))
{
var event = JSON.parse(vars.getString("$param.Entry_param"));
if(event[calendars.DTSTART])
result.string(event[calendars.DTSTART]);
}
\ No newline at end of file
import("system.neon");
import("system.vars");
import("system.calendars");
import("system.result");
/**
* Following if() is only for passing param-parts from "new Appointment"-Dialog to AppointmentEditViewTemplate
*/
if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && vars.exists("$param.Entry_param"))
{
var event = JSON.parse(vars.getString("$param.Entry_param"));
if(event[calendars.CLASSIFICATION])
result.string(event[calendars.CLASSIFICATION]);
}
\ No newline at end of file
import("system.neon");
import("system.vars");
import("system.calendars");
import("system.result");
/**
* Following if() is only for passing param-parts from "new Appointment"-Dialog to AppointmentEditViewTemplate
*/
if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && vars.exists("$param.Entry_param"))
{
var event = JSON.parse(vars.getString("$param.Entry_param"));
if(event[calendars.DTEND])
result.string(event[calendars.DTEND]);
}
\ No newline at end of file
import("system.neon");
import("system.vars");
import("system.calendars");
import("system.result");
if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && vars.exists("$param.Entry_param"))
{
var event = JSON.parse(vars.getString("$param.Entry_param"));
if(event[calendars.RECURRENCEID])
result.string(event[calendars.RECURRENCEID]);
}
\ No newline at end of file
import("system.neon");
import("system.vars");
import("system.calendars");
import("system.result");
/**
* Following if() is only for passing param-parts from "new Appointment"-Dialog to AppointmentEditViewTemplate
*/
if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && vars.exists("$param.Entry_param"))
{
var event = JSON.parse(vars.getString("$param.Entry_param"));
if(event[calendars.REMINDER_DURATION])
result.string(event[calendars.REMINDER_DURATION]);
}
\ No newline at end of file
import("system.neon");
import("system.vars");
import("system.calendars");
import("system.result");
/**
* Following if() is only for passing param-parts from "new Appointment"-Dialog to AppointmentEditViewTemplate
*/
if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && vars.exists("$param.Entry_param"))
{
var event = JSON.parse(vars.getString("$param.Entry_param"));
if(event[calendars.HASREMINDER])
result.string(event[calendars.HASREMINDER]);
}
\ No newline at end of file
import("system.neon");
import("system.vars");
import("system.calendars");
import("system.result");
if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && vars.exists("$param.Entry_param"))
{
var event = JSON.parse(vars.getString("$param.Entry_param"));
if(event[calendars.RRULE])
result.string(event[calendars.RRULE]);
}
\ No newline at end of file
import("system.neon");
import("system.vars");
import("system.calendars");
import("system.result");
/**
* Following if() is only for passing param-parts from "new Appointment"-Dialog to AppointmentEditViewTemplate
*/
if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && vars.exists("$param.Entry_param"))
{
var event = JSON.parse(vars.getString("$param.Entry_param"));
if(event[calendars.SUMMARY])
result.string(event[calendars.SUMMARY]);
}
\ No newline at end of file
import("system.neon");
import("system.vars");
import("system.calendars");
import("system.result");
/**
* Following if() is only for passing param-parts from "new Appointment"-Dialog to AppointmentEditViewTemplate
*/
if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && vars.exists("$param.Entry_param"))
{
var event = JSON.parse(vars.getString("$param.Entry_param"));
if(event[calendars.TRANSPARENCY])
result.string(event[calendars.TRANSPARENCY]);
}
\ No newline at end of file
...@@ -75,6 +75,18 @@ ...@@ -75,6 +75,18 @@
<fieldName>Attributes</fieldName> <fieldName>Attributes</fieldName>
<isConsumer v="false" /> <isConsumer v="false" />
</entityDependency> </entityDependency>
<entityDependency>
<name>5bcda86a-e56c-4a4a-ac13-c6eb68152200</name>
<entityName>Product_entity</entityName>
<fieldName>Attributes</fieldName>
<isConsumer v="false" />
</entityDependency>
<entityDependency>
<name>a9b81050-e7f8-408d-aa73-e2709188e121</name>
<entityName>SalesprojectCompetition_entity</entityName>
<fieldName>Attributes</fieldName>
<isConsumer v="false" />
</entityDependency>
</dependencies> </dependencies>
<children> <children>
<entityParameter> <entityParameter>
...@@ -143,6 +155,11 @@ ...@@ -143,6 +155,11 @@
<entityField> <entityField>
<name>MEMO_VALUE</name> <name>MEMO_VALUE</name>
</entityField> </entityField>
<entityParameter>
<name>filteredAttributeIds_param</name>
<expose v="true" />
<description>PARAMETER</description>
</entityParameter>
</entityFields> </entityFields>
<recordContainers> <recordContainers>
<dbRecordContainer> <dbRecordContainer>
......
import("system.vars"); import("system.vars");
import("system.result"); import("system.result");
import("Attribute_lib"); import("Attribute_lib");
result.object(AttributeUtil.getPossibleAttributes(vars.get("$param.objectType_param"))); var filteredAttributes = [];
if (vars.exists("$param.filteredAttributeIds_param") && vars.get("$param.filteredAttributeIds_param"))
{
filteredAttributes = JSON.parse(vars.get("$param.filteredAttributeIds_param"));
}
result.object(AttributeUtil.getPossibleAttributes(vars.get("$param.objectType_param"), undefined, filteredAttributes));
import("system.db"); import("system.vars");
import("system.vars"); import("system.db");
import("system.result"); import("system.result");
import("Sql_lib"); import("Sql_lib");
if (vars.exists("$param.objectRowId_param") && vars.get("$param.objectRowId_param") != null)
{
cond = SqlCondition.begin() var cond = SqlCondition.begin()
.andPrepare("AB_ATTRIBUTERELATION.OBJECT_ROWID", vars.get("$param.objectRowId_param")) .andPrepareVars("AB_ATTRIBUTERELATION.OBJECT_ROWID", "$param.objectRowId_param");
.build();
result.string(db.translateCondition(cond)); if (vars.exists("$param.filteredAttributeIds_param") && vars.get("$param.filteredAttributeIds_param"))
} {
else var filteredIds = JSON.parse(vars.get("$param.filteredAttributeIds_param"));
result.string("1 = 2"); var filteredIdsCondition = new SqlCondition();
\ No newline at end of file
filteredIds.forEach(function(id)
{
this.orPrepare("AB_ATTRIBUTERELATION.AB_ATTRIBUTE_ID", id);
}, filteredIdsCondition);
cond.andSqlCondition(filteredIdsCondition);
}
result.string(db.translateCondition(cond.build("1=2")));
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
</entityField> </entityField>
<entityField> <entityField>
<name>ATTRIBUTE_PARENT_ID</name> <name>ATTRIBUTE_PARENT_ID</name>
<title>Parent Attribute</title> <title>Superordinate Attribute</title>
<consumer>AttributeChildren</consumer> <consumer>AttributeChildren</consumer>
<linkedContext>Attribute</linkedContext> <linkedContext>Attribute</linkedContext>
<stateProcess>%aditoprj%/entity/Attribute_entity/entityfields/attribute_parent_id/stateProcess.js</stateProcess> <stateProcess>%aditoprj%/entity/Attribute_entity/entityfields/attribute_parent_id/stateProcess.js</stateProcess>
...@@ -128,12 +128,6 @@ ...@@ -128,12 +128,6 @@
<state>INVISIBLE</state> <state>INVISIBLE</state>
<valueProcess>%aditoprj%/entity/Attribute_entity/entityfields/attribute_level/valueProcess.js</valueProcess> <valueProcess>%aditoprj%/entity/Attribute_entity/entityfields/attribute_level/valueProcess.js</valueProcess>
</entityField> </entityField>
<entityActionField>
<name>test</name>
<fieldType>ACTION</fieldType>
<title>test</title>
<onActionProcess>%aditoprj%/entity/Attribute_entity/entityfields/test/onActionProcess.js</onActionProcess>
</entityActionField>
<entityField> <entityField>
<name>KEYWORD_CONTAINER</name> <name>KEYWORD_CONTAINER</name>
<title>Keyword</title> <title>Keyword</title>
......
...@@ -9,4 +9,5 @@ if (vars.get("$field.ATTRIBUTE_TYPE") == $AttributeTypes.KEYWORD) ...@@ -9,4 +9,5 @@ if (vars.get("$field.ATTRIBUTE_TYPE") == $AttributeTypes.KEYWORD)
else else
fieldState = neon.COMPONENTSTATE_INVISIBLE; fieldState = neon.COMPONENTSTATE_INVISIBLE;
//TODO result the correct state here when updating the state is possible
result.string(neon.COMPONENTSTATE_AUTO);//result.string(fieldState); result.string(neon.COMPONENTSTATE_AUTO);//result.string(fieldState);
\ No newline at end of file
import("system.logging");
import("Attribute_lib");
logging.log(AttributeRelationUtils.getSqlUtil().toSource());
\ No newline at end of file
...@@ -78,6 +78,8 @@ ...@@ -78,6 +78,8 @@
<entityField> <entityField>
<name>VAT</name> <name>VAT</name>
<title>Total VAT</title> <title>Total VAT</title>
<contentType>NUMBER</contentType>
<outputFormat>#,##0.00</outputFormat>
<state>READONLY</state> <state>READONLY</state>
</entityField> </entityField>
<entityField> <entityField>
...@@ -140,12 +142,16 @@ ...@@ -140,12 +142,16 @@
<entityField> <entityField>
<name>NET</name> <name>NET</name>
<title>Total net</title> <title>Total net</title>
<contentType>NUMBER</contentType>
<outputFormat>#,##0.00</outputFormat>
<state>READONLY</state> <state>READONLY</state>
</entityField> </entityField>
<entityField> <entityField>
<name>TotalGross</name> <name>TotalGross</name>
<documentation>%aditoprj%/entity/Offer_entity/entityfields/totalgross/documentation.adoc</documentation> <documentation>%aditoprj%/entity/Offer_entity/entityfields/totalgross/documentation.adoc</documentation>
<title>Total gross</title> <title>Total gross</title>
<contentType>NUMBER</contentType>
<outputFormat>#,##0.00</outputFormat>
<state>READONLY</state> <state>READONLY</state>
<valueProcess>%aditoprj%/entity/Offer_entity/entityfields/totalgross/valueProcess.js</valueProcess> <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/totalgross/valueProcess.js</valueProcess>
</entityField> </entityField>
......
...@@ -15,7 +15,9 @@ ...@@ -15,7 +15,9 @@
</entityField> </entityField>
<entityField> <entityField>
<name>DISCOUNT</name> <name>DISCOUNT</name>
<title>Discount</title> <title>Discount %</title>
<contentType>NUMBER</contentType>
<outputFormat>#,##0</outputFormat>
</entityField> </entityField>
<entityField> <entityField>
<name>GROUPCODEID</name> <name>GROUPCODEID</name>
...@@ -57,6 +59,8 @@ ...@@ -57,6 +59,8 @@
<entityField> <entityField>
<name>PRICE</name> <name>PRICE</name>
<title>Unit price</title> <title>Unit price</title>
<contentType>NUMBER</contentType>
<outputFormat>#,##0.00</outputFormat>
</entityField> </entityField>
<entityField> <entityField>
<name>PRODUCT_ID</name> <name>PRODUCT_ID</name>
...@@ -74,6 +78,8 @@ ...@@ -74,6 +78,8 @@
<name>QUANTITY</name> <name>QUANTITY</name>
<documentation>%aditoprj%/entity/Offeritem_entity/entityfields/quantity/documentation.adoc</documentation> <documentation>%aditoprj%/entity/Offeritem_entity/entityfields/quantity/documentation.adoc</documentation>
<title>Quantity</title> <title>Quantity</title>
<contentType>NUMBER</contentType>
<outputFormat>#,##0</outputFormat>
<valueProcess>%aditoprj%/entity/Offeritem_entity/entityfields/quantity/valueProcess.js</valueProcess> <valueProcess>%aditoprj%/entity/Offeritem_entity/entityfields/quantity/valueProcess.js</valueProcess>
<onValueChange>%aditoprj%/entity/Offeritem_entity/entityfields/quantity/onValueChange.js</onValueChange> <onValueChange>%aditoprj%/entity/Offeritem_entity/entityfields/quantity/onValueChange.js</onValueChange>
<onValueChangeTypes> <onValueChangeTypes>
...@@ -85,10 +91,13 @@ ...@@ -85,10 +91,13 @@
<title>Unit</title> <title>Unit</title>
<consumer>KeywordQuantityUnits</consumer> <consumer>KeywordQuantityUnits</consumer>
<state>READONLY</state> <state>READONLY</state>
<displayValueProcess>%aditoprj%/entity/Offeritem_entity/entityfields/unit/displayValueProcess.js</displayValueProcess>
</entityField> </entityField>
<entityField> <entityField>
<name>VAT</name> <name>VAT</name>
<title>VAT</title> <title>VAT</title>
<contentType>NUMBER</contentType>
<outputFormat>#,##0.00</outputFormat>
<state>READONLY</state> <state>READONLY</state>
</entityField> </entityField>
<entityParameter> <entityParameter>
...@@ -166,7 +175,7 @@ ...@@ -166,7 +175,7 @@
<documentation>%aditoprj%/entity/Offeritem_entity/entityfields/info/documentation.adoc</documentation> <documentation>%aditoprj%/entity/Offeritem_entity/entityfields/info/documentation.adoc</documentation>
<title>Note</title> <title>Note</title>
<contentType>LONG_TEXT</contentType> <contentType>LONG_TEXT</contentType>
<valueProcess>%aditoprj%/entity/Offeritem_entity/entityfields/info/valueProcess.js</valueProcess> <state>READONLY</state>
</entityField> </entityField>
<entityConsumer> <entityConsumer>
<name>KeywordProductGroupcodes</name> <name>KeywordProductGroupcodes</name>
......
import("system.db");
import("system.result");
import("system.vars");
import("system.neon");
import("Sql_lib");
if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW)
{
// TODO: loading from db until loading from Consumer is possible.
var productId = vars.get("$field.PRODUCT_ID");
result.string(db.cell(SqlCondition.begin().andPrepareVars("PRODUCT.PRODUCTID", "$field.PRODUCT_ID").buildSql("select INFO from PRODUCT", "1=2")));
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment