From 157da7379ed5afbbab83fcaa5f59b275fc909315 Mon Sep 17 00:00:00 2001
From: Maria Hofmann <m.hofmann@adito.de>
Date: Thu, 18 Apr 2019 14:45:04 +0200
Subject: [PATCH] =?UTF-8?q?[Projekt:=20Entwicklung=20-=20Neon][TicketNr.:?=
 =?UTF-8?q?=201036415][=C3=9Cbernahme=20AUDIT=20und=20Logging=20aus=20best?=
 =?UTF-8?q?ehendem=20xRM-Basic=20f=C3=BCr=20ADITO=202019]=20translate4Log,?=
 =?UTF-8?q?=20autoMapTrueFalse4Log,=20tableRef?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 aliasDefinition/Data_alias/Data_alias.aod     | 134 +++++++++++++++---
 .../translate4log/property.js                 |   4 +
 .../translate4log/property.js                 |   7 +
 .../translate4log/property.js                 |   5 +
 .../translate4log/property.js                 |   7 +
 .../translate4log/property.js                 |   4 +
 .../translate4log/property.js                 |   7 +
 7 files changed, 149 insertions(+), 19 deletions(-)
 create mode 100644 aliasDefinition/Data_alias/aliasdefinitionsub/entitygroup/entities/offer/entityfields/contact_id/customproperties/translate4log/property.js
 create mode 100644 aliasDefinition/Data_alias/aliasdefinitionsub/entitygroup/entities/offer/entityfields/net/customproperties/translate4log/property.js
 create mode 100644 aliasDefinition/Data_alias/aliasdefinitionsub/entitygroup/entities/offer/entityfields/salesproject_id/customproperties/translate4log/property.js
 create mode 100644 aliasDefinition/Data_alias/aliasdefinitionsub/entitygroup/entities/offer/entityfields/vat/customproperties/translate4log/property.js
 create mode 100644 aliasDefinition/Data_alias/aliasdefinitionsub/entitygroup/entities/salesproject/entityfields/contact_id/customproperties/translate4log/property.js
 create mode 100644 aliasDefinition/Data_alias/aliasdefinitionsub/entitygroup/entities/salesproject_member/entityfields/contact_id/customproperties/translate4log/property.js

diff --git a/aliasDefinition/Data_alias/Data_alias.aod b/aliasDefinition/Data_alias/Data_alias.aod
index 8bc7a3372b..a078979ee7 100644
--- a/aliasDefinition/Data_alias/Data_alias.aod
+++ b/aliasDefinition/Data_alias/Data_alias.aod
@@ -1026,6 +1026,11 @@
                     <global v="false" />
                     <property v="true" />
                   </customBooleanProperty>
+                  <customStringProperty>
+                    <name>tableRef</name>
+                    <global v="false" />
+                    <property>CONTACT</property>
+                  </customStringProperty>
                 </customProperties>
                 <dependencies>
                   <entityDependency>
@@ -1181,6 +1186,11 @@
                     <global v="false" />
                     <property v="true" />
                   </customBooleanProperty>
+                  <customStringProperty>
+                    <name>tableRef</name>
+                    <global v="false" />
+                    <property>CONTACT</property>
+                  </customStringProperty>
                 </customProperties>
                 <dependencies>
                   <entityDependency>
@@ -1555,6 +1565,11 @@
                     <global v="false" />
                     <property v="true" />
                   </customBooleanProperty>
+                  <customBooleanProperty>
+                    <name>autoMapTrueFalse4Log</name>
+                    <global v="false" />
+                    <property v="true" />
+                  </customBooleanProperty>
                 </customProperties>
               </entityFieldDb>
               <entityFieldDb>
@@ -1668,6 +1683,11 @@
                     <global v="false" />
                     <property v="true" />
                   </customBooleanProperty>
+                  <customBooleanProperty>
+                    <name>autoMapTrueFalse4Log</name>
+                    <global v="false" />
+                    <property v="true" />
+                  </customBooleanProperty>
                 </customProperties>
               </entityFieldDb>
               <entityFieldDb>
@@ -2092,6 +2112,11 @@
                     <global v="false" />
                     <property v="true" />
                   </customBooleanProperty>
+                  <customStringProperty>
+                    <name>tableRef</name>
+                    <global v="false" />
+                    <property>PRODUCT</property>
+                  </customStringProperty>
                 </customProperties>
                 <dependencies>
                   <entityDependency>
@@ -2608,6 +2633,11 @@
                     <global v="false" />
                     <property v="true" />
                   </customBooleanProperty>
+                  <customJDitoProperty>
+                    <name>translate4Log</name>
+                    <global v="false" />
+                    <property>%aditoprj%/aliasDefinition/Data_alias/aliasdefinitionsub/entitygroup/entities/offer/entityfields/vat/customproperties/translate4log/property.js</property>
+                  </customJDitoProperty>
                 </customProperties>
               </entityFieldDb>
               <entityFieldDb>
@@ -2661,6 +2691,11 @@
                     <global v="false" />
                     <property v="true" />
                   </customBooleanProperty>
+                  <customJDitoProperty>
+                    <name>translate4Log</name>
+                    <global v="false" />
+                    <property>%aditoprj%/aliasDefinition/Data_alias/aliasdefinitionsub/entitygroup/entities/offer/entityfields/salesproject_id/customproperties/translate4log/property.js</property>
+                  </customJDitoProperty>
                 </customProperties>
               </entityFieldDb>
               <entityFieldDb>
@@ -2741,6 +2776,11 @@
                     <global v="false" />
                     <property v="true" />
                   </customBooleanProperty>
+                  <customJDitoProperty>
+                    <name>translate4Log</name>
+                    <global v="false" />
+                    <property>%aditoprj%/aliasDefinition/Data_alias/aliasdefinitionsub/entitygroup/entities/offer/entityfields/contact_id/customproperties/translate4log/property.js</property>
+                  </customJDitoProperty>
                 </customProperties>
               </entityFieldDb>
               <entityFieldDb>
@@ -2761,6 +2801,11 @@
                     <global v="false" />
                     <property v="true" />
                   </customBooleanProperty>
+                  <customJDitoProperty>
+                    <name>translate4Log</name>
+                    <global v="false" />
+                    <property>%aditoprj%/aliasDefinition/Data_alias/aliasdefinitionsub/entitygroup/entities/offer/entityfields/net/customproperties/translate4log/property.js</property>
+                  </customJDitoProperty>
                 </customProperties>
               </entityFieldDb>
               <entityFieldDb>
@@ -3082,6 +3127,11 @@
                     <global v="false" />
                     <property v="true" />
                   </customBooleanProperty>
+                  <customStringProperty>
+                    <name>tableRef</name>
+                    <global v="false" />
+                    <property>OFFER</property>
+                  </customStringProperty>
                 </customProperties>
               </entityFieldDb>
               <entityFieldDb>
@@ -3448,6 +3498,11 @@
                     <global v="false" />
                     <property v="true" />
                   </customBooleanProperty>
+                  <customJDitoProperty>
+                    <name>translate4Log</name>
+                    <global v="false" />
+                    <property>%aditoprj%/aliasDefinition/Data_alias/aliasdefinitionsub/entitygroup/entities/salesproject/entityfields/contact_id/customproperties/translate4log/property.js</property>
+                  </customJDitoProperty>
                 </customProperties>
               </entityFieldDb>
               <entityFieldDb>
@@ -3648,6 +3703,11 @@
                     <global v="false" />
                     <property v="true" />
                   </customBooleanProperty>
+                  <customStringProperty>
+                    <name>tableRef</name>
+                    <global v="false" />
+                    <property>SALESPROJECT</property>
+                  </customStringProperty>
                 </customProperties>
               </entityFieldDb>
             </entityFields>
@@ -3786,6 +3846,11 @@
                     <global v="false" />
                     <property v="true" />
                   </customBooleanProperty>
+                  <customStringProperty>
+                    <name>tableRef</name>
+                    <global v="false" />
+                    <property>SALESPROJECT</property>
+                  </customStringProperty>
                 </customProperties>
               </entityFieldDb>
               <entityFieldDb>
@@ -3945,6 +4010,11 @@
                     <global v="false" />
                     <property v="true" />
                   </customBooleanProperty>
+                  <customStringProperty>
+                    <name>tableRef</name>
+                    <global v="false" />
+                    <property>SALESPROJECT</property>
+                  </customStringProperty>
                 </customProperties>
               </entityFieldDb>
               <entityFieldDb>
@@ -4041,6 +4111,11 @@
                     <global v="false" />
                     <property v="true" />
                   </customBooleanProperty>
+                  <customJDitoProperty>
+                    <name>translate4Log</name>
+                    <global v="false" />
+                    <property>%aditoprj%/aliasDefinition/Data_alias/aliasdefinitionsub/entitygroup/entities/salesproject_member/entityfields/contact_id/customproperties/translate4log/property.js</property>
+                  </customJDitoProperty>
                 </customProperties>
               </entityFieldDb>
               <entityFieldDb>
@@ -4083,6 +4158,11 @@
                     <global v="false" />
                     <property v="true" />
                   </customBooleanProperty>
+                  <customStringProperty>
+                    <name>tableRef</name>
+                    <global v="false" />
+                    <property>SALESPROJECT</property>
+                  </customStringProperty>
                 </customProperties>
               </entityFieldDb>
               <entityFieldDb>
@@ -4253,12 +4333,13 @@
                 <isUnique v="false" />
                 <index v="false" />
                 <documentation></documentation>
-                <title></title>
+                <title>Date</title>
                 <description></description>
                 <customProperties>
                   <customBooleanProperty>
                     <name>log</name>
                     <global v="false" />
+                    <property v="true" />
                   </customBooleanProperty>
                 </customProperties>
               </entityFieldDb>
@@ -4273,7 +4354,7 @@
                 <isUnique v="true" />
                 <index v="false" />
                 <documentation></documentation>
-                <title></title>
+                <title>Timetracking Id</title>
                 <description></description>
               </entityFieldDb>
               <entityFieldDb>
@@ -4287,12 +4368,13 @@
                 <isUnique v="false" />
                 <index v="false" />
                 <documentation></documentation>
-                <title></title>
+                <title>Object Id</title>
                 <description></description>
                 <customProperties>
                   <customBooleanProperty>
                     <name>log</name>
                     <global v="false" />
+                    <property v="true" />
                   </customBooleanProperty>
                 </customProperties>
               </entityFieldDb>
@@ -4307,12 +4389,13 @@
                 <isUnique v="false" />
                 <index v="false" />
                 <documentation></documentation>
-                <title></title>
+                <title>Minutes</title>
                 <description></description>
                 <customProperties>
                   <customBooleanProperty>
                     <name>log</name>
                     <global v="false" />
+                    <property v="true" />
                   </customBooleanProperty>
                 </customProperties>
               </entityFieldDb>
@@ -4327,12 +4410,13 @@
                 <isUnique v="false" />
                 <index v="true" />
                 <documentation></documentation>
-                <title></title>
+                <title>Contact Id</title>
                 <description></description>
                 <customProperties>
                   <customBooleanProperty>
                     <name>log</name>
                     <global v="false" />
+                    <property v="true" />
                   </customBooleanProperty>
                 </customProperties>
               </entityFieldDb>
@@ -4347,12 +4431,13 @@
                 <isUnique v="false" />
                 <index v="false" />
                 <documentation></documentation>
-                <title></title>
+                <title>Info</title>
                 <description></description>
                 <customProperties>
                   <customBooleanProperty>
                     <name>log</name>
                     <global v="false" />
+                    <property v="true" />
                   </customBooleanProperty>
                 </customProperties>
               </entityFieldDb>
@@ -4367,12 +4452,13 @@
                 <isUnique v="false" />
                 <index v="false" />
                 <documentation></documentation>
-                <title></title>
+                <title>Row Id</title>
                 <description></description>
                 <customProperties>
                   <customBooleanProperty>
                     <name>log</name>
                     <global v="false" />
+                    <property v="true" />
                   </customBooleanProperty>
                 </customProperties>
               </entityFieldDb>
@@ -5401,7 +5487,7 @@
                 <isUnique v="true" />
                 <index v="false" />
                 <documentation></documentation>
-                <title></title>
+                <title>Task Id</title>
                 <description></description>
               </entityFieldDb>
               <entityFieldDb>
@@ -5436,12 +5522,13 @@
                 <isUnique v="false" />
                 <index v="false" />
                 <documentation></documentation>
-                <title></title>
+                <title>Status</title>
                 <description></description>
                 <customProperties>
                   <customBooleanProperty>
                     <name>log</name>
                     <global v="false" />
+                    <property v="true" />
                   </customBooleanProperty>
                 </customProperties>
               </entityFieldDb>
@@ -5477,12 +5564,13 @@
                 <isUnique v="false" />
                 <index v="true" />
                 <documentation></documentation>
-                <title></title>
+                <title>Requestor contact Id</title>
                 <description></description>
                 <customProperties>
                   <customBooleanProperty>
                     <name>log</name>
                     <global v="false" />
+                    <property v="true" />
                   </customBooleanProperty>
                 </customProperties>
               </entityFieldDb>
@@ -5497,12 +5585,13 @@
                 <isUnique v="false" />
                 <index v="false" />
                 <documentation></documentation>
-                <title></title>
+                <title>Subject</title>
                 <description></description>
                 <customProperties>
                   <customBooleanProperty>
                     <name>log</name>
                     <global v="false" />
+                    <property v="true" />
                   </customBooleanProperty>
                 </customProperties>
               </entityFieldDb>
@@ -5517,12 +5606,13 @@
                 <isUnique v="false" />
                 <index v="false" />
                 <documentation></documentation>
-                <title></title>
+                <title>Protection level</title>
                 <description></description>
                 <customProperties>
                   <customBooleanProperty>
                     <name>log</name>
                     <global v="false" />
+                    <property v="true" />
                   </customBooleanProperty>
                 </customProperties>
               </entityFieldDb>
@@ -5537,12 +5627,13 @@
                 <isUnique v="false" />
                 <index v="false" />
                 <documentation></documentation>
-                <title></title>
+                <title>Start date</title>
                 <description></description>
                 <customProperties>
                   <customBooleanProperty>
                     <name>log</name>
                     <global v="false" />
+                    <property v="true" />
                   </customBooleanProperty>
                 </customProperties>
               </entityFieldDb>
@@ -5557,12 +5648,13 @@
                 <isUnique v="false" />
                 <index v="false" />
                 <documentation></documentation>
-                <title></title>
+                <title>Type</title>
                 <description></description>
                 <customProperties>
                   <customBooleanProperty>
                     <name>log</name>
                     <global v="false" />
+                    <property v="true" />
                   </customBooleanProperty>
                 </customProperties>
               </entityFieldDb>
@@ -5619,12 +5711,13 @@
                 <isUnique v="false" />
                 <index v="false" />
                 <documentation></documentation>
-                <title></title>
+                <title>Progress</title>
                 <description></description>
                 <customProperties>
                   <customBooleanProperty>
                     <name>log</name>
                     <global v="false" />
+                    <property v="true" />
                   </customBooleanProperty>
                 </customProperties>
               </entityFieldDb>
@@ -7109,12 +7202,13 @@
                 <isUnique v="false" />
                 <index v="false" />
                 <documentation></documentation>
-                <title></title>
+                <title>Object row Id</title>
                 <description></description>
                 <customProperties>
                   <customBooleanProperty>
                     <name>log</name>
                     <global v="false" />
+                    <property v="true" />
                   </customBooleanProperty>
                 </customProperties>
               </entityFieldDb>
@@ -7129,12 +7223,13 @@
                 <isUnique v="false" />
                 <index v="false" />
                 <documentation></documentation>
-                <title></title>
+                <title>Object type</title>
                 <description></description>
                 <customProperties>
                   <customBooleanProperty>
                     <name>log</name>
                     <global v="false" />
+                    <property v="true" />
                   </customBooleanProperty>
                 </customProperties>
               </entityFieldDb>
@@ -7149,7 +7244,7 @@
                 <isUnique v="true" />
                 <index v="false" />
                 <documentation></documentation>
-                <title></title>
+                <title>Task link Id</title>
                 <description></description>
               </entityFieldDb>
               <entityFieldDb>
@@ -7163,12 +7258,13 @@
                 <isUnique v="false" />
                 <index v="true" />
                 <documentation></documentation>
-                <title></title>
+                <title>Task Id</title>
                 <description></description>
                 <customProperties>
                   <customBooleanProperty>
                     <name>log</name>
                     <global v="false" />
+                    <property v="true" />
                   </customBooleanProperty>
                 </customProperties>
               </entityFieldDb>
diff --git a/aliasDefinition/Data_alias/aliasdefinitionsub/entitygroup/entities/offer/entityfields/contact_id/customproperties/translate4log/property.js b/aliasDefinition/Data_alias/aliasdefinitionsub/entitygroup/entities/offer/entityfields/contact_id/customproperties/translate4log/property.js
new file mode 100644
index 0000000000..66c0ea04fb
--- /dev/null
+++ b/aliasDefinition/Data_alias/aliasdefinitionsub/entitygroup/entities/offer/entityfields/contact_id/customproperties/translate4log/property.js
@@ -0,0 +1,4 @@
+import("system.result");
+import("lib_addr");
+
+result.string(new AddrObject("{value}").formatAddress("{on} - {fn} {ln} {ci}"));
\ No newline at end of file
diff --git a/aliasDefinition/Data_alias/aliasdefinitionsub/entitygroup/entities/offer/entityfields/net/customproperties/translate4log/property.js b/aliasDefinition/Data_alias/aliasdefinitionsub/entitygroup/entities/offer/entityfields/net/customproperties/translate4log/property.js
new file mode 100644
index 0000000000..e53af631e7
--- /dev/null
+++ b/aliasDefinition/Data_alias/aliasdefinitionsub/entitygroup/entities/offer/entityfields/net/customproperties/translate4log/property.js
@@ -0,0 +1,7 @@
+import("system.vars");
+import("system.result");
+import("system.text");
+
+var val = vars.get("$local.value");
+
+result.string(text.formatDouble(val, "#,##0.00"));
\ No newline at end of file
diff --git a/aliasDefinition/Data_alias/aliasdefinitionsub/entitygroup/entities/offer/entityfields/salesproject_id/customproperties/translate4log/property.js b/aliasDefinition/Data_alias/aliasdefinitionsub/entitygroup/entities/offer/entityfields/salesproject_id/customproperties/translate4log/property.js
new file mode 100644
index 0000000000..d2bcb07a7b
--- /dev/null
+++ b/aliasDefinition/Data_alias/aliasdefinitionsub/entitygroup/entities/offer/entityfields/salesproject_id/customproperties/translate4log/property.js
@@ -0,0 +1,5 @@
+import("system.result");
+import("system.db");
+import("lib_sql");
+
+result.string(db.cell("select " + concat(["PROJECTTITLE", "'/'", "cast( PROJECTNUMBER as char(5))"]) + " from SALESPROJECT where SALESPROJECTID = '{value}'"));
\ No newline at end of file
diff --git a/aliasDefinition/Data_alias/aliasdefinitionsub/entitygroup/entities/offer/entityfields/vat/customproperties/translate4log/property.js b/aliasDefinition/Data_alias/aliasdefinitionsub/entitygroup/entities/offer/entityfields/vat/customproperties/translate4log/property.js
new file mode 100644
index 0000000000..e53af631e7
--- /dev/null
+++ b/aliasDefinition/Data_alias/aliasdefinitionsub/entitygroup/entities/offer/entityfields/vat/customproperties/translate4log/property.js
@@ -0,0 +1,7 @@
+import("system.vars");
+import("system.result");
+import("system.text");
+
+var val = vars.get("$local.value");
+
+result.string(text.formatDouble(val, "#,##0.00"));
\ No newline at end of file
diff --git a/aliasDefinition/Data_alias/aliasdefinitionsub/entitygroup/entities/salesproject/entityfields/contact_id/customproperties/translate4log/property.js b/aliasDefinition/Data_alias/aliasdefinitionsub/entitygroup/entities/salesproject/entityfields/contact_id/customproperties/translate4log/property.js
new file mode 100644
index 0000000000..9e1763cfe8
--- /dev/null
+++ b/aliasDefinition/Data_alias/aliasdefinitionsub/entitygroup/entities/salesproject/entityfields/contact_id/customproperties/translate4log/property.js
@@ -0,0 +1,4 @@
+import("system.result");
+import("system.db");
+
+result.string(db.cell("select ORGNAME from RELATION left join ORG on ORG_ID = ORGID where RELATIONID = '{value}'")); 
\ No newline at end of file
diff --git a/aliasDefinition/Data_alias/aliasdefinitionsub/entitygroup/entities/salesproject_member/entityfields/contact_id/customproperties/translate4log/property.js b/aliasDefinition/Data_alias/aliasdefinitionsub/entitygroup/entities/salesproject_member/entityfields/contact_id/customproperties/translate4log/property.js
new file mode 100644
index 0000000000..ef00476ae8
--- /dev/null
+++ b/aliasDefinition/Data_alias/aliasdefinitionsub/entitygroup/entities/salesproject_member/entityfields/contact_id/customproperties/translate4log/property.js
@@ -0,0 +1,7 @@
+import("lib_sql");
+import("system.result");
+import("system.db");
+
+result.string(db.cell("select " + concat(["SALUTATION", "TITLE", "FIRSTNAME", "LASTNAME"])
+            + "from RELATION "
+            + "join PERS on RELATION.PERS_ID = PERS.PERSID where RELATION.RELATIONID = '{value}'"));
\ No newline at end of file
-- 
GitLab