From bb2bdea788f7f1acf8c26ea69176e956f29a9823 Mon Sep 17 00:00:00 2001 From: Timotheus Pokorra Date: Mon, 18 Nov 2024 13:05:19 +0100 Subject: [PATCH] more fixes for znuny view --- .../db/changelog/9-hs-global/9120-integration-znuny.sql | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/resources/db/changelog/9-hs-global/9120-integration-znuny.sql b/src/main/resources/db/changelog/9-hs-global/9120-integration-znuny.sql index adaa1ce4..eeea88a4 100644 --- a/src/main/resources/db/changelog/9-hs-global/9120-integration-znuny.sql +++ b/src/main/resources/db/changelog/9-hs-global/9120-integration-znuny.sql @@ -41,7 +41,6 @@ SELECT JOIN hs_office.relation AS relation ON relation.anchoruuid = rs1.holderuuid JOIN hs_office.contact AS c ON c.uuid = relation.contactuuid JOIN hs_office.person AS per ON per.uuid = relation.holderuuid -where debitor.defaultprefix != 'hsh' -and relation.type != 'DEBITOR' -group by c.emailaddresses, c.phonenumbers; +WHERE (debitor.defaultprefix != 'hsh' OR (p.partnernumber = 10000 AND c.emailaddresses->>'main' = 'hostmaster@hostsharing.net')) +GROUP BY c.emailaddresses, c.phonenumbers; --// \ No newline at end of file