diff --git a/entity/Offer_entity/entityfields/offercode/valueProcess.js b/entity/Offer_entity/entityfields/offercode/valueProcess.js index 8b0c49adb88434c1469378d1673c13d262af36f6..b18f10d63f4a4ae20bd806d6d127cfb60b8debc8 100644 --- a/entity/Offer_entity/entityfields/offercode/valueProcess.js +++ b/entity/Offer_entity/entityfields/offercode/valueProcess.js @@ -5,5 +5,5 @@ import("OfferOrder_lib"); if(vars.get("$sys.operatingstate") == neon.OPERATINGSTATE_NEW) { - result.string( OfferUtils.getNextOfferNumber() ); + result.string(OfferUtils.getNextOfferNumber()); } \ No newline at end of file diff --git a/entity/Salesproject_entity/Salesproject_entity.aod b/entity/Salesproject_entity/Salesproject_entity.aod index d2444f0d5ef3763da5272486167bb92d187d4936..714ffefe2d7402c8900ac35325181b7474c892f0 100644 --- a/entity/Salesproject_entity/Salesproject_entity.aod +++ b/entity/Salesproject_entity/Salesproject_entity.aod @@ -74,10 +74,11 @@ </entityField> <entityField> <name>PROJECTCODE</name> + <documentation>%aditoprj%/entity/Salesproject_entity/entityfields/projectcode/documentation.adoc</documentation> <title>Project number</title> <tableName>SALESPROJECT</tableName> <columnName>PROJECTCODE</columnName> - <state>AUTO</state> + <state>READONLY</state> <valueProcess>%aditoprj%/entity/Salesproject_entity/entityfields/projectcode/valueProcess.js</valueProcess> <onValidation>%aditoprj%/entity/Salesproject_entity/entityfields/projectcode/onValidation.js</onValidation> <onValueChange>%aditoprj%/entity/Salesproject_entity/entityfields/projectcode/onValueChange.js</onValueChange> diff --git a/entity/Salesproject_entity/entityfields/projectcode/documentation.adoc b/entity/Salesproject_entity/entityfields/projectcode/documentation.adoc new file mode 100644 index 0000000000000000000000000000000000000000..cec9521fc5f69485d07ee5f0b05f6cb82c11d1da --- /dev/null +++ b/entity/Salesproject_entity/entityfields/projectcode/documentation.adoc @@ -0,0 +1,5 @@ += PROJECTCODE +:hardbreaks: + +Unique identification number of the offer. +It's automatically generated from the starting number _1000_. \ No newline at end of file diff --git a/entity/Salesproject_entity/entityfields/projectcode/valueProcess.js b/entity/Salesproject_entity/entityfields/projectcode/valueProcess.js index 140b1f23cde52ffcef0e9ccc4b9ecb44505919c4..f1b5e3b17ea89ac55ec46edeba2513361aeabab9 100644 --- a/entity/Salesproject_entity/entityfields/projectcode/valueProcess.js +++ b/entity/Salesproject_entity/entityfields/projectcode/valueProcess.js @@ -5,5 +5,5 @@ import("Salesproject_lib"); if(vars.get("$sys.operatingstate") == neon.OPERATINGSTATE_NEW) { - result.string( Salesproject.getNextProjectNumber() ); + result.string(Salesproject.getNextProjectNumber()); } \ No newline at end of file diff --git a/process/OfferOrder_lib/process.js b/process/OfferOrder_lib/process.js index 2e2e5b4a3c90e7c0de2f68b617fbf9e9f7e1e021..42d6f9e05948826a4377b7bbd3530e2bc0c3319a 100644 --- a/process/OfferOrder_lib/process.js +++ b/process/OfferOrder_lib/process.js @@ -37,7 +37,7 @@ OfferUtils.getNextOfferVersionNumber = function(offerCode) { * * @param {String} offerNumber offer number to check * - * @return {boolean} passed number is valid + * @return {Boolean} passed number is valid */ OfferUtils.validateOfferNumber = function(offerNumber) { return NumberSequencingUtils.validateUniqueNumber(offerNumber, "OFFERCODE", "OFFER"); diff --git a/process/Salesproject_lib/process.js b/process/Salesproject_lib/process.js index f709dec67ee74aefabc5abc818e4f4ec87f251ba..a7a26eb60f366f028bee4f911216f58fc123225f 100644 --- a/process/Salesproject_lib/process.js +++ b/process/Salesproject_lib/process.js @@ -20,8 +20,7 @@ function Salesproject() {} * @result {String} next valid project number */ Salesproject.getNextProjectNumber = function() { - var JdUtils = new JDitoUtils(); - return JdUtils.getNextUniqueNumber("PROJECTCODE", "SALESPROJECT"); + return NumberSequencingUtils.getNextUniqueNumber("PROJECTCODE", "SALESPROJECT"); } /** @@ -32,8 +31,7 @@ Salesproject.getNextProjectNumber = function() { * @result {Boolean} passed number is valid */ Salesproject.validateProjectNumber = function(projectNumber) { - var JdUtils = new JDitoUtils(); - return JdUtils.validateUniqueNumber(projectNumber, "PROJECTCODE", "SALESPROJECT"); + return NumberSequencingUtils.validateUniqueNumber(projectNumber, "PROJECTCODE", "SALESPROJECT"); } /** @@ -53,12 +51,12 @@ Salesproject.insertMilestone = function(salesprojectId, type, value, notifyForec ["SALESPROJECT_CYCLEID", "SALESPROJECT_ID", "TYPE", "VALUE", "DATE_START", "USER_NEW", "DATE_NEW"], null, [util.getNewUUID(), salesprojectId, type, value, vars.get("$sys.date"), vars.get("$sys.user"), vars.get("$sys.date")]); + if (notifyForecast) { this.notifyToUpdateForecast() } return true; } - return false; } @@ -66,6 +64,6 @@ Salesproject.insertMilestone = function(salesprojectId, type, value, notifyForec * Notify the user to update the forecast */ Salesproject.notifyToUpdateForecast = function() { - // Todo logging.show durch sinnvolle Meldung ersetzen oder ähnlich... + // TODO: logging.show durch sinnvolle Meldung ersetzen oder ähnlich... logging.show(translate.text("Please update the forecast.")); } \ No newline at end of file