Prefix:
fa_Table Count: 45
Last Updated: 2026-01-10
Overview
The FA module provides nonprofit fund accounting capabilities including chart of accounts, general ledger, fund/program tracking, budgeting, accounts receivable, accounts payable, purchasing, and banking/reconciliation.Table Categories
1. Chart of Accounts (3 tables)
Account Types (Enum):
asset,liability,equity,revenue,expense
- Assets:
current_asset,fixed_asset,other_asset - Liabilities:
current_liability,long_term_liability - Equity:
net_assets,retained_earnings - Revenue:
program_revenue,contribution,grant,other_revenue - Expense:
program_expense,admin_expense,fundraising_expense
2. General Ledger (3 tables)
Journal Entry Status:
draft→pending_approval→postedreversed(after reversal)
3. Fiscal Management (2 tables)
Period Status (Enum):
future→open→closed→locked
- Only one
is_currentfiscal year per org - Periods must be sequential with no gaps
- Closed periods cannot accept new postings
4. Fund Accounting (2 tables)
Fund Types (Enum):
unrestricted- General operatingtemporarily_restricted- Time/purpose restrictionspermanently_restricted- Endowment fundsboard_designated- Board-restricted funds
5. Budgeting (4 tables)
Budget Status (Enum):
draft→submitted→approved→activerejected(back to draft)
original- Initial approved budgetrevised- Mid-year revisionforecast- Rolling forecastscenario- What-if analysis
6. Accounts Receivable (8 tables)
Invoice Status (Enum):
draft→posted→partially_paid→paidvoid(cancelled)written_off(bad debt)
7. Accounts Payable (6 tables)
Payment Methods:
check,ach,wire,credit_card,cash
8. Purchasing (6 tables)
PO Status Flow:
9. Banking (6 tables)
Reconciliation Workflow:
10. Reporting (4 tables)
Standard Reports:
- Statement of Financial Position (Balance Sheet)
- Statement of Activities (Income Statement)
- Statement of Functional Expenses
- Statement of Cash Flows
- Budget vs Actual
- Trial Balance
- General Ledger Detail
11. Module Settings (1 table)
Key Settings:
Common Query Patterns
Get Account Balance
Get Trial Balance
Get AR Aging
Get Budget Variance
RLS Policies
FA tables use strict RLS:- All tables filtered by
organization_id - Posted entries cannot be modified (application-level)
- Sensitive data (vendor banking) restricted to FA admins
fa_user_has_access()- General access checkfa_can_post_to_period()- Period status checkfa_validate_journal_entry()- Balance validation
Triggers & Functions
Auto-Calculations
fa_update_account_balance()- Updates balances on postingfa_update_invoice_balance()- Updates AR balance on paymentfa_update_bill_balance()- Updates AP balance on payment
Validations
fa_validate_balanced_entry()- Ensures debits = creditsfa_validate_period_open()- Checks period statusfa_validate_fund_restriction()- Fund usage rules
See Also
- FA Module Specs
- FA Module Specs - See fund accounting specifications
- Database Schema Overview