ordered_funding_source_credit

0 rows


Description

The acq.ordered_funding_source_credit view is a prioritized ordering of funding source credits. When ordered by the first three columns, this view defines the order in which the various credits are to be tapped for spending, subject to the allocations in the acq.fund_allocation table.

The first column reflects the principle that we should spend money with deadlines before spending money without deadlines.

The second column reflects the principle that we should spend the oldest money first. For money with deadlines, that means that we spend first from the credit with the earliest deadline. For money without deadlines, we spend first from the credit with the earliest effective date.

The third column is a tie breaker to ensure a consistent ordering.

Columns

Column Type Size Nulls Auto Default Children Parents Comments
sort_priority int4 10 null
sort_date timestamptz 35,6 null
id int4 10 null
funding_source int4 10 null
amount numeric 0 null
note text 2147483647 null

Relationships

View Definition


Possibly Referenced Tables/Views