diff --git a/entity/Salesproject_entity/recordcontainers/db/onDBUpdate.js b/entity/Salesproject_entity/recordcontainers/db/onDBUpdate.js index 8c73baf3b59dff8e2e959923955c70e1fac50205..29d8ada35d33624aeccebea138bc4ffc850b1eb5 100644 --- a/entity/Salesproject_entity/recordcontainers/db/onDBUpdate.js +++ b/entity/Salesproject_entity/recordcontainers/db/onDBUpdate.js @@ -29,6 +29,7 @@ vars.get("$local.changed").forEach(function(fieldName) { if(!isNaN(parseInt(autoProbab))) { newWhere("SALESPROJECT.SALESPROJECTID", vars.get("$field.SALESPROJECTID")) + .and("SALESPROJECT.PROBABILITY", autoProbab, SqlBuilder.LESS()) .updateFields({ "PROBABILITY": autoProbab }, "SALESPROJECT");