diff --git a/entity/Salesproject_entity/recordcontainers/db/onDBUpdate.js b/entity/Salesproject_entity/recordcontainers/db/onDBUpdate.js index 22b4360c61f2416e2c2e49525d2788c7f73ae377..20ec5095d25b8ff9dc6674aa5aae7c7053612abd 100644 --- a/entity/Salesproject_entity/recordcontainers/db/onDBUpdate.js +++ b/entity/Salesproject_entity/recordcontainers/db/onDBUpdate.js @@ -5,10 +5,13 @@ import("Salesproject_lib"); import("Sql_lib"); import("system.db"); -var typeValue, fieldVar +var needToUpdateForecast = false; // create Milestones if changed vars.get("$local.changed").forEach(function(fieldName) { + var typeValue; + var fieldVar; + switch (fieldName) { case "SALESPROJECT.PHASE": typeValue = 1; @@ -39,11 +42,15 @@ vars.get("$local.changed").forEach(function(fieldName) { } if (typeValue) { - // TODO Milestone Value is still an Integer but has to be a String (varchar) - // Salesproject.insertMilestone(vars.getString("$field.SALESPROJECTID"), typeValue, vars.getString(fieldVar), true); + needToUpdateForecast = true; + // TODO Milestone Value is still an Integer but has to be a String (varchar) -> use new keywords + //Salesproject.insertMilestone(vars.getString("$field.SALESPROJECTID"), typeValue, vars.getString(fieldVar)); } }); +if (needToUpdateForecast) + Salesproject.notifyToUpdateForecast(); + neon.refresh() function _updateReasons(pDelete) diff --git a/language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod b/language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod index 0620d74259b80ce98b1c07b829686cb5ebb91d65..128002a25d9fa6533e606f4c20dc14465c18ba57 100644 --- a/language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod +++ b/language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod @@ -682,7 +682,7 @@ <key>Standard / Individual</key> </entry> <entry> - <key>Please update the forecast.</key> + <key>Please update the ${FORECAST_ENGLISH}.</key> </entry> <entry> <key>no Project planned</key> diff --git a/language/_____LANGUAGE_de/_____LANGUAGE_de.aod b/language/_____LANGUAGE_de/_____LANGUAGE_de.aod index 0009fdbbe25ea41fc9825ee931b9265bece9a778..f560f4c32cf8506aed672627ecd5725d913e1867 100644 --- a/language/_____LANGUAGE_de/_____LANGUAGE_de.aod +++ b/language/_____LANGUAGE_de/_____LANGUAGE_de.aod @@ -1166,7 +1166,8 @@ <key>Standard / Individual</key> </entry> <entry> - <key>Please update the forecast.</key> + <key>Please update the ${FORECAST_ENGLISH}.</key> + <value>Bitte den Forecast überprüfen.</value> </entry> <entry> <key>Industry</key> diff --git a/language/_____LANGUAGE_en/_____LANGUAGE_en.aod b/language/_____LANGUAGE_en/_____LANGUAGE_en.aod index 166e7600e1221c52b33ec5852770d252d5db5c97..01e1885eece3e9b58259a1a2af47c4c3d937e7cd 100644 --- a/language/_____LANGUAGE_en/_____LANGUAGE_en.aod +++ b/language/_____LANGUAGE_en/_____LANGUAGE_en.aod @@ -688,7 +688,8 @@ <key>Standard / Individual</key> </entry> <entry> - <key>Please update the forecast.</key> + <key>Please update the ${FORECAST_ENGLISH}.</key> + <value>Please update the forecast.</value> </entry> <entry> <key>no Project planned</key> diff --git a/process/Salesproject_lib/process.js b/process/Salesproject_lib/process.js index cadd2a4a1b46dffb081cc55939a6a5769624c2dd..1e98c785d072feb6509c4959ecc89c84e2ad39a2 100644 --- a/process/Salesproject_lib/process.js +++ b/process/Salesproject_lib/process.js @@ -54,7 +54,6 @@ Salesproject.insertMilestone = function(salesprojectId, type, value, notifyForec ["SALESPROJECT_CYCLEID", "SALESPROJECT_ID", "TYPE", "VALUE", "DATE_START"], null, [util.getNewUUID(), salesprojectId, type, value, vars.get("$sys.date")]); - if (notifyForecast) { Salesproject.notifyToUpdateForecast() } @@ -69,6 +68,7 @@ Salesproject.insertMilestone = function(salesprojectId, type, value, notifyForec Salesproject.notifyToUpdateForecast = function() { // TODO: logging.show durch sinnvolle Meldung ersetzen oder ähnlich... // logging.show(translate.text("Please update the forecast.")); + question.showMessage(translate.text("Please update the ${FORECAST_ENGLISH}."), question.INFORMATION, translate.text("${FORECAST_ENGLISH}")) } /**