Skip to content
Snippets Groups Projects
Commit 32a567f7 authored by Sebastian Listl's avatar Sebastian Listl :speech_balloon:
Browse files

merged origin/2020.2 into master

parents 48e41ec8 c5603256
No related branches found
No related tags found
No related merge requests found
Showing
with 208 additions and 50 deletions
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd">
<changeSet author="s.garb" id="995a11c7-fb16-4c33-b5ad-0c35f44905c3">
<addColumn tableName="OFFER">
<column name="DISCOUNT" type="NUMERIC(14,2)" />
<column name="DISCOUNTED_NET" type="NUMERIC(14,2)" />
</addColumn>
</changeSet>
<changeSet author="s.garb" id="801708bd-91f0-4468-bed9-0bbab7e46997">
<addColumn tableName="OFFER">
<column name="DISCOUNTED_VAT" type="NUMERIC(14,2)" />
</addColumn>
</changeSet>
</databaseChangeLog>
\ No newline at end of file
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd">
<include file="addColumnOffer.xml" relativeToChangelogFile="true" />
</databaseChangeLog>
\ No newline at end of file
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd">
<include relativeToChangelogFile="true" file="Offer/changelog.xml"/>
</databaseChangeLog>
\ No newline at end of file
......@@ -18,6 +18,7 @@
<include relativeToChangelogFile="true" file="basic/2020.2.0/changelog.xml"/>
<include relativeToChangelogFile="true" file="basic/2020.2.1/changelog.xml"/>
<include relativeToChangelogFile="true" file="basic/2020.2.2/changelog.xml"/>
<include relativeToChangelogFile="true" file="basic/2020.2.3/changelog.xml"/>
<include relativeToChangelogFile="true" file="basic/2021.0.0/changelog.xml"/>
<!--enable this only when you definetly want to overwrite the existing data with demo records:-->
......
......@@ -3108,6 +3108,48 @@
<title></title>
<description></description>
</entityFieldDb>
<entityFieldDb>
<name>DISCOUNT</name>
<dbName></dbName>
<primaryKey v="false" />
<columnType v="3" />
<size v="14" />
<scale v="2" />
<notNull v="false" />
<isUnique v="false" />
<index v="false" />
<documentation></documentation>
<title></title>
<description></description>
</entityFieldDb>
<entityFieldDb>
<name>DISCOUNTED_NET</name>
<dbName></dbName>
<primaryKey v="false" />
<columnType v="3" />
<size v="14" />
<scale v="2" />
<notNull v="false" />
<isUnique v="false" />
<index v="false" />
<documentation></documentation>
<title></title>
<description></description>
</entityFieldDb>
<entityFieldDb>
<name>DISCOUNTED_VAT</name>
<dbName></dbName>
<primaryKey v="false" />
<columnType v="3" />
<size v="14" />
<scale v="2" />
<notNull v="false" />
<isUnique v="false" />
<index v="false" />
<documentation></documentation>
<title></title>
<description></description>
</entityFieldDb>
</entityFields>
</entityDb>
<entityDb>
......
......@@ -38,10 +38,6 @@
<name>Task</name>
<kind v="10077" />
</entityNode>
<entityNode>
<name>Favorite</name>
<kind v="10077" />
</entityNode>
</childNodes>
</entityNode>
</childNodes>
......
......@@ -4,4 +4,4 @@ import("system.result");
import("MSTeams_lib");
var isTeamsEnabled = vars.get("$param.ObjectId_param") in MSTeamsUtils.getTeamLinkContexts() && MSTeamsUtils.isTeamsEnabled();
result.string(/*isTeamsEnabled ? neon.COMPONENTSTATE_EDITABLE : */neon.COMPONENTSTATE_INVISIBLE);
\ No newline at end of file
result.string(isTeamsEnabled ? neon.COMPONENTSTATE_EDITABLE : neon.COMPONENTSTATE_INVISIBLE);
\ No newline at end of file
import("Sql_lib");
import("system.vars");
import("Offer_lib");
OfferUtils.createNewOffer(null, null, null, vars.get("$field.ACTIVITYID"));
\ No newline at end of file
var activityId = vars.get("$field.ACTIVITYID");
var activityLinks = newSelect("ACTIVITYLINK.OBJECT_TYPE, ACTIVITYLINK.OBJECT_ROWID")
.from("ACTIVITYLINK")
.where("ACTIVITYLINK.ACTIVITY_ID", activityId)
.and("ACTIVITYLINK.OBJECT_TYPE", ["Person", "Organisation", "Salesproject"], SqlBuilder.IN())
.table();
//make a map from the 2d-array to easily access the ids by objectType
var linkMap = new Map(activityLinks);
//if we only have one Person: that person is the contact.
//otherwise: we check for organisations: if we only have one then we use that one.
//same logic for salesprojects: if we have only one: use that one
var contactId = linkMap.get("Person") || linkMap.get("Organisation");
var salesprojectId = linkMap.get("Salesproject");
OfferUtils.createNewOffer("Salesproject", salesprojectId, contactId, activityId);
\ No newline at end of file
import("system.tools");
import("system.SQLTYPES");
import("system.db");
import("system.datetime");
......@@ -8,45 +9,49 @@ import("Sql_lib");
import("system.calendars");
import("Calendar_lib");
var pFilter = CalendarUtil.reset_filterEvent();
var conditions = [];
var conditioncount = 0;
var user = undefined;
var stati = [];
var entries = [];
var calendarId = tools.getCurrentUser()[tools.PARAMS][tools.CALENDARID];
if(calendarId != "" && calendarId != null && calendarId != undefined)
{
var pFilter = CalendarUtil.reset_filterEvent();
var conditions = [];
var conditioncount = 0;
var user = undefined;
var stati = [];
var entries = [];
var startnumber = Number(vars.get("$sys.date"));
var endnumber = startnumber + 43200000 ;
var startnumber = Number(vars.get("$sys.date"));
var endnumber = startnumber + 43200000 ;
var start = startnumber + "";
var end = endnumber + "";
var start = startnumber + "";
var end = endnumber + "";
if ( pFilter.tentative == "true" )
stati.push(calendars.STATUS_TENTATIVE);
if ( pFilter.tentative == "true" )
stati.push(calendars.STATUS_TENTATIVE);
if ( pFilter.cancelled == "true" )
stati.push(calendars.STATUS_CANCELLED);
if ( pFilter.cancelled == "true" )
stati.push(calendars.STATUS_CANCELLED);
if ( pFilter.confirmed == "true" )
stati.push(CalendarUtil.mapCalendarStatus(calendars.STATUS_CONFIRMED, calendars.getBackendType() ));
if ( pFilter.confirmed == "true" )
stati.push(CalendarUtil.mapCalendarStatus(calendars.STATUS_CONFIRMED, calendars.getBackendType() ));
if (CalendarUtil.getCalendarSystemType(calendars.VEVENT) == calendars.BACKEND_EXCHANGEWS && pFilter.free == "true")
stati.push(calendars.STATUS_FREE);
if (CalendarUtil.getCalendarSystemType(calendars.VEVENT) == calendars.BACKEND_EXCHANGEWS && pFilter.free == "true")
stati.push(calendars.STATUS_FREE);
if ( pFilter.user != "" )
user = (pFilter.user).trim();
if ( pFilter.user != "" )
user = (pFilter.user).trim();
for ( var z = 0; z < stati.length; z++ )
CalendarUtil.addEntryCondition(conditions, ++conditioncount,
{
TYPE: calendars.VEVENT,
START: start,
END: end,
USER: user,
STATUS: stati[z]
});
for ( var z = 0; z < stati.length; z++ )
CalendarUtil.addEntryCondition(conditions, ++conditioncount,
{
TYPE: calendars.VEVENT,
START: start,
END: end,
USER: user,
STATUS: stati[z]
});
conditions["COUNT"] = String(conditioncount);
entries = calendars.getEntries(conditions);
conditions["COUNT"] = String(conditioncount);
entries = calendars.getEntries(conditions);
result.string(entries.length);
result.string(entries.length);
}
\ No newline at end of file
import("system.neon");
import("system.vars");
neon.openContext("MSTTeamsDocument", "MSTeamsDocumentEdit_view", null, neon.OPERATINGSTATE_VIEW, {
neon.openContext("MSTeamsDocument", "MSTeamsDocumentEdit_view", null, neon.OPERATINGSTATE_VIEW, {
"MSTTeamId_param" : vars.get("$param.MSTTeamId_param"),
"ObjectRowId_param" : vars.get("$param.AssignmentRowId_param"),
"AssignmentName_param" : vars.get("$param.AssignmentName_param"),
......
......@@ -6,6 +6,7 @@
<siblings>
<element>Address_entity</element>
</siblings>
<onValidation>%aditoprj%/entity/LetterRecipient_entity/onValidation.js</onValidation>
<titlePlural>Recipients</titlePlural>
<recordContainer>db</recordContainer>
<entityFields>
......
import("system.translate");
import("system.result");
import("Sql_lib");
import("system.vars");
var contactId = vars.get("$field.CONTACT_ID");
var standardAddress = newSelect("CONTACT.ADDRESS_ID")
.from("CONTACT")
.where("CONTACT.CONTACTID", contactId)
.cell();
if(!standardAddress)
{
result.string(translate.text("The selected Contact doesn't have an address set."));
}
\ No newline at end of file
import("system.neon");
import("system.vars");
import("system.result");
if (vars.get("$this.value") == null)
if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && vars.get("$this.value") == null)
result.string(false);
\ No newline at end of file
import("system.neon");
import("system.vars");
import("system.result");
if (vars.get("$this.value") == null)
if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && vars.get("$this.value") == null)
result.string("member");
\ No newline at end of file
import("system.vars");
import("system.entities");
import("Entity_lib");
import("system.result");
import("system.translate");
var members = EntityConsumerRowsHelper.getCurrentConsumerRows("TeamMembers", ["ROLE"]);
//this is a workaround, EntityConsumerRowsHelper.getCurrentConsumerRows should be used here
var loadRowsConfig = entities.createConfigForLoadingRows()
.entity("MSTTeamMember_entity")
.provider("MembersOfTeam")
.fields(["#UID", "ROLE"])
.addParameter("MSTTeamId_param", vars.get("$field.UID"));
var savedRows = entities.getRows(loadRowsConfig);
var members = new EntityConsumerRowsHelper(savedRows)
.consumer("TeamMembers")
.applyConsumerRowChanges()
.getRows();
var hasOwner = members.some(function (member)
{
return member["ROLE"] == "owner";
......
......@@ -78,9 +78,11 @@
<name>#PROVIDER_AGGREGATES</name>
<useAggregates v="true" />
</entityProvider>
<entityActionField>
<name>importMessages</name>
</entityActionField>
<entityField>
<name>TeamMessages</name>
<consumer>Messages</consumer>
<selectionMode>MULTI</selectionMode>
</entityField>
</entityFields>
<recordContainers>
<datalessRecordContainer>
......
......@@ -63,6 +63,7 @@
</entityProvider>
<entityActionField>
<name>importDocuments</name>
<title>Import Documents</title>
<onActionProcess>%aditoprj%/entity/MSTeamsDocument_entity/entityfields/importdocuments/onActionProcess.js</onActionProcess>
</entityActionField>
</entityFields>
......
import("system.text");
import("system.teams");
import("system.vars");
import("system.db");
import("system.util")
import("system.util");
import("Sql_lib");
import("system.net")
import("system.logging");
import("system.net");
import("system.neon");
var rowData = vars.get("$local.rowdata");
var documents = text.decodeMS(vars.get("$field.DOCUMENTS"));
documents.forEach(function (document)
......@@ -25,3 +22,5 @@ documents.forEach(function (document)
file, documentName, "", "", alias, util.getNewUUID());
});
neon.closeImage(vars.get("$sys.currentimage"), true);
neon.refreshAll();
\ No newline at end of file
......@@ -57,6 +57,20 @@
<name>#PROVIDER_AGGREGATES</name>
<useAggregates v="true" />
</entityProvider>
<entityActionField>
<name>importMessages</name>
<title>Import</title>
<onActionProcess>%aditoprj%/entity/MSTeamsMessage_entity/entityfields/importmessages/onActionProcess.js</onActionProcess>
</entityActionField>
<entityActionField>
<name>loadNext</name>
<title>Next</title>
<onActionProcess>%aditoprj%/entity/MSTeamsMessage_entity/entityfields/loadnext/onActionProcess.js</onActionProcess>
</entityActionField>
<entityActionField>
<name>loadPrevious</name>
<title>Prev</title>
</entityActionField>
</entityFields>
<recordContainers>
<jDitoRecordContainer>
......
import("Sql_lib");
import("system.datetime");
import("system.neon");
import("Util_lib");
import("system.vars");
var messages = vars.get("$sys.selection");
var description = messages.map(function (id)
{
var [user, date, message] = JSON.parse(id);
date = Date.parse(date).valueOf();
return "[" + datetime.toDate(date, "dd.MM.yyyy HH:mm") + "] " + user + "<br>" + message + "<br>";
}).join("<br>");
var links = newSelect(["OBJECT_TYPE", "OBJECT_ROWID"])
.from("MST_TEAMLINK")
.where("MST_TEAMLINK.MST_TEAM_ID", vars.get("$param.TeamId_param"))
.table();
neon.openContext("Activity", "ActivityEdit_view", null, neon.OPERATINGSTATE_NEW, {
"Info_param": description,
"PresetLinks_param": JSON.stringify(links)
});
\ 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