Skip to content
Snippets Groups Projects
Commit fa81d2ee authored by Sebastian Listl's avatar Sebastian Listl :speech_balloon:
Browse files

Merge branch '2021.0' into 'master'

2021.0

See merge request xrm/basic!930
parents fcbe9cd7 06d429ee
No related branches found
No related tags found
No related merge requests found
Showing with 67 additions and 10 deletions
......@@ -663,7 +663,7 @@ BulkMailUtils.startBulkmailWorkFlow = function(pMailLogId, pLinkId)
{
return
}
var [actionType, workflowKey, signalName] = newSelect(["ACTION_TYPE", "WORKFLOWPROCESSDEFINITION_KEY", "WORKFLOWSIGNAL_NAME"])
var [linkActionType, workflowKey, signalName] = newSelect(["ACTION_TYPE", "WORKFLOWPROCESSDEFINITION_KEY", "WORKFLOWSIGNAL_NAME"])
.from("WEBLINK")
.where("WEBLINK.WEBLINKID", pLinkId)
.arrayRow();
......@@ -673,18 +673,18 @@ BulkMailUtils.startBulkmailWorkFlow = function(pMailLogId, pLinkId)
.where("MAIL_LOG.MAIL_LOGID", pMailLogId)
.cell();
var variables = {
var processVariables = {
"mailLogId": pMailLogId,
"linkId": pLinkId,
"contactId": contactId
};
if (actionType == $KeywordRegistry.weblinkActionType$startWorkflow() && workflowKey)
if (linkActionType == $KeywordRegistry.weblinkActionType$startWorkflow() && workflowKey)
{
workflow.startProcessByKey(workflowKey, variables);
workflow.startProcessByKey(workflowKey, processVariables);
}
else if (actionType == $KeywordRegistry.weblinkActionType$sendWorkflowSignal() && signalName)
else if (linkActionType == $KeywordRegistry.weblinkActionType$sendWorkflowSignal() && signalName)
{
workflow.signalEventReceived(signalName, variables);
workflow.signalEventReceived(signalName, processVariables);
}
}
......
......@@ -2,6 +2,7 @@
<process xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.2.2" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/process/1.2.2">
<name>DuplicateMerge_lib</name>
<majorModelMode>DISTRIBUTED</majorModelMode>
<documentation>%aditoprj%/process/DuplicateMerge_lib/documentation.adoc</documentation>
<process>%aditoprj%/process/DuplicateMerge_lib/process.js</process>
<variants>
<element>LIBRARY</element>
......
= DuplicateMerge_lib
Provides functionalities for merging 2 datasets. Currently implemented for Person and Organisation.
This lib is, among other things, able to create activities for the merge and to update the duplicates for the merged datasets.
......@@ -2,6 +2,7 @@
<process xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.2.2" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/process/1.2.2">
<name>DuplicateScanner_lib</name>
<majorModelMode>DISTRIBUTED</majorModelMode>
<documentation>%aditoprj%/process/DuplicateScanner_lib/documentation.adoc</documentation>
<process>%aditoprj%/process/DuplicateScanner_lib/process.js</process>
<alias>Data_alias</alias>
<variants>
......
= DuplicateScanner_lib
Provides a utility function for reading scan patterns (getScannerByEntity).
Provides functions to create duplicate filterExtensions (getDuplicateConditionalListSql).
Provides functions to manage ignored duplicates (filterIgnored, updateIgnored).
Provides functions to search for ignored duplicates.
The base function is DuplicateScannerUtils.getDuplicateIds. The other helper functions are
DuplicateScannerUtils.getDuplicateIdsByEntityScanner and DuplicateScannerUtils.getDuplicateIdsByEntityObj.
both call the base function but simplify the call for the 2 usecases:
* get all duplicateids of a dataset by entity and uid: getDuplicateIdsByEntityScanner
* get all duplicateids of a dataset based on the entity and the variable (if the dataset has not been saved yet).
......@@ -2,6 +2,7 @@
<process xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.2.2" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/process/1.2.2">
<name>IndexSearch_lib</name>
<majorModelMode>DISTRIBUTED</majorModelMode>
<documentation>%aditoprj%/process/IndexSearch_lib/documentation.adoc</documentation>
<process>%aditoprj%/process/IndexSearch_lib/process.js</process>
<variants>
<element>LIBRARY</element>
......
= IndexSearch_lib
Provides functionality to generate a adito-solr indexquery
......@@ -290,13 +290,24 @@ IndexsearchFilterRow.prototype.buildQuery = function(pFieldValues)
*
* @param {string} pName the row field name
* @param {string} pOperator the operator for the group can either be 'AND' or 'OR'
* @param {string} pValue the field valze
* @param {string} pValue the field value
*/
IndexsearchFilterRow.fromFilter = function(pName, pOperator, pValue)
{
if(pOperator == "NOT_EQUAL" || pOperator == "CONTAINSNOT")
{
return new IndexsearchFilterRow(pName, true, JSON.parse(pValue));
let exclude;
try
{
exclude = JSON.parse(pValue);
}
// If the pValue isn't an Object or Array
catch (e if e instanceof SyntaxError)
{
exclude = [pValue];
}
return new IndexsearchFilterRow(pName, true, exclude);
}
else if(pOperator == "ISNOTNULL")
{
......
......@@ -628,6 +628,11 @@ ItemUtils.product_IdOnValueChange = function (pProductId, pUid, pEntity)
neon.setFieldValue("$field.PRICE", ProductDetails.PriceListToUse.price);
neon.setFieldValue("$field.VAT", ProductDetails.PriceListToUse.vat);
}
else
{
neon.setFieldValue("$field.PRICE", "");
neon.setFieldValue("$field.VAT", 0);
}
}
};
......@@ -669,7 +674,7 @@ ItemUtils.sumUpPricesWhenInserting = function (pStatements, pCorrectOrder, pTree
let price = 0;
if(pPriceObj[id])
{
price = pPriceObj[id]["price"]*pPriceObj[id]["quantity"];
price = pPriceObj[id]["price"]*(pPriceObj[id]["quantity"] == undefined ? 1 : pPriceObj[id]["quantity"]);
}
calcPrice = eMath.addDec(price, calcPrice);
if(pPriceObj[id] && pPriceObj[id]["vat"] && pPriceObj[id]["vat"] > 0)
......
......@@ -29,12 +29,13 @@ function ProductUtils() {}
* @param {String} pid ProductID
* @param {String} buySell possible values: PP, SP
* @param {String} [onlyStandard=false] if true, only standard price lists are selected.
* @param {String} pCurrency
*
* @example productUtils.getCurrentProductPrice(vars.get("$field.PRODUCTID"), "PP")
*
* @return {Array[]} currently valid product price with currency: [price, "CURRENCY", "VAT"] or [] if no price found
*/
ProductUtils.getCurrentProductPrice = function(pid, buySell, onlyStandard) {
ProductUtils.getCurrentProductPrice = function(pid, buySell, onlyStandard, pCurrency) {
if (pid != undefined && pid != "" && buySell != undefined && buySell != "")
{
var today = datetime.clearTime(vars.get("sys.date"), "utc");
......@@ -49,6 +50,7 @@ ProductUtils.getCurrentProductPrice = function(pid, buySell, onlyStandard) {
actualPriceSelect.and("PRODUCTPRICE.BUYSELL", buySell)
.and("PRODUCTPRICE.PRODUCT_ID", pid)
.andIfSet("PRODUCTPRICE.CURRENCY", pCurrency)
.and("PRODUCTPRICE.VALID_FROM", today, SqlBuilder.LESS_OR_EQUAL())
.and(newWhere("PRODUCTPRICE.VALID_TO", today, SqlBuilder.GREATER_OR_EQUAL())
.or("PRODUCTPRICE.VALID_TO is null"));
......
= rebuildDuplicate_serverProcess
== Overview
Manages the asynchronous server-side recalculation of all duplicates of an entity.
This process should only be necessary initially and possibly during data imports.
== Technical Details
Currently the process is called in the rebuild action of the DuplicateScanner_entity.
The batchsize of the process (how many data sets should be loaded at once)
can be determined by the preference custom.duplicates.dataBlockSize.
The default value is 5000.
......@@ -5,6 +5,7 @@
This process can only be executed within the client.
The action (Rebuild selected entries) can be found in the administration context "Duplicate Configuration".</description>
<majorModelMode>DISTRIBUTED</majorModelMode>
<documentation>%aditoprj%/process/rebuildDuplicates_serverProcess/documentation.adoc</documentation>
<process>%aditoprj%/process/rebuildDuplicates_serverProcess/process.js</process>
<alias>Data_alias</alias>
<variants>
......
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