Skip to content

Commit 26c97a1

Browse files
committed
report corrections - daily payments value
1 parent aac8cca commit 26c97a1

4 files changed

Lines changed: 31 additions & 33 deletions

File tree

src/main/resources/reports/payments_total_daily/README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,13 @@ curl -v \
1515
-H 'Content-Type: application/json' \
1616
-d '{"reportName": "report_payments_total_daily",
1717
"reportType": "TIMELINE",
18-
"reportPrettyName": "Daily payments value",
18+
"reportPrettyName": "Daily Payments Value",
1919
"sourceTableName": "report_payments_total_daily",
2020
"refreshProcedureName": "refresh_report_payments_total_daily",
2121
"refreshFrequency": "HOURLY"}' \
2222
"http://127.0.0.1:8080/plugins/killbill-analytics/reports"
2323
```
24+
25+
## Report UI:
26+
27+
![daily-payments-value.png](daily-payments-value.png)
132 KB
Loading
Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,28 @@
11
create or replace view v_report_payments_total_daily as
22
select
3-
tenant_record_id
4-
, day
5-
, currency
6-
, sum(count) as count
7-
from v_report_payments_total_daily_sub1
8-
group by 1,2,3
9-
;
3+
tenant_record_id,
4+
date_format(created_date,'%Y-%m-%d') as day,
5+
currency,
6+
sum(ifnull(converted_amount, 0)) as count
7+
from (
8+
select
9+
ac.tenant_record_id,
10+
ac.created_date,
11+
ac.currency,
12+
ac.converted_amount
13+
from analytics_payment_captures ac
14+
where ac.payment_transaction_status = 'SUCCESS'
15+
and ac.report_group='default'
16+
17+
union all
18+
19+
select
20+
ap.tenant_record_id,
21+
ap.created_date,
22+
ap.currency,
23+
ap.converted_amount
24+
from analytics_payment_purchases ap
25+
where ap.payment_transaction_status = 'SUCCESS'
26+
and ap.report_group='default'
27+
) t
28+
group by 1,2,3;

src/main/resources/reports/payments_total_daily/v_report_payments_total_daily_sub1.ddl

Lines changed: 0 additions & 25 deletions
This file was deleted.

0 commit comments

Comments
 (0)