Skip to content
Snippets Groups Projects
Commit 68f4ffd8 authored by Nico Bugl's avatar Nico Bugl
Browse files

[Projekt: Entwicklung - Neon][TicketNr.: 1036650][Modularisierung der Module...

[Projekt: Entwicklung - Neon][TicketNr.: 1036650][Modularisierung der Module aus dem Vertriebsprojekt]
- Forecast fertig umgebaut
- Bewertung/Klassifizierung kann nicht umgebaut werden weil geht noch nicht im Basic
- Offer fertig umgebaut
- Zeiterfassung bzw Timetracking ist bereits umgebaut
parent 2fe071f0
No related branches found
No related tags found
No related merge requests found
Showing
with 52 additions and 52 deletions
......@@ -10,9 +10,9 @@ if (contactId)
links.push([ContactUtils.getContextByContactId(contactId), contactId]);
}
if (vars.get("$field.SALESPROJECT_ID"))
if (vars.get("$field.OBJECT_ROWID"))
{
links.push(["Salesproject", vars.get("$field.SALESPROJECT_ID")]);
links.push(["Salesproject", vars.get("$field.OBJECT_ROWID")]);
}
ActivityUtils.createNewActivity(vars.getString("$field.OFFERID"), links);
\ No newline at end of file
......@@ -4,7 +4,7 @@ import("Offer_lib");
var params = {
"ContactId_param" : vars.get("$field.CONTACT_ID"),
"SalesprojectId_param" : vars.get("$field.SALESPROJECT_ID"),
"SalesprojectId_param" : vars.get("$field.OBJECT_ROWID"),
"OfferLanguage_param" : vars.get("$field.LANGUAGE"),
"OfferOriginal_Id_param" : vars.get("$field.OFFERID"),
"OfferCode_param" : vars.get("$field.OFFERCODE"),
......
......@@ -3,7 +3,7 @@ import("system.neon");
import("Offer_lib");
var contactId = vars.getString("$field.CONTACT_ID");
var salesprojectId = vars.getString("$field.SALESPROJECT_ID");
var salesprojectId = vars.getString("$field.OBJECT_ROWID");
var currency = vars.getString("$field.CURRENCY");
var language = vars.getString("$field.LANGUAGE");
var header = vars.getString("$field.HEADER");
......
......@@ -10,9 +10,9 @@ if (contactId)
links.push([ContactUtils.getContextByContactId(contactId), contactId]);
}
if (vars.get("$field.SALESPROJECT_ID"))
if (vars.get("$field.OBJECT_ROWID"))
{
links.push(["Salesproject", vars.get("$field.SALESPROJECT_ID")]);
links.push(["Salesproject", vars.get("$field.OBJECT_ROWID")]);
}
TaskUtils.createNewTask(vars.get("$field.OFFERID"), links);
\ No newline at end of file
import("system.neon");
import("system.vars");
import("system.db");
import("system.result");
import("Context_lib");
if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && !vars.get("$field.OBJECT_ROWID")) {
result.string("");
} else if (vars.exists("$field.OBJECT_TYPE") && vars.get("$field.OBJECT_TYPE")) {
result.string(db.cell(ContextUtils.getNameSql(vars.get("$field.OBJECT_TYPE"), vars.get("$field.OBJECT_ROWID"))));
}
\ No newline at end of file
import("system.vars");
import("system.result");
import("Entity_lib");
import("Context_lib");
result.string(ProcessHandlingUtils.getOnValidationValue(vars.get("$field.CONTACT_ORG_ID")));
\ No newline at end of file
result.string(ContextUtils.getContextName(vars.get("$field.OBJECT_TYPE")))
import("system.vars");
import("system.result");
if(vars.exists("$param.ObjectRowId_param") && vars.get("$param.ObjectRowId_param"))
result.string(vars.get("$param.ObjectRowId_param"));
\ No newline at end of file
import("system.result");
import("system.neon");
import("system.vars");
import("system.project");
if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && !vars.get("$field.OBJECT_TYPE")) {
result.string("");
} else if (vars.exists("$field.OBJECT_TYPE") && vars.get("$field.OBJECT_TYPE")) {
result.string(project.getDataModel(project.DATAMODEL_KIND_CONTEXT, vars.get("$field.OBJECT_TYPE"))[1]);
}
import("system.vars");
import("system.result");
if(vars.exists("$param.ObjectType_param") && vars.get("$param.ObjectType_param"))
result.string(vars.get("$param.ObjectType_param"));
\ No newline at end of file
import("system.vars");
import("system.result");
import("Salesproject_lib");
result.string(Salesproject.getSalesProjectTitleById(vars.getString("$field.SALESPROJECT_ID")));
\ No newline at end of file
import("system.vars");
import("system.result");
import("Contact_lib");
var type = ContactUtils.getContactType(vars.get("$field.CONTACT_ID"), vars.get("$field.CONTACT_PERSON_ID"), vars.get("$field.CONTACT_ORG_ID"));
result.string(type != 2);
import("system.neon");
import("system.result");
import("system.vars");
import("Entity_lib");
switch (vars.get("$sys.recordstate"))
{
case neon.OPERATINGSTATE_NEW:
//only EDITABLE if $field.CONTACT_ID is set
if(ProcessHandlingUtils.getOnValidationValue(vars.get("$field.CONTACT_ID")))
result.object(neon.COMPONENTSTATE_EDITABLE);
else
result.object(neon.COMPONENTSTATE_READONLY);
break;
default:
result.object(neon.COMPONENTSTATE_READONLY);
}
\ No newline at end of file
......@@ -10,9 +10,9 @@ if (contactId)
links.push([ContactUtils.getContextByContactId(contactId), contactId]);
}
if (vars.get("$field.SALESPROJECT_ID"))
if (vars.get("$field.OBJECT_ROWID"))
{
links.push(["Salesproject", vars.get("$field.SALESPROJECT_ID")]);
links.push(["Salesproject", vars.get("$field.OBJECT_ROWID")]);
}
result.object(links);
\ No newline at end of file
......@@ -3,7 +3,8 @@ import("system.result");
import("Sql_lib");
var cond = new SqlCondition();
cond.andPrepareVars("OFFER.SALESPROJECT_ID", "$param.SalesprojectId_param");
cond.andPrepareVars("OFFER.OBJECT_ROWID", "$param.ObjectRowId_param");
cond.andPrepareVars("OFFER.OBJECT_TYPE", "$param.ObjectType_param");
cond.andPrepareVars("OFFER.CONTACT_ID", "$param.ContactId_param");
//TODO: use a preparedCondition when available #1030812 #1034026
......
import("system.result");
result.string("OFFER left join CONTACT on CONTACTID = CONTACT_ID \n\
left join SALESPROJECT on SALESPROJECTID = SALESPROJECT_ID");
\ No newline at end of file
left join SALESPROJECT on SALESPROJECTID = OBJECT_ROWID");
\ No newline at end of file
import("system.result");
import("Context_lib");
result.string(ContextUtils.getNameSubselectSql("OBJECT_TYPE", "OBJECT_ROWID"))
\ No newline at end of file
......@@ -14,7 +14,7 @@
<dependencies>
<entityDependency>
<name>a7414022-56d3-4ca0-b15f-33601b655d78</name>
<entityName>SalesprojectClassification_entity</entityName>
<entityName>Classification_entity</entityName>
<fieldName>SalesprojectClassificationEntries</fieldName>
<isConsumer v="false" />
</entityDependency>
......
import("system.result");
import("system.neon");
import("system.vars");
if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW)
{
if(vars.exists("$param.SalesprojectId_param") && vars.get("$param.SalesprojectId_param") != null) {
result.string(vars.getString("$param.SalesprojectId_param"));
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment