diff --git a/entity/ClassificationAdmin_entity/ClassificationAdmin_entity.aod b/entity/ClassificationAdmin_entity/ClassificationAdmin_entity.aod index e3cded7f7c29c8a7186004384fe671b604f63945..2cb0ac15ffea64ec6dba44d2fb1676d5593d5521 100644 --- a/entity/ClassificationAdmin_entity/ClassificationAdmin_entity.aod +++ b/entity/ClassificationAdmin_entity/ClassificationAdmin_entity.aod @@ -52,7 +52,6 @@ <entityField> <name>CLASSIFICATIONTYPEID</name> <searchable v="false" /> - <valueProcess>%aditoprj%/entity/ClassificationAdmin_entity/entityfields/classificationtypeid/valueProcess.js</valueProcess> </entityField> <entityField> <name>CLASSIFICATIONGROUP</name> diff --git a/entity/ClassificationAdmin_entity/entityfields/classificationtypeid/valueProcess.js b/entity/ClassificationAdmin_entity/entityfields/classificationtypeid/valueProcess.js deleted file mode 100644 index 16c47d8b58490ac63829673a531ffce4e6896745..0000000000000000000000000000000000000000 --- a/entity/ClassificationAdmin_entity/entityfields/classificationtypeid/valueProcess.js +++ /dev/null @@ -1,10 +0,0 @@ -import("system.util"); -import("system.result"); -import("system.neon"); -import("system.vars"); - -if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW) -{ - var newId = util.getNewUUID(); - result.string(newId); -} \ No newline at end of file diff --git a/entity/ClassificationAdmin_entity/recordcontainers/jdito/contentProcess.js b/entity/ClassificationAdmin_entity/recordcontainers/jdito/contentProcess.js index c2b453ca932d02b33f33aac2fb385217d73feb8f..52a61eb71abaeb31c3468bf91027f2167d1f47a1 100644 --- a/entity/ClassificationAdmin_entity/recordcontainers/jdito/contentProcess.js +++ b/entity/ClassificationAdmin_entity/recordcontainers/jdito/contentProcess.js @@ -1,3 +1,4 @@ +import("system.logging"); import("JditoFilter_lib"); import("Classification_lib"); import("system.vars"); @@ -8,17 +9,12 @@ import("system.result"); var classificationId; var classificationTypeId; -// if the id starts with "C," it is a classificationId. If it starts with "T,", it is a classificationtypeId if (vars.exists("$local.idvalues") && vars.get("$local.idvalues") && vars.get("$local.idvalues").length > 0) { - var selected = vars.get("$local.idvalues")[0].split(","); - if (selected.length == 2) - { - if (selected[0] == 'C') - classificationId = selected[1] - else if (selected[0] == 'T') - classificationTypeId = selected[1] - } + var selected = vars.get("$local.idvalues")[0]; + logging.log(selected.toSource()) + + classificationTypeId = selected; } var cond = SqlCondition.begin() @@ -42,7 +38,7 @@ if (vars.exists("$local.filter") && vars.get("$local.filter")) } var masking = new SqlMaskingUtils(); -result.object(db.table(cond.buildSql("select case when CLASSIFICATIONID is not null then " + masking.concat(["'C,'", "CLASSIFICATIONID"], "", false) + " else " + masking.concat(["'T,'", "CLASSIFICATIONTYPEID"], "", false) + " end, CLASSIFICATIONID, CLASSIFICATIONGROUP, CLASSIFICATIONSCORE_ID, CLASSIFICATIONTYPEID, CLASSIFICATIONTYPE_ID, OBJECT_TYPE, OBJECT_ROWID, SCORETYPE, CLASSIFICATIONTYPE.CLASSIFICATIONTYPE from CLASSIFICATION \n\ +result.object(db.table(cond.buildSql("select CLASSIFICATIONTYPEID, CLASSIFICATIONID, CLASSIFICATIONGROUP, CLASSIFICATIONSCORE_ID, CLASSIFICATIONTYPEID, CLASSIFICATIONTYPE_ID, OBJECT_TYPE, OBJECT_ROWID, SCORETYPE, CLASSIFICATIONTYPE.CLASSIFICATIONTYPE from CLASSIFICATION \n\ right join CLASSIFICATIONTYPE on " + db.translateCondition(SqlCondition.begin() .and("CLASSIFICATIONTYPE_ID = CLASSIFICATIONTYPEID") .andPrepareVars("CLASSIFICATION.OBJECT_TYPE", "$param.ObjectType_param") diff --git a/entity/ClassificationAdmin_entity/recordcontainers/jdito/onInsert.js b/entity/ClassificationAdmin_entity/recordcontainers/jdito/onInsert.js index 5abae8836df8a9065da11605f54e2ca73902aa91..7245a3d2d8f9830c28f851d410c42566a721ad0f 100644 --- a/entity/ClassificationAdmin_entity/recordcontainers/jdito/onInsert.js +++ b/entity/ClassificationAdmin_entity/recordcontainers/jdito/onInsert.js @@ -3,7 +3,7 @@ import("system.util"); import("system.vars"); db.insertData("CLASSIFICATIONTYPE", ["CLASSIFICATIONTYPEID", "CLASSIFICATIONTYPE", "SCORETYPE", "CLASSIFICATIONGROUP"], null, [ - vars.get("$field.CLASSIFICATIONTYPEID"), + vars.get("$field.UID"), vars.get("$field.CLASSIFICATIONTYPE"), vars.get("$field.SCORETYPE"), vars.get("$field.CLASSIFICATIONGROUP"), diff --git a/entity/Offeritem_entity/Offeritem_entity.aod b/entity/Offeritem_entity/Offeritem_entity.aod index 45244b64d52bfeb72204923c19387a19b07c1fcc..e422a1aa831e5a45ce9fc204f96e7fb6ae02c6ca 100644 --- a/entity/Offeritem_entity/Offeritem_entity.aod +++ b/entity/Offeritem_entity/Offeritem_entity.aod @@ -16,10 +16,10 @@ </entityField> <entityField> <name>DISCOUNT</name> - <title>Discount %</title> + <title>Discount</title> <contentType>NUMBER</contentType> - <outputFormat>#,##0.00</outputFormat> - <inputFormat>#,##0.00</inputFormat> + <outputFormat>0.00'%'</outputFormat> + <inputFormat>0.00</inputFormat> <onValidation>%aditoprj%/entity/Offeritem_entity/entityfields/discount/onValidation.js</onValidation> </entityField> <entityField> diff --git a/entity/Productprice_entity/recordcontainers/db/conditionProcess.js b/entity/Productprice_entity/recordcontainers/db/conditionProcess.js index 0019feb30c21ff68602d2db757f5c8cab5c626e6..6dfa481d2964da773d5bb96a89928c1474f2c877 100644 --- a/entity/Productprice_entity/recordcontainers/db/conditionProcess.js +++ b/entity/Productprice_entity/recordcontainers/db/conditionProcess.js @@ -8,4 +8,4 @@ var cond = SqlCondition.begin() .andPrepareVars("PRODUCTPRICE.CONTACT_ID", "$param.ContactId_param"); //TODO: use a preparedCondition when available #1030812 #1034026 -result.string(db.translateCondition(cond.build("1 = 2"))); \ No newline at end of file +result.string(db.translateCondition(cond.build("1 = 1"))); \ No newline at end of file