Skip to content

Commit 6870e81

Browse files
committed
Add NextInvoiceDate to accounts report/minor fix to payment report
1 parent e945da2 commit 6870e81

2 files changed

Lines changed: 9 additions & 3 deletions

File tree

reports/accounts_summary/v_report_account_summary.ddl

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ select
99
aa.billing_cycle_day_local as BCD,
1010
aa.currency as Currency,
1111
pm.plugin_name as PaymentMethodName,
12-
aat.state as AccountStatus
12+
aat.state as AccountStatus,
13+
date_format(aa.created_date,'%Y-%m-%d') as day,
14+
n.effective_date as NextInvoiceDate
1315
from analytics_accounts aa
1416
left join payment_methods pm
1517
on aa.payment_method_id = pm.id
@@ -19,4 +21,7 @@ left join analytics_account_transitions aat
1921
select max(created_date)
2022
from analytics_account_transitions
2123
where account_id = aa.account_id
22-
);
24+
)
25+
left join notifications n
26+
on aa.account_record_id=n.search_key1
27+
and n.class_name='org.killbill.billing.invoice.notification.NextBillingDateNotificationKey';

reports/payments_summary/v_payments_summary.ddl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ app.account_external_key as AccountExternalKey,
99
app.plugin_name as PaymentProvider,
1010
app.amount as PaymentAmount,
1111
app.currency as Currency,
12-
app.tenant_record_id
12+
app.tenant_record_id,
13+
date_format(app.created_date,'%Y-%m-%d') as day
1314
from analytics_payment_purchases app
1415
left join analytics_accounts aa on app.account_id=aa.account_id

0 commit comments

Comments
 (0)