Business Logic Module
|POST||/finance/groups||group||group||Create a group||finance.groups|
|GET||/finance/groups/<id>||NA||group||GET groupby Id||finance.groups|
|GET||/finance/groups||CQL Query||collection<group>||Search/List groups||finance.groups|
|PUT||/finance/groups/<id>||group||group||Update a group||finance.groups|
|DELETE||/finance/groups/<id>||NA||204||Delete a group||finance.groups|
Fiscal Year Query (req)
|collection<budget>||List budgets in this group||finance.groups|
Queries view API: Group + Budget + Fund/Group/FY (by groupId, fiscalYearId, group.acqUnits)
Enforces acquisition units based on group's assignments, ignores budget/fund acq. units.
The fiscalYear query arg is the UUID of a fiscal-year record
|POST||/finance/group-fund-fiscal-years||group_fund_fy||204||Create a groupFundFY||finance.group-fund-fiscal-years|
|GET||/finance/group-fund-fiscal-years||CQL Query||collection<group_fund_fy>||Search/List groupFundFY||finance.group-fund-fiscal-years|
|DELETE||/finance/group-fund-fiscal-years/<id>||NA||204||Delete a groupFundFY||finance.group-fund-fiscal-years|
|POST||/finance-storage/groups||group||group||Create a group||finance-storage.groups|
|GET||/finance-storage/groups/<id>||NA||group||GET group by Id||finance-storage.groups|
|GET||/finance-storage/groups||CQL Query||collection<group>||Search/List groups||finance-storage.groups|
|PUT||/finance-storage/groups/<id>||group||group||Update a group||finance-storage.groups|
|DELETE||/finance-storage/groups/<id>||NA||204||Delete a group||finance-storage.groups|
Updating the GroupFundFY table
As you can see above, there is not API for directly manipulating the GroupFundFY records. These records are automatically updated by the storage module when related changes are made.
- When a Fund is associated with a Group, create a GroupFundFY record for the current FY(s) and any in the future.
- When a FiscalYear is created, create a new GroupFundFY record for each existing Fund/Group pair where Group has status = active. (only if fiscalYear startDate > now)
The approach we're taking will result in GroupFundFY records being creating which may never be used - this is especially true in cases where there are simultaneous or overlapping fiscal years, e.g. Texas Fiscal Year (TFY19) and Qatar Fisal Year (QFY19) might both have similar or overlapping periods, but apply to two separate campuses, each with their own finances. A given ledger would only really apply to one or the other, but GroupFundFY records would be created for both. We need to do this to support rollover. The GroupFundFY records themselves are quite small, so it shouldn't be too much of a problem.
For now we don't have to worry about managing GroupFundFY records upon update or delete of a ledger or FiscalYear. The plan is to implement a soft delete on both so reference integrity should be maintained without intervention.
The GroupFundFY records should be created in the storage module in database transactions, possibly via trigger functions.
|POST||/finance-storage/group-fund-fiscal-years||group_fund_fy||204||Create a groupFundFY||finance-storage.group-fund-fiscal-years|
|GET||/finance-storage/group-fund-fiscal-years/<id>||NA||group_fund_fy||GET groupFundFY by Id||finance-storage.group-fund-fiscal-years||may not be needed, but can't hurt|
|GET||/finance-storage/group-fund-fiscal-years||CQL Query||collection<group_fund_fy>||Search/List groupFundFY||finance-storage.group-fund-fiscal-years|
|PUT||/finance-storage/group-fund-fiscal-years/<id>||group_fund_fy||group_fund_fy||Update a groupFundFY||finance-storage.group-fund-fiscal-years||may not be needed, but can't hurt|
|DELETE||/finance-storage/group-fund-fiscal-years/<id>||NA||204||Delete a groupFundFY||finance-storage.group-fund-fiscal-years|
- Record with info that doesn't change from FY to FY
- Ledger/FY table will be needed to track per FY information (e.g. summary #s)