diff --git a/aliasDefinition/Data_alias/Data_alias.aod b/aliasDefinition/Data_alias/Data_alias.aod index fb04b3c8a9196fd01e846f8628d7646faa565da6..9bbe128ca5cd25457496d65c7b889d2d2940dade 100644 --- a/aliasDefinition/Data_alias/Data_alias.aod +++ b/aliasDefinition/Data_alias/Data_alias.aod @@ -2131,6 +2131,233 @@ </entityFieldDb> </entityFields> </entityDb> + <entityDb> + <name>SALESPROJECT</name> + <dbName></dbName> + <idColumn>SALESPROJECTID</idColumn> + <idGeneratorType v="0" /> + <idGeneratorInterval v="1" /> + <title></title> + <description></description> + <auditSyncConfig> + <name>auditSyncConfig</name> + <auditMode v="0" /> + <syncActive v="false" /> + <syncComplete v="true" /> + <syncDirection v="1" /> + <syncIds></syncIds> + </auditSyncConfig> + <entityFields> + <entityFieldDb> + <name>STARTDATE</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="93" /> + <size v="29" /> + <scale v="9" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>DATE_EDIT</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="93" /> + <size v="29" /> + <scale v="9" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>VOLUME</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="2" /> + <size v="14" /> + <scale v="2" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>ESTIMATIONVALUE</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="4" /> + <size v="10" /> + <scale v="0" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>INFO</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="2005" /> + <size v="2147483647" /> + <scale v="0" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>ESTIMATION</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="12" /> + <size v="50" /> + <scale v="0" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>USER_EDIT</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="12" /> + <size v="50" /> + <scale v="0" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>ENDDATE</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="93" /> + <size v="29" /> + <scale v="9" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>PHASE</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="4" /> + <size v="10" /> + <scale v="0" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>STATUS</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="4" /> + <size v="10" /> + <scale v="0" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>PROJECTCODE</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="4" /> + <size v="10" /> + <scale v="0" /> + <notNull v="true" /> + <isUnique v="true" /> + <index v="true" /> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>SALESPROJECTID</name> + <dbName></dbName> + <primaryKey v="true" /> + <columnType v="1" /> + <size v="36" /> + <scale v="0" /> + <notNull v="true" /> + <isUnique v="true" /> + <index v="false" /> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>DATE_NEW</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="93" /> + <size v="29" /> + <scale v="9" /> + <notNull v="true" /> + <isUnique v="false" /> + <index v="false" /> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>RELATION_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" /> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>USER_NEW</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="12" /> + <size v="50" /> + <scale v="0" /> + <notNull v="true" /> + <isUnique v="false" /> + <index v="false" /> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>PROJECTTITLE</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="12" /> + <size v="30" /> + <scale v="0" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <title></title> + <description></description> + </entityFieldDb> + </entityFields> + </entityDb> </entities> </entityGroup> </aliasDefDb> diff --git a/application/_____SYSTEM_APPLICATION_NEON/_____SYSTEM_APPLICATION_NEON.aod b/application/_____SYSTEM_APPLICATION_NEON/_____SYSTEM_APPLICATION_NEON.aod index aa39b840b353c139a837a6a28337a1a1a92e7c45..c18b7042159bd366b181d30ffc154ae2c3e9c47e 100644 --- a/application/_____SYSTEM_APPLICATION_NEON/_____SYSTEM_APPLICATION_NEON.aod +++ b/application/_____SYSTEM_APPLICATION_NEON/_____SYSTEM_APPLICATION_NEON.aod @@ -17,6 +17,7 @@ </node> <node name="SALES" kind="123" title="Sales"> <node name="Group2" kind="123" title=""> + <node name="Salesproject_context" kind="10077" /> <node name="Contract_context" kind="10077" /> <node name="Product_context" kind="10077" /> <node name="INTERNAL_ADMINISTRATOR" kind="159" /> diff --git a/entity/Org_entity/Org_entity.aod b/entity/Org_entity/Org_entity.aod index a25d34b1f522f29e604a9a3332c58ac4c048e212..9a4e1e43cf7501a1cb2a8b7baa243b29c30d57b7 100644 --- a/entity/Org_entity/Org_entity.aod +++ b/entity/Org_entity/Org_entity.aod @@ -202,6 +202,12 @@ <fieldName>ProductOrg_dfo</fieldName> <isOutgoing v="false" /> </entityDependency> + <entityDependency> + <name>a6e1d9a2-9079-4415-b56f-865df5170d5e</name> + <entityName>Salesproject_entity</entityName> + <fieldName>SalesprojectOrg_dfo</fieldName> + <isOutgoing v="false" /> + </entityDependency> </dependencies> </entityIncomingField> <entityOutgoingField> diff --git a/entity/Product_entity/Product_entity.aod b/entity/Product_entity/Product_entity.aod index 94e866304de861379e3d8c828b0f291327db3d04..9f18f3a50d9938d1ad8e1fc7211b7bf899ad7c22 100644 --- a/entity/Product_entity/Product_entity.aod +++ b/entity/Product_entity/Product_entity.aod @@ -60,7 +60,7 @@ <name>PRODUCTCODE</name> <tableName>PRODUCT</tableName> <columnName>PRODUCTCODE</columnName> - <caption>Product no.</caption> + <caption>Product number</caption> <mandatory v="true" /> <onValidation>%aditoprj%/entity/Product_entity/entityfields/productcode/onValidation.js</onValidation> </entityField> diff --git a/entity/Product_entity/entityfields/date_new/valueProcess.js b/entity/Product_entity/entityfields/date_new/valueProcess.js index eedddb3cf02507bf4da985cf9db27f79c8468b55..abfd322661115639b35d528163d98e4112b15eaa 100644 --- a/entity/Product_entity/entityfields/date_new/valueProcess.js +++ b/entity/Product_entity/entityfields/date_new/valueProcess.js @@ -1,4 +1,3 @@ -import("system.logging"); import("system.vars"); import("system.result"); import("system.neon"); diff --git a/entity/Salesproject_entity/Salesproject_entity.aod b/entity/Salesproject_entity/Salesproject_entity.aod new file mode 100644 index 0000000000000000000000000000000000000000..2398361961635ff3eb850c159d96d34527f31ea7 --- /dev/null +++ b/entity/Salesproject_entity/Salesproject_entity.aod @@ -0,0 +1,147 @@ +<?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.0.3" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.0.3"> + <name>Salesproject_entity</name> + <title>Salesproject</title> + <majorModelMode>DISTRIBUTED</majorModelMode> + <alias>Data_alias</alias> + <recordContainerType>DB</recordContainerType> + <caption>Salesproject</caption> + <iconId>VAADIN:FILTER</iconId> + <entityFields> + <entityIncomingField> + <name>#INCOMING</name> + </entityIncomingField> + <entityField> + <name>DATE_EDIT</name> + <tableName>SALESPROJECT</tableName> + <columnName>DATE_EDIT</columnName> + <contentType>DATE</contentType> + <outputFormat>yyyy-MM-dd&apos;T&apos;HH:mm:ssZ</outputFormat> + <valueProcess>%aditoprj%/entity/Salesproject_entity/entityfields/date_edit/valueProcess.js</valueProcess> + </entityField> + <entityField> + <name>DATE_NEW</name> + <tableName>SALESPROJECT</tableName> + <columnName>DATE_NEW</columnName> + <contentType>DATE</contentType> + <valueProcess>%aditoprj%/entity/Salesproject_entity/entityfields/date_new/valueProcess.js</valueProcess> + </entityField> + <entityField> + <name>ENDDATE</name> + <tableName>SALESPROJECT</tableName> + <columnName>ENDDATE</columnName> + <caption>Rollout</caption> + <contentType>DATE</contentType> + <resolution>DAY</resolution> + <valueProcess>%aditoprj%/entity/Salesproject_entity/entityfields/enddate/valueProcess.js</valueProcess> + </entityField> + <entityField> + <name>ESTIMATION</name> + <tableName>SALESPROJECT</tableName> + <columnName>ESTIMATION</columnName> + <caption>Estimation</caption> + </entityField> + <entityField> + <name>ESTIMATIONVALUE</name> + <tableName>SALESPROJECT</tableName> + <columnName>ESTIMATIONVALUE</columnName> + </entityField> + <entityField> + <name>INFO</name> + <tableName>SALESPROJECT</tableName> + <columnName>INFO</columnName> + <caption>Information</caption> + </entityField> + <entityField> + <name>PHASE</name> + <tableName>SALESPROJECT</tableName> + <columnName>PHASE</columnName> + <caption>Phase</caption> + <mandatory v="true" /> + <possibleItemsProcess>%aditoprj%/entity/Salesproject_entity/entityfields/phase/possibleItemsProcess.js</possibleItemsProcess> + </entityField> + <entityField> + <name>PROJECTCODE</name> + <tableName>SALESPROJECT</tableName> + <columnName>PROJECTCODE</columnName> + <caption>Project number</caption> + <state>READONLY</state> + <valueProcess>%aditoprj%/entity/Salesproject_entity/entityfields/projectcode/valueProcess.js</valueProcess> + <onValidation>%aditoprj%/entity/Salesproject_entity/entityfields/projectcode/onValidation.js</onValidation> + <onValueChange>%aditoprj%/entity/Salesproject_entity/entityfields/projectcode/onValueChange.js</onValueChange> + </entityField> + <entityField> + <name>PROJECTTITLE</name> + <tableName>SALESPROJECT</tableName> + <columnName>PROJECTTITLE</columnName> + <caption>Project title</caption> + <mandatory v="true" /> + </entityField> + <entityField> + <name>RELATION_ID</name> + <tableName>SALESPROJECT</tableName> + <columnName>RELATION_ID</columnName> + <caption>Company</caption> + <mandatory v="true" /> + </entityField> + <entityField> + <name>SALESPROJECTID</name> + <tableName>SALESPROJECT</tableName> + <columnName>SALESPROJECTID</columnName> + <valueProcess>%aditoprj%/entity/Salesproject_entity/entityfields/salesprojectid/valueProcess.js</valueProcess> + </entityField> + <entityField> + <name>STARTDATE</name> + <tableName>SALESPROJECT</tableName> + <columnName>STARTDATE</columnName> + <caption>Project start</caption> + <contentType>DATE</contentType> + <resolution>DAY</resolution> + <mandatory v="true" /> + <valueProcess>%aditoprj%/entity/Salesproject_entity/entityfields/startdate/valueProcess.js</valueProcess> + </entityField> + <entityField> + <name>STATUS</name> + <tableName>SALESPROJECT</tableName> + <columnName>STATUS</columnName> + <caption>Status</caption> + <mandatory v="true" /> + <possibleItemsProcess>%aditoprj%/entity/Salesproject_entity/entityfields/status/possibleItemsProcess.js</possibleItemsProcess> + </entityField> + <entityField> + <name>USER_EDIT</name> + <tableName>SALESPROJECT</tableName> + <columnName>USER_EDIT</columnName> + <valueProcess>%aditoprj%/entity/Salesproject_entity/entityfields/user_edit/valueProcess.js</valueProcess> + </entityField> + <entityField> + <name>USER_NEW</name> + <tableName>SALESPROJECT</tableName> + <columnName>USER_NEW</columnName> + <valueProcess>%aditoprj%/entity/Salesproject_entity/entityfields/user_new/valueProcess.js</valueProcess> + </entityField> + <entityField> + <name>VOLUME</name> + <tableName>SALESPROJECT</tableName> + <columnName>VOLUME</columnName> + <caption>Volume</caption> + </entityField> + <entityOutgoingField> + <name>SalesprojectOrg_dfo</name> + <fieldType>DEPENDENCY_OUT</fieldType> + <dependency> + <name>dependency</name> + <entityName>Org_entity</entityName> + <fieldName>Org_dfi</fieldName> + </dependency> + </entityOutgoingField> + </entityFields> + <linkInformation> + <linkInformation> + <name>a343a42f-d810-492e-a93f-3ffcab9a88bd</name> + <tableName>SALESPROJECT</tableName> + <primaryKey>SALESPROJECTID</primaryKey> + <isUIDTable v="true" /> + </linkInformation> + </linkInformation> +</entity> diff --git a/entity/Salesproject_entity/entityfields/date_edit/valueProcess.js b/entity/Salesproject_entity/entityfields/date_edit/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..00e95d744eab3b281e0f6ae5ee325cee91419534 --- /dev/null +++ b/entity/Salesproject_entity/entityfields/date_edit/valueProcess.js @@ -0,0 +1,6 @@ +import("system.vars"); +import("system.result"); +import("system.neon"); + +if(vars.get("$sys.operatingstate") == neon.OPERATINGSTATE_EDIT) + result.string(vars.getString("$sys.date")); \ No newline at end of file diff --git a/entity/Salesproject_entity/entityfields/date_new/valueProcess.js b/entity/Salesproject_entity/entityfields/date_new/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..7ace62531432fbfb08b15fc33e25d271dc34bd6a --- /dev/null +++ b/entity/Salesproject_entity/entityfields/date_new/valueProcess.js @@ -0,0 +1,6 @@ +import("system.vars"); +import("system.result"); +import("system.neon"); + +if(vars.get("$sys.operatingstate") == neon.OPERATINGSTATE_NEW) + result.string(vars.getString("$sys.date")); \ No newline at end of file diff --git a/entity/Salesproject_entity/entityfields/enddate/valueProcess.js b/entity/Salesproject_entity/entityfields/enddate/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..b27871853b658ad34b7de4e3e674d0a627c1617b --- /dev/null +++ b/entity/Salesproject_entity/entityfields/enddate/valueProcess.js @@ -0,0 +1,12 @@ +import("system.vars"); +import("system.result"); +import("system.neon"); +import("Date_lib"); + +if(vars.get("$sys.operatingstate") == neon.OPERATINGSTATE_NEW && vars.get("$this.value") == "") +{ + var DateUtils = new DateUtils(); + result.string(DateUtils.getDateIncrementedByYears(DateUtils.getTodayUTC(), 1)); +} +else + result.string(vars.get("$this.value")); \ No newline at end of file diff --git a/entity/Salesproject_entity/entityfields/phase/possibleItemsProcess.js b/entity/Salesproject_entity/entityfields/phase/possibleItemsProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..9d12c334f8a0626defebf0eeb2c31f6602a56477 --- /dev/null +++ b/entity/Salesproject_entity/entityfields/phase/possibleItemsProcess.js @@ -0,0 +1,8 @@ +import("system.result"); +import("Keyword_lib"); + +var kwdUtils, items; + +kwdUtils = new KeywordUtils(); +items = kwdUtils.getStandardArray("SALESPROJECT.PHASE"); +result.object(items); \ No newline at end of file diff --git a/entity/Salesproject_entity/entityfields/projectcode/onValidation.js b/entity/Salesproject_entity/entityfields/projectcode/onValidation.js new file mode 100644 index 0000000000000000000000000000000000000000..75b9fcc84cc451463b73ba313b7d9b08c154fc24 --- /dev/null +++ b/entity/Salesproject_entity/entityfields/projectcode/onValidation.js @@ -0,0 +1,11 @@ +import("system.vars"); +import("system.result"); +import("system.neon"); +import("Salesproject_lib"); + +var SalesprojectUtils = new SalesprojectUtils(); + +if( !SalesprojectUtils.validateProjectNumber(vars.get("$local.value")) ) +{ + result.string(SalesprojectUtils.getProjectNumberValidationFailString()); +} \ No newline at end of file diff --git a/entity/Salesproject_entity/entityfields/projectcode/onValueChange.js b/entity/Salesproject_entity/entityfields/projectcode/onValueChange.js new file mode 100644 index 0000000000000000000000000000000000000000..0f757ce13a4365fde10f3b977692e31fef981a94 --- /dev/null +++ b/entity/Salesproject_entity/entityfields/projectcode/onValueChange.js @@ -0,0 +1,7 @@ +//import("system.neon"); +//import("system.result"); +//import("Salesproject_lib"); +// +//var SalesprojectUtils = new SalesprojectUtils(); +// +//neon.setFieldValue("$field.PROJECTCODE", SalesprojectUtils.getNextProjectNumber()); \ No newline at end of file diff --git a/entity/Salesproject_entity/entityfields/projectcode/valueProcess.js b/entity/Salesproject_entity/entityfields/projectcode/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..ae603c5b65c7d5a626ec4896db39c8e1fecfdeb8 --- /dev/null +++ b/entity/Salesproject_entity/entityfields/projectcode/valueProcess.js @@ -0,0 +1,11 @@ +import("system.vars"); +import("system.result"); +import("system.neon"); +import("Salesproject_lib"); + +if(vars.get("$sys.operatingstate") == neon.OPERATINGSTATE_NEW) +{ + var SalesprojectUtils = new SalesprojectUtils(); + + result.string( SalesprojectUtils.getNextProjectNumber() ); +} \ No newline at end of file diff --git a/entity/Salesproject_entity/entityfields/salesprojectid/valueProcess.js b/entity/Salesproject_entity/entityfields/salesprojectid/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..5be18c39832eee52e38b7147961d7db4bab5a588 --- /dev/null +++ b/entity/Salesproject_entity/entityfields/salesprojectid/valueProcess.js @@ -0,0 +1,7 @@ +import("system.util"); +import("system.vars"); +import("system.result"); +import("system.neon"); + +if(vars.get("$sys.operatingstate") == neon.OPERATINGSTATE_NEW) + result.string(util.getNewUUID()); \ No newline at end of file diff --git a/entity/Salesproject_entity/entityfields/startdate/valueProcess.js b/entity/Salesproject_entity/entityfields/startdate/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..af2c1f09cc605dfe6664dd0c9829026fc6785993 --- /dev/null +++ b/entity/Salesproject_entity/entityfields/startdate/valueProcess.js @@ -0,0 +1,12 @@ +import("system.vars"); +import("system.result"); +import("system.neon"); +import("Date_lib"); + +if(vars.get("$sys.operatingstate") == neon.OPERATINGSTATE_NEW && vars.get("$this.value") == "") +{ + var DateUtils = new DateUtils(); + result.string(DateUtils.getTodayUTC()); +} +else + result.string(vars.get("$this.value")); \ No newline at end of file diff --git a/entity/Salesproject_entity/entityfields/status/possibleItemsProcess.js b/entity/Salesproject_entity/entityfields/status/possibleItemsProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..b6e8809f0d24c7f2ce8732b420a058e8c5229e5a --- /dev/null +++ b/entity/Salesproject_entity/entityfields/status/possibleItemsProcess.js @@ -0,0 +1,8 @@ +import("system.result"); +import("Keyword_lib"); + +var kwdUtils, items; + +kwdUtils = new KeywordUtils(); +items = kwdUtils.getStandardArray("SALESPROJECT.STATUS"); +result.object(items); \ No newline at end of file diff --git a/entity/Salesproject_entity/entityfields/user_edit/valueProcess.js b/entity/Salesproject_entity/entityfields/user_edit/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..67c86b14ca987054658978c88cecf6bd03fa44af --- /dev/null +++ b/entity/Salesproject_entity/entityfields/user_edit/valueProcess.js @@ -0,0 +1,6 @@ +import("system.vars"); +import("system.result"); +import("system.neon"); + +if(vars.get("$sys.operatingstate") == neon.OPERATINGSTATE_EDIT) + result.string(vars.getString("$sys.user")); \ No newline at end of file diff --git a/entity/Salesproject_entity/entityfields/user_new/valueProcess.js b/entity/Salesproject_entity/entityfields/user_new/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..81966a3fbcd9b3cf25a186c93baa1928abc9d6d2 --- /dev/null +++ b/entity/Salesproject_entity/entityfields/user_new/valueProcess.js @@ -0,0 +1,6 @@ +import("system.vars"); +import("system.result"); +import("system.neon"); + +if(vars.get("$sys.operatingstate") == neon.OPERATINGSTATE_NEW) + result.string(vars.getString("$sys.user")); \ No newline at end of file diff --git a/language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod b/language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod index 752d6106fc2c147a633f72d6b4b9e18f177d7417..633b9e2ba93f6d53898ee141ceb80fd26e204d99 100644 --- a/language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod +++ b/language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod @@ -537,6 +537,84 @@ <entry> <key>Quantity</key> </entry> + <entry> + <key>Current purchase/sales price</key> + </entry> + <entry> + <key>Salesproject</key> + </entry> + <entry> + <key>Rollout</key> + </entry> + <entry> + <key>Estimation</key> + </entry> + <entry> + <key>Phase</key> + </entry> + <entry> + <key>Product number</key> + </entry> + <entry> + <key>Project number</key> + </entry> + <entry> + <key>Project title</key> + </entry> + <entry> + <key>Project start</key> + </entry> + <entry> + <key>Volume</key> + </entry> + <entry> + <key>The project number already exists!</key> + </entry> + <entry> + <key>Partial order</key> + </entry> + <entry> + <key>Open</key> + </entry> + <entry> + <key>Lost</key> + </entry> + <entry> + <key>Order</key> + </entry> + <entry> + <key>Postponed</key> + </entry> + <entry> + <key>Aborted</key> + </entry> + <entry> + <key>Negotiation</key> + </entry> + <entry> + <key>Workshop</key> + </entry> + <entry> + <key>Presentation preparation</key> + </entry> + <entry> + <key>Waiting for request</key> + </entry> + <entry> + <key>Specifications in progress</key> + </entry> + <entry> + <key>Project decision</key> + </entry> + <entry> + <key>Lead</key> + </entry> + <entry> + <key>Presentation postprocessing</key> + </entry> + <entry> + <key>Statement given</key> + </entry> </keyValueMap> <font name="Dialog" style="0" size="11" /> <sqlModels> diff --git a/language/_____LANGUAGE_de/_____LANGUAGE_de.aod b/language/_____LANGUAGE_de/_____LANGUAGE_de.aod index f15a8cd953409c3b832bf5a431a03d058f44dccd..4efdbc55afbd2f2b0d8349b0891a2af53e001290 100644 --- a/language/_____LANGUAGE_de/_____LANGUAGE_de.aod +++ b/language/_____LANGUAGE_de/_____LANGUAGE_de.aod @@ -710,6 +710,106 @@ <entry> <key>Menge</key> </entry> + <entry> + <key>Salesproject</key> + <value>Vertriebsprojekt</value> + </entry> + <entry> + <key>Rollout</key> + <value>Roll Out</value> + </entry> + <entry> + <key>Estimation</key> + <value>Einschätzung</value> + </entry> + <entry> + <key>Phase</key> + <value>Phase</value> + </entry> + <entry> + <key>Product number</key> + <value>Produktnummer</value> + </entry> + <entry> + <key>Project number</key> + <value>Projektnummer</value> + </entry> + <entry> + <key>Project title</key> + <value>Projekttitel</value> + </entry> + <entry> + <key>Project start</key> + <value>Projektstart</value> + </entry> + <entry> + <key>Volume</key> + <value>Volumen</value> + </entry> + <entry> + <key>The project number already exists!</key> + <value>Die Projektnummer existiert bereits!</value> + </entry> + <entry> + <key>Partial order</key> + <value>Teilauftrag</value> + </entry> + <entry> + <key>Open</key> + <value>Offen</value> + </entry> + <entry> + <key>Lost</key> + <value>Verloren</value> + </entry> + <entry> + <key>Order</key> + <value>Auftrag</value> + </entry> + <entry> + <key>Postponed</key> + <value>Vertagt</value> + </entry> + <entry> + <key>Aborted</key> + <value>Abgebrochen</value> + </entry> + <entry> + <key>Negotiation</key> + <value>Verhandlung</value> + </entry> + <entry> + <key>Workshop</key> + <value>Workshop</value> + </entry> + <entry> + <key>Presentation preparation</key> + <value>Präsentationsvorbereitung</value> + </entry> + <entry> + <key>Waiting for request</key> + <value>Auf Anforderungen warten</value> + </entry> + <entry> + <key>Specifications in progress</key> + <value>Lastenheft in Bearbeitung</value> + </entry> + <entry> + <key>Project decision</key> + <value>Projektentscheidung</value> + </entry> + <entry> + <key>Lead</key> + <value>Lead</value> + </entry> + <entry> + <key>Presentation postprocessing</key> + <value>Präsentationsnachbereitung</value> + </entry> + <entry> + <key>Statement given</key> + <value>Stellungnahme abgeben</value> + </entry> </keyValueMap> <font name="Dialog" style="0" size="11" /> </language> diff --git a/language/_____LANGUAGE_en/_____LANGUAGE_en.aod b/language/_____LANGUAGE_en/_____LANGUAGE_en.aod index 286cdf13592839be873333620b4617f290ee5065..1443178f82b7d0addf60fb86f6d0fad128bb236b 100644 --- a/language/_____LANGUAGE_en/_____LANGUAGE_en.aod +++ b/language/_____LANGUAGE_en/_____LANGUAGE_en.aod @@ -545,6 +545,84 @@ <entry> <key>Quantity</key> </entry> + <entry> + <key>Current purchase/sales price</key> + </entry> + <entry> + <key>Salesproject</key> + </entry> + <entry> + <key>Rollout</key> + </entry> + <entry> + <key>Estimation</key> + </entry> + <entry> + <key>Phase</key> + </entry> + <entry> + <key>Product number</key> + </entry> + <entry> + <key>Project number</key> + </entry> + <entry> + <key>Project title</key> + </entry> + <entry> + <key>Project start</key> + </entry> + <entry> + <key>Volume</key> + </entry> + <entry> + <key>The project number already exists!</key> + </entry> + <entry> + <key>Partial order</key> + </entry> + <entry> + <key>Open</key> + </entry> + <entry> + <key>Lost</key> + </entry> + <entry> + <key>Order</key> + </entry> + <entry> + <key>Postponed</key> + </entry> + <entry> + <key>Aborted</key> + </entry> + <entry> + <key>Negotiation</key> + </entry> + <entry> + <key>Workshop</key> + </entry> + <entry> + <key>Presentation preparation</key> + </entry> + <entry> + <key>Waiting for request</key> + </entry> + <entry> + <key>Specifications in progress</key> + </entry> + <entry> + <key>Project decision</key> + </entry> + <entry> + <key>Lead</key> + </entry> + <entry> + <key>Presentation postprocessing</key> + </entry> + <entry> + <key>Statement given</key> + </entry> </keyValueMap> <font name="Dialog" style="0" size="11" /> </language> diff --git a/neonContext/Salesproject_context/Salesproject_context.aod b/neonContext/Salesproject_context/Salesproject_context.aod new file mode 100644 index 0000000000000000000000000000000000000000..4619a612976d4d83265083082193f6db41bd2b5e --- /dev/null +++ b/neonContext/Salesproject_context/Salesproject_context.aod @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="UTF-8"?> +<neonContext xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.0.0" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonContext/1.0.0"> + <name>Salesproject_context</name> + <title>Salesproject</title> + <majorModelMode>DISTRIBUTED</majorModelMode> + <mainview>SalesprojectMain_view</mainview> + <filterview>SalesprojectFilter_view</filterview> + <editview>SalesprojectEdit_view</editview> + <preview>SalesprojectPreview_view</preview> + <entity>Salesproject_entity</entity> + <references> + <neonViewReference> + <name>a791a80d-ecec-43e3-b168-633e411835c2</name> + <view>SalesprojectPreview_view</view> + </neonViewReference> + <neonViewReference> + <name>0d053d4a-a946-417f-a6f7-95e22b9a7cae</name> + <view>SalesprojectMain_view</view> + </neonViewReference> + <neonViewReference> + <name>fe6fb9fc-4e7c-49d6-a452-e022b55cbc55</name> + <view>SalesprojectFilter_view</view> + </neonViewReference> + <neonViewReference> + <name>c35cc718-94a8-43cf-afe4-f02d251d4e9f</name> + <view>SalesprojectEdit_view</view> + </neonViewReference> + </references> +</neonContext> diff --git a/neonView/SalesprojectEdit_view/SalesprojectEdit_view.aod b/neonView/SalesprojectEdit_view/SalesprojectEdit_view.aod new file mode 100644 index 0000000000000000000000000000000000000000..18c48ce098c04d4bfc50ecbb1beb86850fe80186 --- /dev/null +++ b/neonView/SalesprojectEdit_view/SalesprojectEdit_view.aod @@ -0,0 +1,59 @@ +<?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.0.0" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.0.0"> + <name>SalesprojectEdit_view</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <layout> + <boxLayout> + <name>layout</name> + </boxLayout> + </layout> + <children> + <genericViewTemplate> + <name>SalesprojectEdit_generic</name> + <editMode v="true" /> + <entityField>#ENTITY</entityField> + <fields> + <entityFieldLink> + <name>2bc931ef-03f4-4812-b75f-70070c3dc849</name> + <entityField>PROJECTTITLE</entityField> + </entityFieldLink> + <entityFieldLink> + <name>a68c2b51-4b0d-46b0-b97e-dc87d168cf0a</name> + <entityField>PROJECTCODE</entityField> + </entityFieldLink> + <entityFieldLink> + <name>d0a2027b-1796-4c5c-82f5-6fdb8f178ab5</name> + <entityField>RELATION_ID</entityField> + </entityFieldLink> + <entityFieldLink> + <name>ceaa6824-a100-4552-a3a7-50a84faadaf9</name> + <entityField>INFO</entityField> + </entityFieldLink> + <entityFieldLink> + <name>218a0751-9a53-4639-9d79-f9463f399b93</name> + <entityField>STATUS</entityField> + </entityFieldLink> + <entityFieldLink> + <name>c00b2121-c44d-41a1-8c32-e2339b4dd234</name> + <entityField>PHASE</entityField> + </entityFieldLink> + <entityFieldLink> + <name>13ad6d3f-3a5d-4385-aae6-c454ab7531f4</name> + <entityField>STARTDATE</entityField> + </entityFieldLink> + <entityFieldLink> + <name>ed4308b5-dd5a-49a1-b748-9a2980291d56</name> + <entityField>ENDDATE</entityField> + </entityFieldLink> + <entityFieldLink> + <name>5b3c3dc2-4ca5-45c5-96e5-7196a99dcdce</name> + <entityField>VOLUME</entityField> + </entityFieldLink> + <entityFieldLink> + <name>f9332d9d-184b-4044-afaf-5d377fe59072</name> + <entityField>ESTIMATION</entityField> + </entityFieldLink> + </fields> + </genericViewTemplate> + </children> +</neonView> diff --git a/neonView/SalesprojectFilter_view/SalesprojectFilter_view.aod b/neonView/SalesprojectFilter_view/SalesprojectFilter_view.aod new file mode 100644 index 0000000000000000000000000000000000000000..ea47ded94475100f9c2fe86d9c88c01b66cd38dd --- /dev/null +++ b/neonView/SalesprojectFilter_view/SalesprojectFilter_view.aod @@ -0,0 +1,46 @@ +<?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.0.0" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.0.0"> + <name>SalesprojectFilter_view</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <layout> + <boxLayout> + <name>layout</name> + </boxLayout> + </layout> + <children> + <tableViewTemplate> + <name>SalesprojectFilter_table</name> + <entityField>#ENTITY</entityField> + <columns> + <neonTableColumn> + <name>91a153d4-4ede-4ba1-b11e-713e476e77c9</name> + <entityField>PROJECTCODE</entityField> + </neonTableColumn> + <neonTableColumn> + <name>9f6b967e-5140-420f-84ca-2273920221bd</name> + <entityField>PROJECTTITLE</entityField> + </neonTableColumn> + <neonTableColumn> + <name>fec843c3-f7c0-42c7-8295-50386651edb2</name> + <entityField>STARTDATE</entityField> + </neonTableColumn> + <neonTableColumn> + <name>4cc3c3f1-6f86-434d-8d1d-32a965aa76b2</name> + <entityField>ENDDATE</entityField> + </neonTableColumn> + <neonTableColumn> + <name>92699fdb-4eea-4ce2-98d2-6cc3f3b7581e</name> + <entityField>VOLUME</entityField> + </neonTableColumn> + <neonTableColumn> + <name>2689fee8-bebb-4d7c-b11e-4a7310664977</name> + <entityField>PHASE</entityField> + </neonTableColumn> + <neonTableColumn> + <name>52a851b0-9059-4d57-8ff5-335c819359e8</name> + <entityField>STATUS</entityField> + </neonTableColumn> + </columns> + </tableViewTemplate> + </children> +</neonView> diff --git a/neonView/SalesprojectMain_view/SalesprojectMain_view.aod b/neonView/SalesprojectMain_view/SalesprojectMain_view.aod new file mode 100644 index 0000000000000000000000000000000000000000..b8ddc1dc4d32f3cd0d3b40406ab297cec4655240 --- /dev/null +++ b/neonView/SalesprojectMain_view/SalesprojectMain_view.aod @@ -0,0 +1,10 @@ +<?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.0.0" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.0.0"> + <name>SalesprojectMain_view</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <layout> + <masterSlaveLayout> + <name>layout</name> + </masterSlaveLayout> + </layout> +</neonView> diff --git a/neonView/SalesprojectPreview_view/SalesprojectPreview_view.aod b/neonView/SalesprojectPreview_view/SalesprojectPreview_view.aod new file mode 100644 index 0000000000000000000000000000000000000000..8262da274e19afb0d1a51c80bc3443f6575aa2fd --- /dev/null +++ b/neonView/SalesprojectPreview_view/SalesprojectPreview_view.aod @@ -0,0 +1,10 @@ +<?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.0.0" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.0.0"> + <name>SalesprojectPreview_view</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <layout> + <boxLayout> + <name>layout</name> + </boxLayout> + </layout> +</neonView> diff --git a/others/db_changes/masterChangelog.xml b/others/db_changes/masterChangelog.xml index ee76531830eadd8c20d9b6e685bc4fa4e5d4927c..39d5255053435a431ce10372adf9eeb366025542 100644 --- a/others/db_changes/masterChangelog.xml +++ b/others/db_changes/masterChangelog.xml @@ -13,6 +13,7 @@ <include file="struct/create_prod2prod.xml"/> <include file="struct/create_productprice.xml"/> <include file="struct/create_stock.xml"/> + <include file="struct/create_salesproject.xml"/> <include file="struct/contractChanges.xml"/> <include file="struct/productChanges.xml"/> <include file="misc/1535533490181_persChanges.xml"/> diff --git a/others/db_changes/struct/create_salesproject.xml b/others/db_changes/struct/create_salesproject.xml new file mode 100644 index 0000000000000000000000000000000000000000..3c95b04689af9ccb87e3c8e432ceb7ffcfddff17 --- /dev/null +++ b/others/db_changes/struct/create_salesproject.xml @@ -0,0 +1,37 @@ +<?xml version="1.1" encoding="UTF-8" standalone="no"?> +<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd"> + <changeSet author="m.schroeger" id="52da4775-e669-4633-ac22-3c5a74e44be9"> + <createTable tableName="SALESPROJECT"> + + <column name="PROJECTCODE" type="INTEGER"> + <constraints nullable="false" unique="true" uniqueConstraintName="UNIQUE_SALESPROJECT_PROJECTCODE" /> + </column> + <column name="PROJECTTITLE" type="VARCHAR(30)"/> + <column name="RELATION_ID" type="CHAR(36)"> + <constraints nullable="false"/> + </column> + <column name="INFO" type="CLOB"/> + <column name="STATUS" type="INTEGER"/> + <column name="PHASE" type="INTEGER"/> + <column name="VOLUME" type="NUMERIC(14,2)"/> + <column name="STARTDATE" type="TIMESTAMP"/> + <column name="ENDDATE" type="TIMESTAMP"/> + <column name="ESTIMATION" type="VARCHAR(50)"/> + <column name="ESTIMATIONVALUE" type="INTEGER"/> + + <column name="SALESPROJECTID" type="CHAR(36)"> + <constraints primaryKey="true" primaryKeyName="PK_SALESPROJECT_SALESPROJECTID"/> + </column> + + <column name="USER_EDIT" type="VARCHAR(50)"/> + <column name="USER_NEW" type="VARCHAR(50)"> + <constraints nullable="false"/> + </column> + <column name="DATE_NEW" type="TIMESTAMP"> + <constraints nullable="false"/> + </column> + <column name="DATE_EDIT" type="TIMESTAMP"/> + + </createTable> + </changeSet> +</databaseChangeLog> \ No newline at end of file diff --git a/process/Date_lib/process.js b/process/Date_lib/process.js index fd70a766cc9dbb38afecdc501d0c8d83b79168e4..18a8c5d75a362aa1c4c552ee1cb394267be39062 100644 --- a/process/Date_lib/process.js +++ b/process/Date_lib/process.js @@ -1,9 +1,12 @@ import("system.translate"); +import("system.datetime"); + /** * provides methods for interactions with dates */ function DateUtils(){ - + + var that = this; /** * Validates two date inputs (beginning should always be before the end!) * @@ -13,11 +16,34 @@ function DateUtils(){ * @result {Boolean|null} Boolean if it was able to check smth or null if the input values were not valid */ this.validateBeginnBeforeEnd = function(pStart, pEnd) { - if (pStart == "" || pStart == null || pEnd == "" || pEnd == null) return null + if (pStart == "" || pStart == null || pEnd == "" || pEnd == null) return null; return pStart <= pEnd; } this.getValidationFailString = function(){ return translate.text("The expiry date must be after the start date!"); } + + /** + * Delivers the current date at midnight in UTC + * + * @result {Number} + */ + this.getTodayUTC = function(){ + return datetime.today("UTC"); + } + + /** + * Delivers the passed date incremented by passed years + * + * @param pDate {Number} + * @param pYears {Number} + * + * @result {Number} date incremented by years + */ + this.getDateIncrementedByYears = function(pDate, pYears){ + var dateObj = new Date(pDate); + + return dateObj.setFullYear(dateObj.getFullYear() + pYears); + } } \ No newline at end of file diff --git a/process/Keyword_lib/process.js b/process/Keyword_lib/process.js index 5a86e8886e47eff2e87bf296b0d76cca698c22b9..bb12c1b1d8a278f57fc708b36a56fa74c895c1cd 100644 --- a/process/Keyword_lib/process.js +++ b/process/Keyword_lib/process.js @@ -185,6 +185,29 @@ function KeywordUtils(){ ,createKeywordEntry("3", translate.text("Warehouse 3")) ]); break; + case "SALESPROJECT.STATUS": + valueContainer = createKeywordEntriesContainer([ + createKeywordEntry("1", translate.text("Open")) + ,createKeywordEntry("2", translate.text("Postponed")) + ,createKeywordEntry("3", translate.text("Aborted")) + ,createKeywordEntry("4", translate.text("Partial order")) + ,createKeywordEntry("5", translate.text("Order")) + ,createKeywordEntry("6", translate.text("Lost")) + ]); + break; + case "SALESPROJECT.PHASE": + valueContainer = createKeywordEntriesContainer([ + createKeywordEntry("1", translate.text("Project decision")) + ,createKeywordEntry("2", translate.text("Negotiation")) + ,createKeywordEntry("3", translate.text("Workshop")) + ,createKeywordEntry("4", translate.text("Presentation postprocessing")) + ,createKeywordEntry("5", translate.text("Presentation preparation")) + ,createKeywordEntry("6", translate.text("Statement given")) + ,createKeywordEntry("7", translate.text("Specifications in progress")) + ,createKeywordEntry("8", translate.text("Waiting for request")) + ,createKeywordEntry("9", translate.text("Lead")) + ]); + break; default: throw new Error(translate.withArguments("[%0]the given keyword \"%1\" has no match with the possible keywordlist", [ arguments.callee.name, keywordType diff --git a/process/Salesproject_lib/Salesproject_lib.aod b/process/Salesproject_lib/Salesproject_lib.aod new file mode 100644 index 0000000000000000000000000000000000000000..7ee5946b8e74e524bc4703941b72d44a4a59318d --- /dev/null +++ b/process/Salesproject_lib/Salesproject_lib.aod @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<process xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.7" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/process/1.1.7"> + <name>Salesproject_lib</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <process>%aditoprj%/process/Salesproject_lib/process.js</process> +</process> diff --git a/process/Salesproject_lib/process.js b/process/Salesproject_lib/process.js new file mode 100644 index 0000000000000000000000000000000000000000..29141bbff53361c4d48b5c6b5d6de9fea73dcf55 --- /dev/null +++ b/process/Salesproject_lib/process.js @@ -0,0 +1,45 @@ +import("system.translate"); +import("system.db"); +import("system.eMath"); + +function SalesprojectUtils(){ + var that = this; + /** + * Delivers the next valid project number (has to be unique) + * + * @result {String} next valid project number + */ + this.getNextProjectNumber = function(){ + var maxNum = that.getMaxProjectNumber(); + + if(maxNum == "0") return 1000; //start number + + return eMath.addInt(maxNum, "1");//increment currently highest number + } + + /** + * Checks if the passed project number is valid (has to be unique) + * + * @result {boolean} passed projectnumber is valid + */ + this.validateProjectNumber = function(pProjectNumber){ + var maxNum = that.getMaxProjectNumber(); + + return Number(pProjectNumber) > Number(maxNum); + } + + this.getProjectNumberValidationFailString = function(){ + return translate.text("The project number already exists!"); + } + + /** + * Delivers the hightest project number currently stored in database + * + * @result {String} hightest project number + */ + this.getMaxProjectNumber = function(){ + var maxNum = db.cell("select max(PROJECTCODE) from SALESPROJECT"); + + return maxNum == "" ? "0" : maxNum; + } +} \ No newline at end of file