Accounts Payable Dashboards
This document describes the Accounts Payable dashboards to build in Metabase using the AP reporting views. These dashboards are created in the Metabase UI; there is no automated export/import in this repo.
Prerequisites
- Run AP migrations to create the reporting views:
accounts_payable_bill_balance_vaccounts_payable_aging_vaccounts_payable_payments_v
- Ensure Metabase is connected to the application database.
Dashboard: AP Overview
Use accounts_payable_bill_balance_v and accounts_payable_aging_v.
Widgets:
- Total AP balance: sum
outstandingfromaccounts_payable_bill_balance_v. - Overdue balance: sum
balance_duewheredue_date < CURRENT_DATEanddue_date IS NOT NULL. - Bills due this week: sum
balance_duewheredue_datebetweenCURRENT_DATEandCURRENT_DATE + 7. - Bills due next 30 days: sum
balance_duewheredue_datebetweenCURRENT_DATEandCURRENT_DATE + 30.
Filters:
business_id(required if multi-tenant).- Optional
supplier_id,status,currency_code.
Null due_date handling:
- Exclude
due_date IS NULLfrom overdue and due-range widgets. - Show
bucket = 'No due date'in a separate widget if needed.
Dashboard: Cash Planning
Use accounts_payable_bill or accounts_payable_aging_v.
Widgets:
- Upcoming scheduled payments: bills with
status = 'scheduled'anddue_datein a selectable range. - Cash required by date: daily sum of
balance_duewheredue_date = :dateandstatus IN ('approved', 'scheduled').
Filters:
business_id(required if multi-tenant).- Date range for
due_date.
Dashboard: Supplier Risk
Use accounts_payable_bill_balance_v and base tables as needed.
Widgets:
- AP balance by supplier: sum
outstandinggrouped bysupplier_id. - DPO (Days Payable Outstanding): average days between
purchase_dateand the most recent posted payment per bill. Default filter: last 12 months.
Filters:
business_id(required if multi-tenant).- Optional
supplier_id, date range forpurchase_date.
Notes
- FX deviation checks are not implemented yet; if needed, add a Metabase
question that compares
exchange_rateto your reference rate table. - Approval threshold and role-based permissions are handled in the API and are not enforced in Metabase queries.