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

Fixes, TODOs, refactorings

parent 27a84dfa
No related branches found
No related tags found
No related merge requests found
Showing
with 109 additions and 12 deletions
import("Entity_lib");
// TODO: also there is currently no good way to do updates with fields not connected to the record container. Workaround: imagevariable and update in onDBUpdate Process
// TODO: also there is currently no good way to do updates with fields not connected to the record container. Workaround: imagevariable and update in onDBUpdate Process #1030023
FieldChanges.setChange("$field.IMAGE");
\ No newline at end of file
import("Entity_lib");
// TODO: also there is currently no good way to do updates with fields not connected to the record container. Workaround: imagevariable and update in onDBUpdate Process
// TODO: also there is currently no good way to do updates with fields not connected to the record container. Workaround: imagevariable and update in onDBUpdate Process #1030023
FieldChanges.setChange("$field.STANDARD_EMAIL_COMMUNICATION");
\ No newline at end of file
import("Entity_lib");
// TODO: also there is currently no good way to do updates with fields not connected to the record container. Workaround: imagevariable and update in onDBUpdate Process
// TODO: also there is currently no good way to do updates with fields not connected to the record container. Workaround: imagevariable and update in onDBUpdate Process #1030023
FieldChanges.setChange("$field.STANDARD_PHONE_COMMUNICATION");
\ No newline at end of file
......@@ -3,7 +3,7 @@ import("Organisation_lib");
import("Communication_lib");
import("Entity_lib");
// TODO: this is a workaround for missing possibility to react on changes of fields not connected to record Container
// TODO: this is a workaround for missing possibility to react on changes of fields not connected to record Container #1030023
FieldChanges.assimilateChangeAndDispose("$field.IMAGE", function(state, value){
if (state == FieldChanges.STATE_CHANGED())
OrgUtils.setImage(vars.get("$field.ORGANISATIONID"), value);
......
import("system.translate");
import("system.db");
import("system.vars");
import("system.text");
......@@ -11,6 +12,6 @@ if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW)
var newCodeNumber = db.cell("select " + maskingHelper.max("TASK.CODE") + " from TASK");
newCodeNumber = Number(newCodeNumber);//if no number exists till no, start value will be 1 (due to: ++0)
if (isNaN(newCodeNumber))
throw new TypeError();//TODO:add Message
throw new TypeError(translate.text("The code number is not a valid number."));
neon.setFieldValue("$field.CODE", ++newCodeNumber);
}
\ No newline at end of file
import("system.result");
import("Person_lib");
//TODO: try to find a better solution for this
//TODO: try to find a better solution for this -> #TITLE-mechanic when available
var subSql = PersUtils.getResolvingDisplaySubSql("TASK.EDITOR_CONTACT_ID");
result.string(subSql);
\ No newline at end of file
import("system.result");
import("Person_lib");
//TODO: try to find a better solution for this
//TODO: try to find a better solution for this -> #TITLE-mechanic when available
var subSql = PersUtils.getResolvingDisplaySubSql("TASK.REQUESTOR_CONTACT_ID");
result.string(subSql);
\ No newline at end of file
......@@ -3,6 +3,7 @@
<name>Turnover_entity</name>
<title>Turnover</title>
<majorModelMode>DISTRIBUTED</majorModelMode>
<documentation>%aditoprj%/entity/Turnover_entity/documentation.adoc</documentation>
<iconId>VAADIN:CHART</iconId>
<recordContainer>jdito</recordContainer>
<entityFields>
......@@ -31,6 +32,38 @@
<title>Year</title>
<contentType>TEXT</contentType>
</entityField>
<entityParameter>
<name>YearCountToShow_param</name>
<code>%aditoprj%/entity/Turnover_entity/entityfields/yearcounttoshow_param/code.js</code>
<expose v="true" />
<triggerRecalculation v="true" />
<mandatory v="false" />
<documentation>%aditoprj%/entity/Turnover_entity/entityfields/yearcounttoshow_param/documentation.adoc</documentation>
<description>PARAMETER</description>
</entityParameter>
<entityParameter>
<name>MaxYear_param</name>
<code>%aditoprj%/entity/Turnover_entity/entityfields/maxyear_param/code.js</code>
<expose v="true" />
<triggerRecalculation v="true" />
<mandatory v="false" />
<documentation>%aditoprj%/entity/Turnover_entity/entityfields/maxyear_param/documentation.adoc</documentation>
<description>PARAMETER</description>
</entityParameter>
<entityProvider>
<name>FilteredTurnover</name>
<fieldType>DEPENDENCY_IN</fieldType>
<children>
<entityParameter>
<name>MaxYear_param</name>
<expose v="true" />
</entityParameter>
<entityParameter>
<name>YearCountToShow_param</name>
<expose v="true" />
</entityParameter>
</children>
</entityProvider>
</entityFields>
<recordContainers>
<jDitoRecordContainer>
......
== Turnover ==
This entity provides charts to display the Turnover.
\ No newline at end of file
import("system.result");
import("system.vars");
import("system.datetime");
result.string(datetime.toDate(vars.get("$sys.date"), "yyyy"));
\ No newline at end of file
this parameter is for setting the maximum year to show.
The default is the current year.
\ No newline at end of file
import("system.result");
result.string("4");
\ No newline at end of file
This parameter is for setting the number of years to show.
Default is 4.
\ No newline at end of file
import("system.vars");
import("system.logging");
import("system.datetime");
import("system.db");
import("system.result");
......@@ -18,11 +20,13 @@ var chartData = ReferencingData.begin(rootNode);
var skippedCounts = {};
for (let i = 0; i < 4; i++)
var maxYear = parseInt(vars.get("$param.MaxYear_param"));
var yearCountToShow = parseInt(vars.get("$param.YearCountToShow_param"));
for (let i = 0; i < yearCountToShow; i++)
{
// TODO: currently years are hardcoded.
var year = i + 2016;
var year = i + maxYear - yearCountToShow + 1;
var TurnoverYearSum = 0;
var ForecastYearSum = 0;
......
......@@ -2331,6 +2331,18 @@
<entry>
<key>Linktype</key>
</entry>
<entry>
<key>${SQL_LIB_UNSUPPORTED_DBTYPE} function: %0</key>
</entry>
<entry>
<key>Links</key>
</entry>
<entry>
<key>Linktype</key>
</entry>
<entry>
<key>${PRODUCT_LIB_NO_PRODUCT_ID} function: %0</key>
</entry>
</keyValueMap>
<font name="Dialog" style="0" size="11" />
<sqlModels>
......
......@@ -2686,6 +2686,20 @@
<entry>
<key>Linktype</key>
</entry>
<entry>
<key>${SQL_LIB_UNSUPPORTED_DBTYPE} function: %0</key>
<value>Der DB-Typ wird in der Funktion %0 nicht unterstützt.</value>
</entry>
<entry>
<key>Links</key>
</entry>
<entry>
<key>Linktype</key>
</entry>
<entry>
<key>${PRODUCT_LIB_NO_PRODUCT_ID} function: %0</key>
<value>Es wird der Funktion %0 keine Produktid übergeben.</value>
</entry>
</keyValueMap>
<font name="Dialog" style="0" size="11" />
</language>
......@@ -2353,6 +2353,20 @@
<entry>
<key>Linktype</key>
</entry>
<entry>
<key>${SQL_LIB_UNSUPPORTED_DBTYPE} function: %0</key>
<value>The DBTYPE is not supported by function %0.</value>
</entry>
<entry>
<key>Links</key>
</entry>
<entry>
<key>Linktype</key>
</entry>
<entry>
<key>${PRODUCT_LIB_NO_PRODUCT_ID} function: %0</key>
<value>Missing productId in function %0.</value>
</entry>
</keyValueMap>
<font name="Dialog" style="0" size="11" />
</language>
......@@ -5,6 +5,8 @@ import("system.text");
* provides static methods for special handling of entities in JDito-Processes
* do not create an instance of this
*
* TODO: lib has to be updated with new Indexsearch when it is available
*
* @class
*/
function IndexsearchUtils() {}
......
......@@ -228,7 +228,7 @@ OfferUtils.openOfferReport = function(pOfferID)
"OFFERDel" : "" //getKeyName(rptdata[0][4] , "DELIVERYTERMS", "KEYNAME1", language);
};
// TODO: implementieren wenn Attribute mglich sind
// TODO: implementieren wenn Attribute möglich sind
var adma = ""
/*var adm = getAddressData( [GetAttributeKey( "Aussendienst", "1", orgrelid, pUser )[0]],
[["Person","function", "concat( ['SALUTATION', 'TITLE', 'FIRSTNAME','LASTNAME'])"],
......
......@@ -56,7 +56,7 @@ PersUtils.removeImage = function(pPersId)
PersUtils.getResolvingDisplaySubSql = function(pRelationIdField)
{
var maskingHelper = new SqlMaskingUtils();
//TODO: verify if there is a better solution for the usage of this as a displayValueExpression
//TODO: verify if there is a better solution for the usage of this as a displayValueExpression --> automatic use of #TITLE
return "select " + maskingHelper.concat(["PERSON.FIRSTNAME", "PERSON.LASTNAME"]) + "from PERSON \n\
join CONTACT on (PERSON.PERSONID = CONTACT.PERSON_ID) \n\
where CONTACT.CONTACTID = " + pRelationIdField;
......
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