Skip to content

Commit f7a24d8

Browse files
committed
report corrections - refunds total daily
1 parent f7738ae commit f7a24d8

3 files changed

Lines changed: 7 additions & 3 deletions

File tree

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Daily refunds report
22

3-
Compute the total value (in the reference currency) of refunds per day per currency.
3+
Compute the total value (in the reference currency) of refunds per day per currency for each tenant.
44

55
The snapshot view is: `v_report_refunds_total_daily`
66

@@ -15,9 +15,13 @@ curl -v \
1515
-H 'Content-Type: application/json' \
1616
-d '{"reportName": "report_refunds_total_daily",
1717
"reportType": "TIMELINE",
18-
"reportPrettyName": "Daily refunds value",
18+
"reportPrettyName": "Daily Refunds Value",
1919
"sourceTableName": "report_refunds_total_daily",
2020
"refreshProcedureName": "refresh_report_refunds_total_daily",
2121
"refreshFrequency": "HOURLY"}' \
2222
"http://127.0.0.1:8080/plugins/killbill-analytics/reports"
2323
```
24+
25+
## Report UI:
26+
27+
![refunds-total-daily.png](refunds-total-daily.png)
121 KB
Loading

src/main/resources/reports/refunds_total_daily/v_report_refunds_total_daily.ddl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ select
33
ar.tenant_record_id
44
, date_format(ar.created_date,'%Y-%m-%d') as day
55
, ar.currency as currency
6-
, sum(ar.converted_amount) as count
6+
, sum(abs(ar.converted_invoice_amount_refunded)) as count
77
from
88
analytics_payment_refunds ar
99
where 1=1

0 commit comments

Comments
 (0)