diff --git a/entity/SalesprojectAnalyses_entity/SalesprojectAnalyses_entity.aod b/entity/SalesprojectAnalyses_entity/SalesprojectAnalyses_entity.aod index 4b857c463d4b9a395f38fcafc633b2a717565cc6..14ed2eb3dfcaf0d527dfa6c9b6f313cbbb5be44b 100644 --- a/entity/SalesprojectAnalyses_entity/SalesprojectAnalyses_entity.aod +++ b/entity/SalesprojectAnalyses_entity/SalesprojectAnalyses_entity.aod @@ -69,6 +69,20 @@ <name>openTurnover</name> <onActionProcess>%aditoprj%/entity/SalesprojectAnalyses_entity/entityfields/openturnover/onActionProcess.js</onActionProcess> </entityActionField> + <entityField> + <name>MY_FORECAST</name> + <title></title> + <contentType>NUMBER</contentType> + <titleProcess>%aditoprj%/entity/SalesprojectAnalyses_entity/entityfields/my_forecast/titleProcess.js</titleProcess> + <valueProcess>%aditoprj%/entity/SalesprojectAnalyses_entity/entityfields/my_forecast/valueProcess.js</valueProcess> + </entityField> + <entityField> + <name>MY_TURNOVER</name> + <title></title> + <contentType>NUMBER</contentType> + <titleProcess>%aditoprj%/entity/SalesprojectAnalyses_entity/entityfields/my_turnover/titleProcess.js</titleProcess> + <valueProcess>%aditoprj%/entity/SalesprojectAnalyses_entity/entityfields/my_turnover/valueProcess.js</valueProcess> + </entityField> </entityFields> <recordContainers> <jDitoRecordContainer> diff --git a/entity/SalesprojectAnalyses_entity/entityfields/my_forecast/titleProcess.js b/entity/SalesprojectAnalyses_entity/entityfields/my_forecast/titleProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..560e877e47a8ea6bbc6ed399e2daac3f325e38e4 --- /dev/null +++ b/entity/SalesprojectAnalyses_entity/entityfields/my_forecast/titleProcess.js @@ -0,0 +1,6 @@ +import("system.vars"); +import("system.result"); +import("system.translate"); +import("system.datetime"); + +result.string(translate.text("My Forecast") + " " + datetime.toDate(vars.get("$sys.date"), "yyyy")); \ No newline at end of file diff --git a/entity/SalesprojectAnalyses_entity/entityfields/my_forecast/valueProcess.js b/entity/SalesprojectAnalyses_entity/entityfields/my_forecast/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..3c50ff040b61415400542117cabae20fc0c81ef5 --- /dev/null +++ b/entity/SalesprojectAnalyses_entity/entityfields/my_forecast/valueProcess.js @@ -0,0 +1,19 @@ +import("Employee_lib"); +import("system.datetime"); +import("system.db"); +import("system.result"); +import("system.vars"); +import("Date_lib"); +import("Sql_lib"); +import("system.SQLTYPES") + +var myContactId = EmployeeUtils.getCurrentContactId(); + +var forecast = db.cell(SqlCondition.begin() + .andPrepare("FORECAST.DATE_START", datetime.toDate(vars.get("$sys.date"), "yyyy"), "year(#) = ?", SQLTYPES.INTEGER) + .andPrepare("OBJECTMEMBER.OBJECT_TYPE", 'Salesproject') + .andPrepare("OBJECTMEMBER.CONTACT_ID", myContactId) + .buildSql("select SUM(VOLUME) from OBJECTMEMBER \n\ + left join FORECAST on FORECAST.OBJECT_TYPE = OBJECTMEMBER.OBJECT_TYPE and FORECAST.OBJECT_ROWID = OBJECTMEMBER.OBJECT_ROWID", "1=2")); + +result.string(forecast); \ No newline at end of file diff --git a/entity/SalesprojectAnalyses_entity/entityfields/my_turnover/titleProcess.js b/entity/SalesprojectAnalyses_entity/entityfields/my_turnover/titleProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..4da42294dd45de76617cf85e2cff74d657b83dae --- /dev/null +++ b/entity/SalesprojectAnalyses_entity/entityfields/my_turnover/titleProcess.js @@ -0,0 +1,6 @@ +import("system.vars"); +import("system.result"); +import("system.translate"); +import("system.datetime"); + +result.string(translate.text("My Turnover") + " " + datetime.toDate(vars.get("$sys.date"), "yyyy")); \ No newline at end of file diff --git a/entity/SalesprojectAnalyses_entity/entityfields/my_turnover/valueProcess.js b/entity/SalesprojectAnalyses_entity/entityfields/my_turnover/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..96e77fc13bbbfbb882aff47694f90a82546b41ba --- /dev/null +++ b/entity/SalesprojectAnalyses_entity/entityfields/my_turnover/valueProcess.js @@ -0,0 +1,21 @@ +import("Employee_lib"); +import("Contact_lib"); +import("system.logging"); +import("system.datetime"); +import("system.db"); +import("system.result"); +import("system.vars"); +import("Date_lib"); +import("Sql_lib"); +import("system.SQLTYPES") + +var myContactId = EmployeeUtils.getCurrentContactId(); + + +var turnover = db.cell(SqlCondition.begin() + .andPrepare("SALESORDER.SALESORDERDATE", datetime.toDate(vars.get("$sys.date"), "yyyy"), "year(#) = ?", SQLTYPES.INTEGER) + .andPrepare("SALESORDER.ORDERTYPE", "ORDTYPEINVO") + .andPrepare("SALESORDER.CONTACT_ID", myContactId) + .buildSql("select sum(NET + VAT) from SALESORDER", "1=2")); + +result.string(turnover); \ No newline at end of file diff --git a/language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod b/language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod index 7378d09cd2b85e86d4f32421d02fa1e998a095a3..9b6463ac1362dc9f9182b6c5736e4b3e04621b89 100644 --- a/language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod +++ b/language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod @@ -5106,6 +5106,21 @@ <entry> <key>Private person</key> </entry> + <entry> + <key>Displays the amounts of my personal forecast and the turnover I have already made</key> + </entry> + <entry> + <key>My Keyfigures</key> + </entry> + <entry> + <key>My Forecast and Turnover </key> + </entry> + <entry> + <key>Shows my Forecast and Turnover for the actual year</key> + </entry> + <entry> + <key>My Forecast and Turnover</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 1467c796d59a52d93ef140770916c7e8b77a5dfd..ebe76f0e88a740a20f34de4763fe540723e5480b 100644 --- a/language/_____LANGUAGE_de/_____LANGUAGE_de.aod +++ b/language/_____LANGUAGE_de/_____LANGUAGE_de.aod @@ -259,6 +259,7 @@ </entry> <entry> <key>My Forecast</key> + <value>Mein Forecast</value> </entry> <entry> <key>Anonymization</key> @@ -293,6 +294,7 @@ </entry> <entry> <key>My Turnover</key> + <value>Mein Umsatz</value> </entry> <entry> <key>NORMAL</key> @@ -6393,6 +6395,60 @@ <key>Private persons</key> <value>Privatpersonen</value> </entry> + <entry> + <key>The contract number already exists!</key> + </entry> + <entry> + <key>Morocco</key> + </entry> + <entry> + <key>Colombia</key> + </entry> + <entry> + <key>Password</key> + </entry> + <entry> + <key>archieve</key> + </entry> + <entry> + <key>Bangladesh</key> + </entry> + <entry> + <key>Total VAT</key> + </entry> + <entry> + <key>DataPrivacy Use</key> + </entry> + <entry> + <key>Faroe Islands</key> + </entry> + <entry> + <key>${CONTRACT_STATUS}</key> + </entry> + <entry> + <key>Time in minutes</key> + </entry> + <entry> + <key>the number of your applications</key> + </entry> + <entry> + <key>Displays the amounts of my personal forecast and the turnover I have already made</key> + </entry> + <entry> + <key>My Keyfigures</key> + <value>Mein Umsatz und Forecast</value> + </entry> + <entry> + <key>My Forecast and Turnover </key> + <value>Mein Forecast und Umsatz</value> + </entry> + <entry> + <key>Shows my Forecast and Turnover for the actual year</key> + <value>Zeigt meinen Forecast und meinen Umsatz fürs aktuelle Jahr</value> + </entry> + <entry> + <key>My Forecast and Turnover</key> + </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 910106084185923f69b1658d72f5024861f83ac7..0ed96dafd281b1a15aec6df38f8e2b306009ff20 100644 --- a/language/_____LANGUAGE_en/_____LANGUAGE_en.aod +++ b/language/_____LANGUAGE_en/_____LANGUAGE_en.aod @@ -5156,6 +5156,21 @@ <entry> <key>Private person</key> </entry> + <entry> + <key>Displays the amounts of my personal forecast and the turnover I have already made</key> + </entry> + <entry> + <key>My Keyfigures</key> + </entry> + <entry> + <key>My Forecast and Turnover </key> + </entry> + <entry> + <key>Shows my Forecast and Turnover for the actual year</key> + </entry> + <entry> + <key>My Forecast and Turnover</key> + </entry> </keyValueMap> <font name="Dialog" style="0" size="11" /> </language> diff --git a/neonContext/SalesprojectAnalyses/SalesprojectAnalyses.aod b/neonContext/SalesprojectAnalyses/SalesprojectAnalyses.aod index 712d9ac63b328dc3ce8ad4d8392833abb7997703..6bd2147f73b6d97849169c044ddcffdf39f2ad18 100644 --- a/neonContext/SalesprojectAnalyses/SalesprojectAnalyses.aod +++ b/neonContext/SalesprojectAnalyses/SalesprojectAnalyses.aod @@ -12,5 +12,9 @@ <name>ccb97c28-966a-4206-b981-140e87e680bf</name> <view>SalesprojectScoreCard_view</view> </neonViewReference> + <neonViewReference> + <name>061f17e3-6dfc-4908-8bc0-b0a70a6969cb</name> + <view>MyTurnoverForecastScoreCard_view</view> + </neonViewReference> </references> </neonContext> diff --git a/neonView/MyTurnoverForecastScoreCard_view/MyTurnoverForecastScoreCard_view.aod b/neonView/MyTurnoverForecastScoreCard_view/MyTurnoverForecastScoreCard_view.aod new file mode 100644 index 0000000000000000000000000000000000000000..cf20ba560914250cfb512324a956398390ea0fd8 --- /dev/null +++ b/neonView/MyTurnoverForecastScoreCard_view/MyTurnoverForecastScoreCard_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.1.2" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.2"> + <name>MyTurnoverForecastScoreCard_view</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <dashletConfigurations> + <neonDashletConfiguration> + <name>myForecastTurnover</name> + <title>My Forecast and Turnover</title> + <description>Shows my Forecast and Turnover for the actual year</description> + <fragment>SalesprojectAnalyses/full</fragment> + <icon>VAADIN:MONEY</icon> + <categories> + <neonDashletCategory> + <name>sales</name> + <title>Sales</title> + </neonDashletCategory> + </categories> + </neonDashletConfiguration> + </dashletConfigurations> + <layout> + <boxLayout> + <name>layout</name> + </boxLayout> + </layout> + <children> + <scoreCardViewTemplate> + <name>MyTurnoverForecastScoreCard</name> + <entityField>#ENTITY</entityField> + <devices> + <element>MOBILE</element> + <element>TABLET</element> + <element>DESKTOP</element> + </devices> + <fields> + <entityFieldLink> + <name>2c7f674c-aff5-41a6-bf35-5d7af944611b</name> + <entityField>MY_FORECAST</entityField> + </entityFieldLink> + <entityFieldLink> + <name>3935bdc4-fd46-46af-85f3-3001cf33f955</name> + <entityField>MY_TURNOVER</entityField> + </entityFieldLink> + </fields> + </scoreCardViewTemplate> + </children> +</neonView>