diff --git a/entity/Comm_entity/entityfields/is_standard/valueProcess.js b/entity/Comm_entity/entityfields/is_standard/valueProcess.js index c973c9d87af3c521fdc307b0346e5f7e191affdd..64cb76b496be2ca9ccc9741f81452cafc1fc15ef 100644 --- a/entity/Comm_entity/entityfields/is_standard/valueProcess.js +++ b/entity/Comm_entity/entityfields/is_standard/valueProcess.js @@ -1,6 +1,4 @@ -import("system.logging"); -import("system.vars"); -import("system.result"); - -logging.log("STANDARD.valueProcess|changedVal:" + vars.get("$this.value") + ">for>" + vars.get("$field.COMMID") + ">" + vars.get("$field.ADDR")); +import("system.vars"); +import("system.result"); + result.string(vars.get("$field.STANDARD") == "1"); \ No newline at end of file diff --git a/entity/Offeritem_entity/entityfields/product_id/onValueChange.js b/entity/Offeritem_entity/entityfields/product_id/onValueChange.js index a7a60f8c53facf875f9ffc0fd963f77f87798b10..35060d8cbea7a066a1b6a8a13304ad3a2ccb4db8 100644 --- a/entity/Offeritem_entity/entityfields/product_id/onValueChange.js +++ b/entity/Offeritem_entity/entityfields/product_id/onValueChange.js @@ -1,13 +1,10 @@ -import("system.logging"); import("system.vars"); import("system.neon"); import("Product_lib"); import("Util_lib"); import("Entity_lib"); -logging.log("----------field: " + vars.get("$field.PRODUCT_ID") + "---") var pid = ProcessHandlingUtils.getOnValidationValue(vars.get("$field.PRODUCT_ID")); -logging.log(pid) if(pid != "") { var curr = vars.exists("$param.Currency_param") ? vars.get("$param.Currency_param") : ""; diff --git a/entity/Options_Entity/contentProcess.js b/entity/Options_Entity/contentProcess.js index db475b523c4c037abc72a3abacdc837b8aeee5b4..05c6a5486147b9a7fbc2e94a6bb14d1606e3df6d 100644 --- a/entity/Options_Entity/contentProcess.js +++ b/entity/Options_Entity/contentProcess.js @@ -1,4 +1,2 @@ -import("system.logging"); import("system.result"); -logging.log("OPTIONS") result.object([["1", "some text", "999", "124367654784", "some password"]]) \ No newline at end of file diff --git a/entity/Options_Entity/recordcontainers/jdito/contentProcess.js b/entity/Options_Entity/recordcontainers/jdito/contentProcess.js index db475b523c4c037abc72a3abacdc837b8aeee5b4..404d2ebf8cbd304790263c41a8041973ea5bd2bd 100644 --- a/entity/Options_Entity/recordcontainers/jdito/contentProcess.js +++ b/entity/Options_Entity/recordcontainers/jdito/contentProcess.js @@ -1,4 +1,3 @@ -import("system.logging"); import("system.result"); -logging.log("OPTIONS") + result.object([["1", "some text", "999", "124367654784", "some password"]]) \ No newline at end of file diff --git a/entity/Pers_entity/entityfields/persorgsaddresses_dfo/children/relationtype_param/code.js b/entity/Pers_entity/entityfields/persorgsaddresses_dfo/children/relationtype_param/code.js index 0a4d002697c4a18c207cf0d4eab03a7381c1961c..85a095aeb8aaaff00b627db260104e8790cb3a03 100644 --- a/entity/Pers_entity/entityfields/persorgsaddresses_dfo/children/relationtype_param/code.js +++ b/entity/Pers_entity/entityfields/persorgsaddresses_dfo/children/relationtype_param/code.js @@ -1,5 +1,3 @@ -import("system.logging"); import("system.result"); -logging.log("org") result.object(1); \ No newline at end of file diff --git a/entity/SalesprojectClassificationEntry_entity/onUpdate.js b/entity/SalesprojectClassificationEntry_entity/onUpdate.js index 18be8137a5a70e1cd9e2b4d1c0298554b471e916..5cd47b019be460381cbdaff9eb76d39abce724c0 100644 --- a/entity/SalesprojectClassificationEntry_entity/onUpdate.js +++ b/entity/SalesprojectClassificationEntry_entity/onUpdate.js @@ -1,11 +1,7 @@ import("system.db"); import("system.vars"); -import("system.logging"); import("Sql_lib"); -logging.log(vars.get("$local.changed").toSource()) - - var condition = new SqlCondition(); condition.andPrepare("SALESPROJECT_CLASSIFICATION.SALESPROJECT_CLASSIFICATIONID", vars.getString("$field.UID")); diff --git a/entity/SalesprojectClassificationEntry_entity/recordcontainers/jdito/onUpdate.js b/entity/SalesprojectClassificationEntry_entity/recordcontainers/jdito/onUpdate.js index 18be8137a5a70e1cd9e2b4d1c0298554b471e916..5cd47b019be460381cbdaff9eb76d39abce724c0 100644 --- a/entity/SalesprojectClassificationEntry_entity/recordcontainers/jdito/onUpdate.js +++ b/entity/SalesprojectClassificationEntry_entity/recordcontainers/jdito/onUpdate.js @@ -1,11 +1,7 @@ import("system.db"); import("system.vars"); -import("system.logging"); import("Sql_lib"); -logging.log(vars.get("$local.changed").toSource()) - - var condition = new SqlCondition(); condition.andPrepare("SALESPROJECT_CLASSIFICATION.SALESPROJECT_CLASSIFICATIONID", vars.getString("$field.UID")); diff --git a/entity/SalesprojectClassification_entity/SalesprojectClassification_entity.aod b/entity/SalesprojectClassification_entity/SalesprojectClassification_entity.aod index 829560b76eb0c37f73a2a53b8a34250fe3c04cef..6accf37245fdedda633fd02d74ad9d867b9cdb0f 100644 --- a/entity/SalesprojectClassification_entity/SalesprojectClassification_entity.aod +++ b/entity/SalesprojectClassification_entity/SalesprojectClassification_entity.aod @@ -66,7 +66,6 @@ <name>jdito</name> <jDitoRecordAlias>Data_alias</jDitoRecordAlias> <contentProcess>%aditoprj%/entity/SalesprojectClassification_entity/recordcontainers/jdito/contentProcess.js</contentProcess> - <onUpdate>%aditoprj%/entity/SalesprojectClassification_entity/recordcontainers/jdito/onUpdate.js</onUpdate> <recordFields> <element>UID.value</element> <element>CLASSNAME.value</element> diff --git a/entity/SalesprojectClassification_entity/onUpdate.js b/entity/SalesprojectClassification_entity/onUpdate.js deleted file mode 100644 index c0b643664fa18b8b927790a3c087615fc9122d43..0000000000000000000000000000000000000000 --- a/entity/SalesprojectClassification_entity/onUpdate.js +++ /dev/null @@ -1,4 +0,0 @@ -import("system.vars") -import("system.logging") - -logging.log(vars.get("$local.changed").toSource()) \ No newline at end of file diff --git a/entity/SalesprojectClassification_entity/recordcontainers/jdito/onUpdate.js b/entity/SalesprojectClassification_entity/recordcontainers/jdito/onUpdate.js deleted file mode 100644 index c0b643664fa18b8b927790a3c087615fc9122d43..0000000000000000000000000000000000000000 --- a/entity/SalesprojectClassification_entity/recordcontainers/jdito/onUpdate.js +++ /dev/null @@ -1,4 +0,0 @@ -import("system.vars") -import("system.logging") - -logging.log(vars.get("$local.changed").toSource()) \ No newline at end of file diff --git a/entity/SalesprojectCompetition_entity/entityfields/salesprojectcompetitionorg_dfo/children/relationid_param/code.js b/entity/SalesprojectCompetition_entity/entityfields/salesprojectcompetitionorg_dfo/children/relationid_param/code.js index dc4ffd0ac6042e4e3d0ec69582ee94d4e86e12e2..92b0b7622da56367d0eba073f0e8bb85fbd1f33d 100644 --- a/entity/SalesprojectCompetition_entity/entityfields/salesprojectcompetitionorg_dfo/children/relationid_param/code.js +++ b/entity/SalesprojectCompetition_entity/entityfields/salesprojectcompetitionorg_dfo/children/relationid_param/code.js @@ -1,5 +1,4 @@ -import("system.logging"); import("system.result"); import("system.vars"); -logging.log(vars.get("$field.RELATION_ID")) + result.string(vars.get("$field.RELATION_ID")); \ No newline at end of file diff --git a/process/OfferOrder_lib/process.js b/process/OfferOrder_lib/process.js index d2b44d92d67ba659f9c8609aa45ea30b4b637e07..4a5b78278566b2f97deeb28b4f1e4f9c8fb9633c 100644 --- a/process/OfferOrder_lib/process.js +++ b/process/OfferOrder_lib/process.js @@ -1,4 +1,3 @@ -import("system.logging"); import("system.translate"); import("system.text"); import("system.vars"); @@ -149,7 +148,6 @@ ItemUtils.prototype.getNewItemIdCondition = function(pItemId, pTableName) { if (pTableName == undefined) pTableName = this.tableName; - logging.log("hää" + pTableName) return SqlCondition.begin().andPrepare(pTableName + "ITEM." + pTableName + "ITEMID", pItemId); } @@ -285,7 +283,6 @@ ItemUtils.prototype.insertPartsList = function(columns, productId, assignedTo, c columns = columns.concat(additionalProductInfo.map(function(item) {return item[0]})); var colTypes = db.getColumnTypes(table, columns); - logging.log(partsList.toSource()) // partsList[rootProdId] = root node __itemInsertStatement(partsList[rootProdId], assignedTo, currency, relationId); @@ -339,7 +336,6 @@ ItemUtils.prototype.insertPartsList = function(columns, productId, assignedTo, c statements.push([table, columns, colTypes, vals]); insertedItemIds.push(newid); - logging.log(p2pid) __itemInsertStatement(partsList[p2pid], newid); } } @@ -359,7 +355,6 @@ ItemUtils.prototype.deletePartsList = function(itemId) { //save address for this here to get class variables in recursive sub function __itemDeleteStatement var self = this; - logging.log("1 " + self.tableName) var statements = []; __itemDeleteStatement(itemId); @@ -373,14 +368,9 @@ ItemUtils.prototype.deletePartsList = function(itemId) { //recursive function for building item delete statements function __itemDeleteStatement(itemId) { - logging.log("2 " + self.tableName) - var itemsToDelete = self.ItemTree[itemId].ids; - logging.log("__ " + self.tableName) - logging.log(itemsToDelete.toSource()) for (var i = 0; i < itemsToDelete.length; i++) { //unshift due to foreign key constraints (Delete hierarchically starting at the bottom) - logging.log("3 " + self.tableName) statements.unshift(self.getNewItemIdCondition(itemsToDelete[i], self.tableName).build("1 = 2")); deletedItemIds.push(itemsToDelete[i]); __itemDeleteStatement(itemsToDelete[i]); diff --git a/process/Product_lib/process.js b/process/Product_lib/process.js index f0216b63a315ed22f988b694581a47b504121be1..9287e1b4bbb3b52629d4ca541d6daf888b8e4520 100644 --- a/process/Product_lib/process.js +++ b/process/Product_lib/process.js @@ -432,42 +432,6 @@ Prod2ProdUtils.prototype.getPartsListObject = function() { Prod2ProdUtils.prototype.getPartsListForRecordContainer = function() { var tree = this._relateChilds(); return tree.toArray(7); -// var ret = []; -// var childs = this._relateChilds(); -// -// // map internal, (uids used in this function) concatenated ids to new random generated uuids. -// // Without this every depth would make the uid significantly longer. -// var uidMap = {}; -// -// __push("", childs.root, 0); -// -// -// -// -// function __push(parent, obj) { -// logging.log(obj.toSource()) -// // -// -// for (var i = 0; i < obj.ids.length; i++) { -// logging.log(childs[obj.ids[i]].toSource()) -// var nextUid = parent + obj.ids[i]; -// __addRow(nextUid, parent, childs[obj.ids[i]].rowdata) -// -// __push(nextUid, childs[obj.ids[i]]) -// } -// } -// -// function __addRow(uid, parentId, rowdata) -// { -// uidMap[uid] = util.getNewUUID(); -// if (uidMap[parentId] == undefined) { -// uidMap[parentId] = util.getNewUUID(); -// } -// -// ret.push([uidMap[uid], uidMap[parentId]].concat(rowdata)); -// } -// -// return ret; } /** @@ -530,8 +494,8 @@ Prod2ProdUtils.prototype._initProd2ProdData = function() { } } -/* object tree to relate products by DEST_ID / SOURCE_ID. - * +/** + * object tree to relate products by DEST_ID / SOURCE_ID. **/ Prod2ProdUtils.prototype._buildTree = function(supervised) { this._initProd2ProdData(); @@ -562,29 +526,7 @@ Prod2ProdUtils.prototype._buildTree = function(supervised) { } } ); - /* - - var tree = { root: {ids: [], sourceid: this.productId } }; - - if (supervised) - tree = { root: {ids: [], destid: this.productId } }; - - for (var i = 0; i < this.data.length; i++) { - var prod2prodid = this.data[i][0]; - if (tree[prod2prodid] == undefined) { - tree[prod2prodid] = { - ids: [] - , rowdata: this.data[i].slice(0)//copy to get NativeArray for concatenation - , destid: this.data[i][1] - , sourceid: this.data[i][2] - , quantity: this.data[i][3] - , optional: this.data[i][4] - , takeprice: this.data[i][5] - , productcode: this.data[i][6] - }; - } - } -*/ + return tree; } @@ -604,28 +546,7 @@ Prod2ProdUtils.prototype._relateChilds = function() { } } } -/* -Prod2ProdUtils.prototype._relateChilds = function() { - var tree = this._buildTree(false); - logging.log(tree.toSource()) - - __relate("root"); - - logging.log(tree.toSource()) - return tree; - - - function __relate(id) { - for (var treeId in tree) { - if (tree[treeId].destid == tree[id].sourceid && tree[id].ids.indexOf(treeId) == -1) { - tree[id].ids.push(treeId); - __relate(treeId); - } - } - } -} -*/ Prod2ProdUtils.prototype._relateParents = function() { var tree = this._buildTree(true);