From e3a86df26ab2239924367e462e917ae583b84b28 Mon Sep 17 00:00:00 2001 From: "S.Listl" <S.Listl@SLISTL.aditosoftware.local> Date: Mon, 11 Feb 2019 08:44:29 +0100 Subject: [PATCH] Kundenstammblatt fix --- process/Org_lib/process.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/process/Org_lib/process.js b/process/Org_lib/process.js index 4f8ac77408..169a00701e 100644 --- a/process/Org_lib/process.js +++ b/process/Org_lib/process.js @@ -85,7 +85,7 @@ OrgUtils.openOrgReport = function(pOrgId) + " from PERS join RELATION on PERSID = PERS_ID"; persSql = SqlCondition.begin() .andPrepare("RELATION.ORG_ID", pOrgId) - .and("RELATION.STATUS = 1") + .and("RELATION.STATUS = 'BSIC0rel-stat-actv-ae03-b6b04430e90b'") //TODO: replace this with something that isn't a hard coded id .buildSql(persSql, "", " order by PERS.LASTNAME asc"); var persData = db.table(persSql); @@ -121,7 +121,7 @@ OrgUtils.openOrgReport = function(pOrgId) var histSql = "select ENTRYDATE, CATEGORY, FIRSTNAME, LASTNAME, INFO from ACTIVITY " + " join ACTIVITYLINK on ACTIVITYLINK.ACTIVITY_ID = ACTIVITYID " - + " join RELATION on ACTIVITYLINK.ROW_ID = RELATIONID" + + " join RELATION on ACTIVITYLINK.OBJECT_ROWID = RELATIONID" + " left join PERS on RELATION.PERS_ID = PERSID"; histSql = SqlCondition.begin() .andPrepare("RELATION.ORG_ID", pOrgId) //= all activities linked to the organization or an employee -- GitLab