File tree Expand file tree Collapse file tree
src/main/resources/reports Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # Invoice Aging Report
2+
3+ Displays customer invoice balances by aging buckets in both original currency and USD, along with invoice and account details.
4+
5+ The snapshot view is: ` v_report_invoice_aging `
6+
7+ ## Prerequisites
8+
9+ Run stored proc
10+
11+ ## Report Configuration
12+
13+ ```
14+ curl -v \
15+ -X POST \
16+ -u admin:password \
17+ -H "X-Killbill-ApiKey:bob" \
18+ -H "X-Killbill-ApiSecret:lazar" \
19+ -H 'Content-Type: application/json' \
20+ -d '{"reportName": "report_invoice_aging",
21+ "reportType": "TABLE",
22+ "reportPrettyName": "Invoice Aging Report",
23+ "sourceTableName": "report_invoice_aging",
24+ "refreshProcedureName": "refresh_report_invoice_aging",
25+ "refreshFrequency": "DAILY"}' \
26+ "http://127.0.0.1:8080/plugins/killbill-analytics/reports"
27+ ```
28+
29+ ## Report UI:
30+
31+ ![ invoice-aging.png] ( invoice-aging.png )
Original file line number Diff line number Diff line change 1+ create table report_invoices_monthly as select * from v_report_invoices_monthly limit 0 ;
2+
3+ drop procedure if exists refresh_report_invoices_monthly;
4+ DELIMITER //
5+ CREATE PROCEDURE refresh_report_invoices_monthly()
6+ BEGIN
7+
8+ DECLARE EXIT HANDLER FOR SQLEXCEPTION ROLLBACK ;
9+ DECLARE EXIT HANDLER FOR SQLWARNING ROLLBACK ;
10+
11+ SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
12+ START TRANSACTION ;
13+ delete from report_invoices_monthly;
14+ insert into report_invoices_monthly select * from v_report_invoices_monthly;
15+ COMMIT ;
16+
17+ END;
18+ //
19+ DELIMITER ;
You can’t perform that action at this time.
0 commit comments