From 4cec0c009157d94bab0981c2d6b6e853dc15dff9 Mon Sep 17 00:00:00 2001 From: sachin1302 <45123405+sachin1302@users.noreply.github.com> Date: Wed, 24 Nov 2021 15:15:17 +0530 Subject: [PATCH 1/4] Update pt-reports.yml Added one more column as Uername under PTCollectionCount report. Modified the query to achieve payments count through BBPS. --- configs/reports/configs/pt-reports.yml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/configs/reports/configs/pt-reports.yml b/configs/reports/configs/pt-reports.yml index 1c6566bc..a222444b 100644 --- a/configs/reports/configs/pt-reports.yml +++ b/configs/reports/configs/pt-reports.yml @@ -1120,7 +1120,12 @@ ReportDefinitions: label: reports.pt.count type: string source: pt - total: true + total: true + - name: username + label: reports.pt.username + type: string + source: pt + total: false searchParams: - name: fromDate label: reports.pt.fromDate @@ -1143,11 +1148,11 @@ ReportDefinitions: isMandatory: false searchClause: AND p.tenantId = $ulb query: | - select initcap(split_part(p.tenantId, '.', 2)) as tenantId, p.paymentmode ,sum(p.totalamountpaid), count(p.id) - FROM egcl_payment p, egcl_paymentdetail pd - WHERE p.id=pd.paymentid and pd.businessservice ='PT' - groupby: GROUP BY p.tenantid, p.paymentmode - orderby: ORDER BY p.tenantId asc + select initcap(split_part(p.tenantId, '.', 2)) as tenantId, p.paymentmode, sum(p.totalamountpaid), count(p.id), un.username as username + FROM egcl_payment p, egcl_paymentdetail pd, eg_user un + WHERE p.id=pd.paymentid and p.createdby=CAST(un.id as varchar) and pd.businessservice='PT' and p.tenantid != 'uk.testing' + groupby: GROUP BY p.tenantid, p.paymentmode, un.username + orderby: ORDER BY p.tenantId asc - reportName: PTAdoptionReport summary: Number of applications From f9860f6d84d60772e3c1cac9a042bf077ac9150e Mon Sep 17 00:00:00 2001 From: sachin1302 <45123405+sachin1302@users.noreply.github.com> Date: Tue, 7 Dec 2021 13:37:10 +0530 Subject: [PATCH 2/4] Update pt-reports.yml Make the changes according to UNION selection, removed the user column. --- configs/reports/configs/pt-reports.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/configs/reports/configs/pt-reports.yml b/configs/reports/configs/pt-reports.yml index a222444b..c46ec792 100644 --- a/configs/reports/configs/pt-reports.yml +++ b/configs/reports/configs/pt-reports.yml @@ -1120,12 +1120,7 @@ ReportDefinitions: label: reports.pt.count type: string source: pt - total: true - - name: username - label: reports.pt.username - type: string - source: pt - total: false + total: true searchParams: - name: fromDate label: reports.pt.fromDate @@ -1148,11 +1143,16 @@ ReportDefinitions: isMandatory: false searchClause: AND p.tenantId = $ulb query: | - select initcap(split_part(p.tenantId, '.', 2)) as tenantId, p.paymentmode, sum(p.totalamountpaid), count(p.id), un.username as username - FROM egcl_payment p, egcl_paymentdetail pd, eg_user un - WHERE p.id=pd.paymentid and p.createdby=CAST(un.id as varchar) and pd.businessservice='PT' and p.tenantid != 'uk.testing' - groupby: GROUP BY p.tenantid, p.paymentmode, un.username - orderby: ORDER BY p.tenantId asc + select initcap(split_part(p.tenantid, '.', 2)) as tenantID, p.paymentmode, sum(p.totalamountpaid), count(p.id) + FROM egcl_payment p, egcl_paymentdetail pd + WHERE p.id=pd.paymentid and pd.businessservice='PT' and p.tenantid != 'uk.testing' + groupby: GROUP BY p.tenantid, p.paymentmode + UNION + select initcap(split_part(p.tenantid, '.', 2)) as tenantId, p.paymentmode, sum(p.totalamountpaid), count(p.id) + FROM egcl_payment p, egcl_paymentdetail pd + WHERE p.id=pd.paymentid and p.createdby=CAST(un.id as varchar) and pd.businessservice='PT' and p.tenantid != 'uk.testing' + groupby: GROUP BY p.tenantid, p.paymentmode + - reportName: PTAdoptionReport summary: Number of applications From d5d6f8e632bfef20abb6efcfc747dba3be2cec8b Mon Sep 17 00:00:00 2001 From: sachin1302 <45123405+sachin1302@users.noreply.github.com> Date: Thu, 9 Dec 2021 11:44:37 +0530 Subject: [PATCH 3/4] Update pt-reports.yml --- configs/reports/configs/pt-reports.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/configs/reports/configs/pt-reports.yml b/configs/reports/configs/pt-reports.yml index c46ec792..10068041 100644 --- a/configs/reports/configs/pt-reports.yml +++ b/configs/reports/configs/pt-reports.yml @@ -1150,7 +1150,8 @@ ReportDefinitions: UNION select initcap(split_part(p.tenantid, '.', 2)) as tenantId, p.paymentmode, sum(p.totalamountpaid), count(p.id) FROM egcl_payment p, egcl_paymentdetail pd - WHERE p.id=pd.paymentid and p.createdby=CAST(un.id as varchar) and pd.businessservice='PT' and p.tenantid != 'uk.testing' + WHERE p.id=pd.paymentid and p.createdby in (select un.id::text from eg_user un where un.username in ('BBPS_ADMIN')) + and pd.businessservice='PT' and p.tenantid != 'uk.testing' groupby: GROUP BY p.tenantid, p.paymentmode From b9c1d78aba5e99d6ecdae7972d4901efaca09b82 Mon Sep 17 00:00:00 2001 From: sachin1302 <45123405+sachin1302@users.noreply.github.com> Date: Mon, 13 Dec 2021 13:04:20 +0530 Subject: [PATCH 4/4] Update pt-reports.yml Update the changes regarding excluding the BBPS collection in second query. --- configs/reports/configs/pt-reports.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/configs/reports/configs/pt-reports.yml b/configs/reports/configs/pt-reports.yml index 10068041..93ad834f 100644 --- a/configs/reports/configs/pt-reports.yml +++ b/configs/reports/configs/pt-reports.yml @@ -1145,13 +1145,14 @@ ReportDefinitions: query: | select initcap(split_part(p.tenantid, '.', 2)) as tenantID, p.paymentmode, sum(p.totalamountpaid), count(p.id) FROM egcl_payment p, egcl_paymentdetail pd - WHERE p.id=pd.paymentid and pd.businessservice='PT' and p.tenantid != 'uk.testing' + WHERE p.id=pd.paymentid and p.createdby in (select un.id::text from eg_user un where un.username in ('BBPS_ADMIN')) + and pd.businessservice='PT' and p.tenantid != 'uk.testing' groupby: GROUP BY p.tenantid, p.paymentmode - UNION + UNION ALL select initcap(split_part(p.tenantid, '.', 2)) as tenantId, p.paymentmode, sum(p.totalamountpaid), count(p.id) FROM egcl_payment p, egcl_paymentdetail pd - WHERE p.id=pd.paymentid and p.createdby in (select un.id::text from eg_user un where un.username in ('BBPS_ADMIN')) - and pd.businessservice='PT' and p.tenantid != 'uk.testing' + WHERE p.id=pd.paymentid and p.createdby in (select un.id::text from eg_user un where un.username not in ('BBPS_ADMIN')) + and pd.businessservice='PT' and p.tenantid != 'uk.testing' groupby: GROUP BY p.tenantid, p.paymentmode